mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
Amazfit Bip: Allow watchface flashing and whitelist Firmware 0.0.9.40
This commit is contained in:
parent
9764e8e54e
commit
e3ca3872e1
@ -62,12 +62,14 @@ public class AmazfitBipFirmwareInfo extends HuamiFirmwareInfo {
|
|||||||
crcToVersion.put(3462, "0.0.8.98");
|
crcToVersion.put(3462, "0.0.8.98");
|
||||||
crcToVersion.put(55420, "0.0.9.14");
|
crcToVersion.put(55420, "0.0.9.14");
|
||||||
crcToVersion.put(39465, "0.0.9.26");
|
crcToVersion.put(39465, "0.0.9.26");
|
||||||
|
crcToVersion.put(27394, "0.0.9.40");
|
||||||
|
|
||||||
// resources
|
// resources
|
||||||
crcToVersion.put(12586, "RES 0.0.8.74");
|
crcToVersion.put(12586, "RES 0.0.8.74");
|
||||||
crcToVersion.put(34068, "RES 0.0.8.88");
|
crcToVersion.put(34068, "RES 0.0.8.88");
|
||||||
crcToVersion.put(59839, "RES 0.0.8.96-98");
|
crcToVersion.put(59839, "RES 0.0.8.96-98");
|
||||||
crcToVersion.put(50401, "RES 0.0.9.14-26");
|
crcToVersion.put(50401, "RES 0.0.9.14-26");
|
||||||
|
crcToVersion.put(22051, "RES 0.0.9.40");
|
||||||
|
|
||||||
// gps
|
// gps
|
||||||
crcToVersion.put(61520, "GPS 9367,8f79a91,0,0,");
|
crcToVersion.put(61520, "GPS 9367,8f79a91,0,0,");
|
||||||
@ -99,6 +101,9 @@ public class AmazfitBipFirmwareInfo extends HuamiFirmwareInfo {
|
|||||||
// TODO: this is certainly not a correct validation, but it works for now
|
// TODO: this is certainly not a correct validation, but it works for now
|
||||||
return HuamiFirmwareType.FIRMWARE;
|
return HuamiFirmwareType.FIRMWARE;
|
||||||
}
|
}
|
||||||
|
if (ArrayUtils.startsWith(bytes, WATCHFACE_HEADER)) {
|
||||||
|
return HuamiFirmwareType.WATCHFACE;
|
||||||
|
}
|
||||||
return HuamiFirmwareType.INVALID;
|
return HuamiFirmwareType.INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,11 +30,12 @@ public abstract class HuamiFirmwareInfo {
|
|||||||
0x48, 0x4d, 0x52, 0x45, 0x53
|
0x48, 0x4d, 0x52, 0x45, 0x53
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected static final byte[] WATCHFACE_HEADER = new byte[]{
|
||||||
|
0x48, 0x4d, 0x44, 0x49, 0x41, 0x4c
|
||||||
|
};
|
||||||
|
|
||||||
protected static final byte[] FT_HEADER = new byte[]{ // HMZK font file (*.ft, *.ft.xx)
|
protected static final byte[] FT_HEADER = new byte[]{ // HMZK font file (*.ft, *.ft.xx)
|
||||||
0x48,
|
0x48, 0x4d, 0x5a, 0x4b
|
||||||
0x4d,
|
|
||||||
0x5a,
|
|
||||||
0x4b
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private HuamiFirmwareType firmwareType = HuamiFirmwareType.FIRMWARE;
|
private HuamiFirmwareType firmwareType = HuamiFirmwareType.FIRMWARE;
|
||||||
|
@ -24,6 +24,7 @@ public enum HuamiFirmwareType {
|
|||||||
GPS((byte) 3),
|
GPS((byte) 3),
|
||||||
GPS_CEP((byte) 4),
|
GPS_CEP((byte) 4),
|
||||||
GPS_ALMANAC((byte)5),
|
GPS_ALMANAC((byte)5),
|
||||||
|
WATCHFACE((byte)8),
|
||||||
INVALID(Byte.MIN_VALUE);
|
INVALID(Byte.MIN_VALUE);
|
||||||
|
|
||||||
private final byte value;
|
private final byte value;
|
||||||
|
Loading…
Reference in New Issue
Block a user