Steps that worked for me.
1) Get root access to the phone. If you are root you can manage files from "/data/data/com.xiaomi.hm.health"
-You may have to change permissions in files and folders (you may need root explorer or other root file manager).
2) Follow the instructions from "http://forum.xda-developers.com/general/accessories/xiaomi-mi-band-data-extraction-t3019156"
-Follow preparation steps (Developer Mode..)
-It must be important to read all "http://forum.xda-developers.com/general/accessories/xiaomi-mi-band-data-extraction-t3019156" thread.
1. Connect phone through USB and make sure USB debugging setting is enabled on your phone. Unlock phone screen.
2. Execute run.bat - if your phone is rooted, the data would be pulled automatically. If your phone is not rooted you would see backup screen and you need to press "Back up my data" button in the bottom left corner.
3. Data from your mi band will be saved to extract.csv file and extract.js. After extraction is complete, if OpenHTML is set to Y, mi_data.html will be opened automatically to show charts for your Mi usage.
3) Use a different sql for miband and miband2. Take into account that now Mi Fit db have a random number ex: origin_db_1623265978 it's not only origin_db.
I leave my run.sh here and my miband2.sql if it helps someone.
Rebuild miband_extract from xmxx..
Thanks to xda-developers.com, bonoboo..
It doesn't work after last Mi Fit and mi band firmware updates, it must be changed db data.
It works with this files