1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-23 18:36:50 +01:00

Amazfit Bip: Raise .res limit to 700000 bytes for modded files

This commit is contained in:
Andreas Shimokawa 2018-05-06 16:34:14 +02:00
parent 8fe0c213cb
commit b585fde78a

View File

@ -138,7 +138,7 @@ public class AmazfitBipFirmwareInfo extends HuamiFirmwareInfo {
@Override
protected HuamiFirmwareType determineFirmwareType(byte[] bytes) {
if (ArrayUtils.startsWith(bytes, RES_HEADER) || ArrayUtils.startsWith(bytes, NEWRES_HEADER)) {
if (bytes.length > 500000) { // dont know how to distinguish from Cor .res
if (bytes.length > 700000) { // dont know how to distinguish from Cor .res
return HuamiFirmwareType.INVALID;
}
return HuamiFirmwareType.RES;