Improve guides

This commit is contained in:
Fabian Affolter 2017-08-26 12:59:06 +02:00
parent b1ec41b03b
commit 63cf989b52
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -150,8 +150,8 @@ To fetch the token follow these instructions depending on your mobile phone plat
1. Configure the robot with the Mi-Home app.
2. Enable developer mode and USB debugging on the Android phone and plug it into the computer.
3. Get ADB tool for Windows: https://developer.android.com/studio/releases/platform-tools.html
4. Create a backup of the application com.xiaomi.smarthome:
3. Get and install the [ADB tool for Windows](https://developer.android.com/studio/releases/platform-tools.html).
4. Create a backup of the application `com.xiaomi.smarthome`:
```bash
$ adb backup -noapk com.xiaomi.smarthome -f backup.ab
```
@ -164,13 +164,13 @@ and execute this command:
$ adb -s DEVICEID backup -noapk com.xiaomi.smarthome -f backup.ab # (with DEVICEID the device id from the previous command)
```
6. On the phone, you must confirm the backup. DO NOT enter any password and press button to make the backup.
7. Get ADB Backup Extractor: https://sourceforge.net/projects/adbextractor/
7. Get and install [ADB Backup Extractor](https://sourceforge.net/projects/adbextractor/).
8. Extract All files from the backup:
```bash
$ java.exe -jar ../android-backup-extractor/abe.jar unpack backup.ab backup.tar ""
```
9. Unzip the ".tar" file.
10. Open the SQLite DB `miio2.db` with a tool like SQLite Manager extension for FireFox.
10. Open the SQLite database `miio2.db` with a tool like SQLite Manager extension for FireFox.
11. Get the token from "devicerecord" table.
#### {% linkable_title Linux and Android (rooted!) %}
@ -181,15 +181,15 @@ $ java.exe -jar ../android-backup-extractor/abe.jar unpack backup.ab backup.tar
4. `adb devices` should list your device
5. `adb root` (does work for development builds only: ones with `ro.debuggable=1`)
6. `adb shell`
7. `echo "select name,localIP,token from devicerecord;" | sqlite3 /data/data/com.xiaomi.smarthome/databases/miio2.db` returns a list of all registered devices including ip address and token.
7. `echo "select name,localIP,token from devicerecord;" | sqlite3 /data/data/com.xiaomi.smarthome/databases/miio2.db` returns a list of all registered devices including IP address and token.
#### {% linkable_title macOS and iOS %}
1. Setup iOS device with the Mi-Home app.
2. Create an unencrypted backup of the device using iTunes.
3. Install iBackup Viewer from here: http://www.imactools.com/iphonebackupviewer/
4. Extract this file: **`/raw data/com.xiami.mihome/1234567_mihome.sqlite`** to your computer, where _1234567_ is any string of numbers.
5. Open the sqlite DB with a tool like SQLite Manager extension for FireFox, DB Browser, etc. You will then see the list of all the devices in your account with their token. The token you need is in the column **`ZToken`** and looks like **`123a1234567b12345c1d123456789e12`**.
3. Install [iBackup Viewer](http://www.imactools.com/iphonebackupviewer/).
4. Extract this file: **`/raw data/com.xiami.mihome/1234567_mihome.sqlite`** to your computer, where `_1234567_` is any string of numbers.
5. Open the SQLite database with a tool like SQLite Manager extension for FireFox or DB Browser. You will then see the list of all the devices in your account with their token. The token you need is in the column **`ZToken`** and looks like **`123a1234567b12345c1d123456789e12`**.
### {% linkable_title Troubleshooting %}