1
0
Fork 0
mirror of https://codeberg.org/vanous/huafetcher synced 2024-04-24 05:05:03 +02:00
Kivy GUI for huami-token. Works on desktop and as Android apk. Downloads key and aGPS data, unzips it into /storage/emulated/0
Go to file
vanous c1ae8a989d update readme and release.sh 2023-08-02 09:20:36 +02:00
data initial commit 2020-11-24 23:12:25 +01:00
screenshots Update documentation 2021-02-21 15:27:23 +01:00
.gitignore Add support for EPO files 2023-07-27 00:02:07 +01:00
LICENSE Initial commit 2020-11-24 20:00:29 +01:00
README.md update readme and release.sh 2023-08-02 09:20:36 +02:00
buildozer.spec release 0.26 2023-08-02 09:03:16 +02:00
huami_token.py Add support for EPO files 2023-07-27 00:02:07 +01:00
main.py Add support for EPO files 2023-07-27 00:02:07 +01:00
release.sh update readme and release.sh 2023-08-02 09:20:36 +02:00
requirements.txt initial commit 2020-11-24 23:12:25 +01:00
typemap.json add UIHH aGPS packing 2021-05-16 01:18:18 +02:00
typemap.py add UIHH aGPS packing 2021-05-16 01:18:18 +02:00
urls.py rotate agps servers in case of 401 error 2021-05-31 19:47:17 +02:00

huafetcher

Kivy GUI for huami-token. Works on desktop and as Android apk. Downloads key and aGPS data, unzips it into /storage/emulated/0

huami-token: all credits to the original author

To be able to get a key from huami servers, the band/watch must be paired with the original app at least once. Follow instructions in Gadgetbridge wiki.

screenshot screenshot

Developer

Install

Install Buildozer and Kivy

pip install buildozer
pip install kivy

or

pip install -r requirements.txt

Run

python main.py

Make Android apk

buildozer -v android debug deploy run

Store credentials locally:

#cat credentials.json

{"password": {"value": "xxx"}, "email": {"value": "yyy"}}

User

Obtaining apk

Either build apk as per above or get it from the releases

Signing into account

This process for Xiaomi login is pretty unintuitive, so make sure to read this first!

  1. Install the apk, run it and manually give it permission for storage (only needed if you plan to fetch aGPS).
screenshot screenshot

Amazfit

  • Choose Amazfit as login method.
  • Fill in email and name fields. You can save them in the app by pressing the Save buttons.
screenshot

Note: saved data is not protected. If you use this to get aGPS data periodically, create a throwaway account without any devices.

Key

  • For key, press Fetch key. The key will appear in the Found key field, get it by pressing the Copy button.

Note: Only last key provided by the server is displayed.

screenshot

This key must be entered into Gadgetbridge during pairing process with devices that require it:

screenshot screenshot screenshot

aGPS

  • For aGPS, press Fetch aGPS button. Files will be downloaded and the two important files (cep_pak.bin and gps_alm.bin) will be unzipped into /storage/emulated/0. You can send them into your device with the Gadgetbridge FW/App Installer
screenshot screenshot screenshot screenshot

Xiaomi

  • Choose Xiaomi as login method. Press Get token button.
screenshot
  • This will open up your browser. Here you need to sing into your Xiaomi account.
screenshot
  • Once you press Sign in, your browser will either warn you or this gets you to a blank page. In any case, the url starts with hm.xiaomi.com/watch.do?.... You must copy this URL:
screenshot screenshot
  • Go back to Huafetcher and paste the URL into the URL result field by using the Paste button.
screenshot
  • Now you can get a key or aGPS.

Key

  • For key, press Fetch key. The key will appear in the Found key field, get it by pressing the Copy button.

Note: Only last key provided by the server is displayed.

screenshot

This key must be entered into Gadgetbridge during pairing process with devices that require it

screenshot screenshot screenshot

aGPS

  • For aGPS, press Fetch aGPS button. Files will be downloaded and the two important files (cep_pak.bin and gps_alm.bin) will be unzipped into /storage/emulated/0. You can send them into your device with the Gadgetbridge FW/App Installer
screenshot screenshot screenshot screenshot