diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miband/AbstractMiBandFWHelper.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miband/AbstractMiBandFWHelper.java index 6f215bfeb..735c4eaed 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miband/AbstractMiBandFWHelper.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/miband/AbstractMiBandFWHelper.java @@ -51,7 +51,7 @@ public abstract class AbstractMiBandFWHelper { } try (InputStream in = new BufferedInputStream(uriHelper.openInputStream())) { - this.fw = FileUtils.readAll(in, 1024 * 1536); // 1.5 MB + this.fw = FileUtils.readAll(in, 1024 * 2048); // 2.0 MB determineFirmwareInfo(fw); } catch (IOException ex) { throw ex; // pass through diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/miband3/MiBand3FirmwareInfo.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/miband3/MiBand3FirmwareInfo.java index 39a8ad2f3..8187b05d7 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/miband3/MiBand3FirmwareInfo.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/miband3/MiBand3FirmwareInfo.java @@ -70,6 +70,8 @@ public class MiBand3FirmwareInfo extends HuamiFirmwareInfo { // font crcToVersion.put(19775, "1"); + crcToVersion.put(42959, "2 (old Jap/Kor)"); + crcToVersion.put(12052, "1 (Jap/Kor)"); } public MiBand3FirmwareInfo(byte[] bytes) { @@ -79,7 +81,7 @@ public class MiBand3FirmwareInfo extends HuamiFirmwareInfo { @Override protected HuamiFirmwareType determineFirmwareType(byte[] bytes) { if (ArrayUtils.startsWith(bytes, FT_HEADER)) { - if (bytes[FONT_TYPE_OFFSET] == 0x03 || bytes[FONT_TYPE_OFFSET] == 0x04) { + if (bytes[FONT_TYPE_OFFSET] >= 0x03 && bytes[FONT_TYPE_OFFSET] <= 0x05) { return HuamiFirmwareType.FONT; } return HuamiFirmwareType.INVALID;