mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-06 18:27:02 +01:00
Amazfit GTS/GTR familiy: Allow flashing newer AGPS bundles
These are packed uuih files. POC code to generate them: https://codeberg.org/Freeyourgadget/Gadgetbridge-tools
This commit is contained in:
parent
083fdea225
commit
65f006d70b
@ -95,6 +95,10 @@ public class AmazfitGTRFirmwareInfo extends HuamiFirmwareInfo {
|
||||
return HuamiFirmwareType.GPS_CEP;
|
||||
}
|
||||
|
||||
if (ArrayUtils.startsWith(bytes, AGPS_UIHH_HEADER)) {
|
||||
return HuamiFirmwareType.AGPS_UIHH;
|
||||
}
|
||||
|
||||
for (byte[] gpsHeader : GPS_HEADERS) {
|
||||
if (ArrayUtils.startsWith(bytes, gpsHeader)) {
|
||||
return HuamiFirmwareType.GPS;
|
||||
|
@ -96,6 +96,10 @@ public class AmazfitGTR2FirmwareInfo extends HuamiFirmwareInfo {
|
||||
return HuamiFirmwareType.GPS_CEP;
|
||||
}
|
||||
|
||||
if (ArrayUtils.startsWith(bytes, AGPS_UIHH_HEADER)) {
|
||||
return HuamiFirmwareType.AGPS_UIHH;
|
||||
}
|
||||
|
||||
for (byte[] gpsHeader : GPS_HEADERS) {
|
||||
if (ArrayUtils.startsWith(bytes, gpsHeader)) {
|
||||
return HuamiFirmwareType.GPS;
|
||||
|
@ -96,6 +96,10 @@ public class AmazfitGTR2eFirmwareInfo extends HuamiFirmwareInfo {
|
||||
return HuamiFirmwareType.GPS_CEP;
|
||||
}
|
||||
|
||||
if (ArrayUtils.startsWith(bytes, AGPS_UIHH_HEADER)) {
|
||||
return HuamiFirmwareType.AGPS_UIHH;
|
||||
}
|
||||
|
||||
for (byte[] gpsHeader : GPS_HEADERS) {
|
||||
if (ArrayUtils.startsWith(bytes, gpsHeader)) {
|
||||
return HuamiFirmwareType.GPS;
|
||||
|
@ -95,6 +95,10 @@ public class AmazfitGTSFirmwareInfo extends HuamiFirmwareInfo {
|
||||
return HuamiFirmwareType.GPS_CEP;
|
||||
}
|
||||
|
||||
if (ArrayUtils.startsWith(bytes, AGPS_UIHH_HEADER)) {
|
||||
return HuamiFirmwareType.AGPS_UIHH;
|
||||
}
|
||||
|
||||
for (byte[] gpsHeader : GPS_HEADERS) {
|
||||
if (ArrayUtils.startsWith(bytes, gpsHeader)) {
|
||||
return HuamiFirmwareType.GPS;
|
||||
|
@ -96,6 +96,10 @@ public class AmazfitGTS2FirmwareInfo extends HuamiFirmwareInfo {
|
||||
return HuamiFirmwareType.GPS_CEP;
|
||||
}
|
||||
|
||||
if (ArrayUtils.startsWith(bytes, AGPS_UIHH_HEADER)) {
|
||||
return HuamiFirmwareType.AGPS_UIHH;
|
||||
}
|
||||
|
||||
for (byte[] gpsHeader : GPS_HEADERS) {
|
||||
if (ArrayUtils.startsWith(bytes, gpsHeader)) {
|
||||
return HuamiFirmwareType.GPS;
|
||||
|
@ -96,6 +96,10 @@ public class AmazfitGTS2MiniFirmwareInfo extends HuamiFirmwareInfo {
|
||||
return HuamiFirmwareType.GPS_CEP;
|
||||
}
|
||||
|
||||
if (ArrayUtils.startsWith(bytes, AGPS_UIHH_HEADER)) {
|
||||
return HuamiFirmwareType.AGPS_UIHH;
|
||||
}
|
||||
|
||||
for (byte[] gpsHeader : GPS_HEADERS) {
|
||||
if (ArrayUtils.startsWith(bytes, gpsHeader)) {
|
||||
return HuamiFirmwareType.GPS;
|
||||
|
@ -96,6 +96,10 @@ public class AmazfitGTS2eFirmwareInfo extends HuamiFirmwareInfo {
|
||||
return HuamiFirmwareType.GPS_CEP;
|
||||
}
|
||||
|
||||
if (ArrayUtils.startsWith(bytes, AGPS_UIHH_HEADER)) {
|
||||
return HuamiFirmwareType.AGPS_UIHH;
|
||||
}
|
||||
|
||||
for (byte[] gpsHeader : GPS_HEADERS) {
|
||||
if (ArrayUtils.startsWith(bytes, gpsHeader)) {
|
||||
return HuamiFirmwareType.GPS;
|
||||
|
Loading…
Reference in New Issue
Block a user