huami token
1.0.0
Huami-Token現在託管在Codeberg.org上。
腳本以獲取Watch或Band Bluetooth訪問令牌從Huami服務器獲得。它還將下載AGPS數據包cep_alm_pak.zip和cep_7days.zip 。
要使用gadgetbridge的新版本和小米手錶和樂隊,您需要特殊的獨特鍵。在此處閱讀更多:https://codeberg.org/freeyourgadget/gadgetbridge/wiki/huami-server-pairing。
git clone https://github.com/argrento/huami-token.gitpip3 install -r requirements.txt usage: huami_token.py [-h] -m {amazfit,xiaomi} [-e EMAIL] [-p PASSWORD] [-b]
[-g] [-a] [-n]
Obtain Bluetooth Auth key from Amazfit servers and download AGPS data.
optional arguments:
-h, --help show this help message and exit
-m {amazfit,xiaomi}, --method {amazfit,xiaomi}
Login method
-e EMAIL, --email EMAIL
Account e-mail address
-p PASSWORD, --password PASSWORD
Account Password
-b, --bt_keys Get bluetooth tokens of paired devices
-g, --gps Download A-GPS files
-f, --firmware Request firmware updates. Works only with -b/--bt_keys
argument. Extremely dangerous
-a, --all Do everything: get bluetooth tokens, download A-GPS
files. But do NOT download firmware updates
-n, --no_logout Do not logout, keep active session and display app
token and access token
用憑據運行腳本: python3 huami_token.py --method amazfit --email [email protected] --password your_password --bt_keys 。
樣本輸出:
> python3 huami_token.py --method amazfit --email my_email --password password --bt_keys
Getting access token with amazfit login method...
Token: [ ' UaFHW53RJVYwqXaa7ncPQ ' ]
Logging in...
Logged in ! User id: 1234567890
Getting linked wearables...
+----------------------------------------------------------------------+
| ID | ACT | MAC | auth_key |
| -----+-----+-------------------+-------------------------------------- |
| 0 | 1 | AB:CD:EF:12:34:56 | 0xa3c10e34e5c14637eea6b9efc06106 |
+----------------------------------------------------------------------+
Logged out.在這裡, auth_key是您手錶的唯一配對鍵。 ACT選項卡顯示設備是否處於活動狀態。
這有點困難,因為您需要在小米網站上手動登錄。
python3 huami_token.py --method xiaomi --bt_keys 。https://hm.xiaomi.com/watch.do?code=ALSG_CLOUDSRV_9B8D87D0EB77C71B45FF73B2266D922B code=alsg_cloudsrv_9b8d87d87d0eb77c71b45ff73b2266666d9222b。enter 。樣本輸出:
> python3 huami_token.py --method xiaomi --bt_keys
Getting access token with xiaomi login method...
Copy this URL to web-browser
https://account.xiaomi.com/oauth2/authorize ? skip_confirm=false & client_id=2882303761517383915 & pt=0 & scope=1+6000+16001+20000 & redirect_uri=https%3A%2F%2Fhm.xiaomi.com%2Fwatch.do & _locale=en_US & response_type=code
and login to your Mi account.
Paste URL after redirection here.
https://hm.xiaomi.com/watch.do ? code=ALSG_CLOUDSRV_9B8D87D0EB77C71B45FF73B2266D922B
Token: [ ' ALSG_CLOUDSRV_9B8D87D0EB77C71B45FF73B2266D922B ' ]
Logging in...
Logged in ! User id: 3000654321
Getting linked wearables...
+----------------------------------------------------------------------+
| ID | ACT | MAC | auth_key |
| -----+-----+-------------------+-------------------------------------- |
| 0 | 1 | 12:34:56:AB:CD:EF | 0x3c10e34e5c1463527579996fa83e6d |
| 1 | 0 | BA:DC:FE:21:43:65 | 0x00 |
+----------------------------------------------------------------------+
Logged out.在這裡, auth_key是您手錶的唯一配對鍵。 ACT選項卡顯示設備是否處於活動狀態。
在此示例中,我有兩個設備:第一個設備是我的Amazfit Bip S手錶,第二個是我的小米Mi智能秤。
這是非常危險的:閃爍錯誤的版本可以將您的設備磚砌!我對可能出現的任何問題不承擔任何責任。
可以使用-f/--firmware參數啟用。僅與-b/--bt_keys參數一起使用。您應該輸入設備的ID或-1以檢查所有設備。腳本將嘗試從上表查找固件和設備的字體包更新。
使用下載的文件應自身風險!
該項目已根據MIT許可證獲得許可 - 有關詳細信息,請參見許可證文件。