1
0
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:
Andreas Shimokawa 2021-05-15 22:47:38 +02:00
parent 083fdea225
commit 65f006d70b
7 changed files with 28 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;