1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-09 15:11:34 +02:00
Gadgetbridge/app/src/test/java/nodomain/freeyourgadget/gadgetbridge
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
..
database Fix unit tests 2023-10-28 15:53:47 +01:00
devices/huawei Update license headers 2024-01-10 18:25:20 +00:00
export Adds GPX schema XSD, sample data, and tests which validate output. 2019-03-16 11:13:27 -03:00
externalevents Migrate to androidx support libraries and bump compile SDK version 2019-01-26 16:00:56 +01:00
model Fix unit tests 2023-10-28 15:53:47 +01:00
service Make all Zepp OS classes explicit 2024-01-29 23:30:28 +00:00
test Zepp OS: Refactor firmware uploads 2024-02-01 18:47:28 +00:00
util Improve ASCII transliterator 2023-11-28 18:24:42 +00:00