Justin
July 17, 2021, 7:19pm
3
Retrieving the Xiaomi token
The fastest way to retreive Xiaomi tokens today is to use the applications built by jghaanstra (Jelger Haanstra) · GitHub … Download his software, login using your Xiaomi login credentials and you’ll get a list of all your Xiaomi deviced including the TOKEN.
Full repository here:
# Obtain Mi Home device token
Use any of these methods to obtain the device token for the supported miio devices.
## Method 1 - Obtain device token from Mi home account
[Windows app and MAC OS app](https://github.com/Maxmudjon/Get_MiHome_devices_token/releases)
## Method 2 - Obtain device token for miio devices that hide their token after setup
Use one of these methods to obtain the device token for devices that hide their tokens after setup in the Mi Home App (like the Mi Robot Vacuum Cleaner with firmware 3.3.9_003077 or higher). This is usually the case for most Mi Home devices. The latest versions of the Mi Home smartphone app dont hold the token anymore so before you begin with any of these methods you will need to install an older version of the smartphone app. Version 5.0.19 works for sure with the 1st gen Vacuum Robot, for the 2nd gen (S50) you should try version 3.3.9_5.0.30. Android users can find older version of the app [here](https://www.apkmirror.com/apk/xiaomi-inc/mihome/).
### Android users
#### Rooted Android Phones
* Setup your Android device with the Mi Home app version 5.0.19 or lower
* Install [aSQLiteManager](https://play.google.com/store/apps/details?id=dk.andsen.asqlitemanager) on your phone
* Use a file browser with granted root privilege and browse to /data/data/com.xiaomi.smarthome/databases/
* Copy miio2.db to an accessable location
* Open your copy of miio2.db with aSQLiteManager and execute the query "select token from devicerecord where localIP is '192.168.0.1'" where you replace the IP address with the IP address of the device you want to get the token from. It will show you the 32 character device token for your Mi Home device.
#### Non-Rooted Android Phones
##### Extract token from log file
This file has been truncated. show original
Download page for the software here:
2 Likes