jonohayon / mi-watch-lite-rtl

Research for RTL support on the Mi Watch Lite
4 stars 0 forks source link

More info #1

Open BitesizedLion opened 5 months ago

BitesizedLion commented 5 months ago

This looks somewhat abandoned by now but here's some more info, in case you or somebody else finds it useful.

Get firmware:

POST https://de.hlth.io.mi.com/healthapp/device/latest_ver?locale=en_us

Headers:
region_tag: de
handleparams: true
content-type: application/x-www-form-urlencoded
cookie
etc.

sends data, signature, rc4_hash__, _nonce values in the form

"data" is the following for my watch but encrypted with RC4.

{"app_level":"327001","channel":"prod","did":"389285908","fw_ver":"4.1.20","model":"mijia.watch.v1dist","platform":"android"}

response body (RC4 Encrypted too):

{
  "code": 0,
  "message": "",
  "result": {
    "version": "4.1.20",
    "url": "https://fk-res-abroad-cdn.home.mi.com/default/2b4592f0bff4b72000c22e8de6feecae_upd_mijia.watch.v1dist.bin?GalaxyAccessKeyId=5721718224520&Expires=1722247201469&Signature=/ELGwHjbYSNdlSKImqo/khd6tCs=",
    "safe_url": "https://fk-res-abroad-cdn.home.mi.com/default/2b4592f0bff4b72000c22e8de6feecae_upd_mijia.watch.v1dist.bin?GalaxyAccessKeyId=5721718224520&Expires=1722247201469&Signature=/ELGwHjbYSNdlSKImqo/khd6tCs=",
    "md5": "2b4592f0bff4b72000c22e8de6feecae",
    "changeLog": "1. Add Smart DND function\n2. Add Vibration mode setting\n3. Add sensitivity setting for Raise to wake\n4. Add mute button for incoming calls (Android)\n5. Add Bluetooth disconnection reminder\n6. Fix known bugs\n7. Improve system stability",
    "upload_time": 0,
    "diff_url": "",
    "diff_safe_url": "",
    "diff_md5": "",
    "time_out": 0,
    "force": false,
    "rec": false
  }
}

Firmware available here: https://github.com/BitesizedLion/Junk/blob/master/2b4592f0bff4b72000c22e8de6feecae_upd_mijia.watch.v1dist.bin

Simple Go code for easily doing the RC4 decryption: https://github.com/BitesizedLion/MIFitness-RC4

I've had the firmware and some other stuff for a while but never been able to do anything with it, tried figuring out both firmware itself and watch faces (as custom watch faces was the main thing I was interested in at first)

Firmware uploads are (supposedly) possible with a developer version of the "Xiaomi Wear" app, also some other misc debug features, available here: https://github.com/BitesizedLion/Junk/releases/download/miwatchdev/MiWatch-Dev-90909_9.9.9-debug.apk

The app is quite old so I'm not 100% sure if it still works or not.

jonohayon commented 4 months ago

Amazing! I did drop it back then since they added Hebrew support in a FW upgrade, but I might use your research to conduct a few experiments of my own just for kicks :)