Huami-Tokenは現在、codeberg.orgでホストされています。
huamiサーバーから時計またはバンドBluetoothアクセストークンを取得するスクリプト。また、AGPSデータパックcep_alm_pak.zipおよびcep_7days.zipをダウンロードします。
AmazfitとXiaomi WatchesとBandsの新しいバージョンを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タブは、デバイスがアクティブかどうかを示しています。
Xiaomi Webサイトで手動でログインする必要があるため、これは少し使用するのが少し難しいです。
python3 huami_token.py --method xiaomi --bt_keys実行します。https://hm.xiaomi.com/watch.do?code=ALSG_CLOUDSRV_9B8D87D0EB77C71B45FF73B2266D922B code=alsg_cloudsrv_9b8d87d0eb7c71b45ff73b2266d922b。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タブは、デバイスがアクティブかどうかを示しています。
この例では、2つのデバイスがあります。最初のデバイスは私のAmazfit bip s Watchです。2つ目は私のXiaomi Miスマートスケールです。
これは非常に危険です。間違ったバージョンをフラッシュすると、デバイスをレンガすることができます!発生する可能性のある問題については責任を負いません。
-f/--firmware引数で有効にすることができます。 -b/--bt_keys引数でのみ動作します。デバイスのIDまたは-1を入力して、すべてを確認する必要があります。スクリプトは、上記のテーブルからファームウェアの更新とデバイスのフォントパックを見つけようとします。
あなた自身の責任でダウンロードされたファイルを使用してください!
このプロジェクトはMITライセンスに基づいてライセンスされています - 詳細については、license.mdファイルを参照してください