1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-25 03:16:51 +01:00
Gadgetbridge/app
José Rebelo 34fd18885a Zepp OS: Refactor firmware uploads
Zepp OS 3 firmware upgrades are big (200MB+). Gadgetbridge was crashing,
since the entire firmware file would be pulled into memory.

This commit unifies all the logic for Zepp OS firmware handling.

However, since the needed refactor was big, this commit duplicates some
of the code from Huami classes, namely:
- ZeppOsFirmwareUpdateOperation clones UpdateFirmwareOperation2020
- ZeppOsFwInstallHandler clones AbstractMiBandFWInstallHandler

This avoids changes to older device logic and introducing regressions.

Lost functionality:
- Repackaging firmwares as UIHH (does not seem to be needed, and was not
  used anyway). Code can be recovered from this commit if needed in the
  future
- Whitelisted firmwares by checksum (we do not have a lot of them at
  this point anyway)

Other misc changes:
- Rename ZipFile to GBZipFile not to clash with the java class

Tested by updating the Amazfit GTR 4 to Zepp OS 3.
2024-02-01 18:47:28 +00:00
..
src Zepp OS: Refactor firmware uploads 2024-02-01 18:47:28 +00:00
build.gradle Upgrade to gradlew 7.6, mockito-core 2.28.2 2024-01-29 18:50:40 +00:00
lint-baseline.xml Add lint baseline, enable linting on CI, fix some reported errors (#3291) 2023-09-11 09:17:04 +00:00
proguard-rules.pro Add lint baseline, enable linting on CI, fix some reported errors (#3291) 2023-09-11 09:17:04 +00:00