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许可证获得许可 - 有关详细信息,请参见许可证文件。