[General Accessories] muscleriot:
Thanks I tried to use the 2.0 script on unbuntu but....

Thanks hutch,

I have tried to use the script above. Because the above 2.0 script doesn't work with Windows, I tried to use Ubuntu.

However, I ran into the problem of getting USB drivers for my Samsung Note 2 phone on Ubuntu (which are easy to get on Windows)... Basically, after a lot of internet searchs I am still scratching my head about how to install them on Ubuntu...

It doesn't seem to work for me in Windows with the .bat. I have replaced db/miband.sql but I get the following:

Extract Started
Tue 06/21/2016
Renaming
ADB SU copy to sdcard
ADB pull
Cannot find database files. Non-rooted phone? Attemting backup approach
unpacking backup file
miniz.c version: 9.1.15
Mode: d, Level: 9
Input File: "mi.zlb"
Output File: "mi.tar"
Input file size: 2971050
Total input bytes: 2971050
Total output bytes: 6709248
Success.
bin\tar: apps/com.xiaomi.hm.health/db/mihealth*: Not found in archive
bin\tar: Error exit delayed from previous errors
deleting temp files
apps\com.xiaomi.hm.health\db\origin_db
apps\com.xiaomi.hm.health\db\origin_db-journal
apps\com.xiaomi.hm.health\db\origin_db_1603596782
apps\com.xiaomi.hm.health\db\origin_db_1603596782-journal
4 file(s) copied.
The system cannot find the file specified.
The system cannot find the file specified.
sqlite operation started

I notice that for 2.0 not only miband.sql was replaced but also the .sh script. Are you using Ubuntu to do this?

I am particularly interested in the sleep data as I have problems getting a good 7-8hrs in and the Mi Fit Band shows only 25% of the time in Deep Sleep. I often wake up feeling exhausted and without any energy with only 4-5hrs sleep. I initially utterly disbelieved the poor results from the MI Band, but I spend a $10 on a CCTV camera with IR LEDs, another $10 on 60m of CCTV cable, plugged it into my CCTV DVR, and started to film my sleep timecoded. (I didn't think about using a laptop and IR enabled night vision webcam which would have been a lot simpler setup!)

I have been directly comparing this with the Mi Fit band and looking at a timelapse of the nights sleep for accuracy. (I use a ffmpeg .BAT file to cleanup and join the cctv segments together and timelapse the whole thing 1m->1s. I also insert a picture of the nights sleep data into a corner of the timelapse using ffmpeg so I can easily compare). I Have to say the Mi Fit band has been at least 90% accurate unfortunately. On the resulting timelapse's I am clearly moving in light sleep and not moving in deep sleep and it is spot on fit with the MI Band data - to the minute.

A recent BBC Horizon program on Alzheimer's scared the pants off me, by showing just how critical it is to get good deep sleep hours - the only hours where amayliod plaques are washed away by cerebral-spinal fluid entering the brain. [youtu.be/hjVRnqn93e4?t=200]

Although there is no family history of Alzheimer's or any dementia, I have been determined to see what I can do to increase the quality of my sleep, with taking half a grated nutmeg before bed, trying magnesium tablets etc... But to do that on a regular basis, (to see any statistical improvement) requires data extraction as its a real pain to manually type the data from the phone into a data file. (BTW Nutmeg before bed definitely appears to work to improve the deep parts of sleep - I am now trying to get the optimal dose - I previously thought nutmeg it was a old wives tale - and was was shocked to find the lethal dose of nutmeg is just several tablespoons!)