Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems to extract data in non-root phone #6

Open
vicmanmo opened this Issue Feb 23, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@vicmanmo
Copy link

vicmanmo commented Feb 23, 2017

Hi,

I need to extract MyBand data to create a virtual sensor in OpenIoT.

I have a non-rooted Xioami RedMi Note 2 and I set ForceBackupMode value to Y in run.sh, but in my phone I don't see backup screen. In the other project of author is @XmXm, I see backup screen, but the program doesn't run.

Can you help me?

The result of running run.sh is this:

extraction started on 02/23/2017 09:36
cannot find database files. non-rooted phone? attempting native backup approach
adb server is out of date. killing...

  • daemon started successfully *
    adb: unable to connect for backup
    dd: mi.ab: no se puede saltar al desplazamiento especificado
    0+0 registros leídos
    0+0 registros escritos
    0 bytes copied, 5,8166e-05 s, 0,0 kB/s
    tar: Esto no parece un archivo tar
    tar: apps/com.xiaomi.hm.health/db/origin_db: No se encuentra en el archivo
    tar: apps/com.xiaomi.hm.health/db/origin_db-journal: No se encuentra en el archivo
    tar: Se sale con estado de fallo debido a errores anteriores
    cp: no se puede efectuar `stat' sobre 'apps/com.xiaomi.hm.health/db/origin_db*': No existe el archivo o el directorio
    extracted MiBand database
    deleting temp backup files
    extraction failed
    still cannot find new database files - restoring original database backups

Thank you very much

@vicmanmo

This comment has been minimized.

Copy link
Author

vicmanmo commented Feb 23, 2017

I have changed run.sh for using adb of my OS, and now I see backup screen and read registers.

But tar: apps/com.xiaomi.hm.health/db/origin_db: it doesn't find the file.

Can you help me?

The result of running run.sh is this:

extraction started on 02/23/2017 10:27
cannot find database files. non-rooted phone? attempting native backup approach
press Backup My Data button on device...
adb server is out of date. killing...

  • daemon started successfully *
    Now unlock your device and confirm the backup operation.
    17+0 registros leídos
    17+0 registros escritos
    17 bytes copied, 3,0043e-05 s, 566 kB/s
    tar: apps/com.xiaomi.hm.health/db/origin_db: No se encuentra en el archivo
    tar: apps/com.xiaomi.hm.health/db/origin_db-journal: No se encuentra en el archivo
    tar: Se sale con estado de fallo debido a errores anteriores
    cp: no se puede efectuar `stat' sobre 'apps/com.xiaomi.hm.health/db/origin_db*': No existe el archivo o el directorio
    extracted MiBand database
    deleting temp backup files
    extraction failed
    still cannot find new database files - restoring original database backups

Thank you very much

@vicmanmo

This comment has been minimized.

Copy link
Author

vicmanmo commented Feb 23, 2017

When it executed

adb backup -f mi.ab -noapk -noshared com.xiaomi.hm.health

The file mi.ab doesn't have data.

Where is the problem??

@jreznik

This comment has been minimized.

Copy link

jreznik commented Jun 29, 2018

Same here - it doesn't matter if I use system adb or recent platform-tools adb from Google. com.xiaomi.hm.health is even not in the full backup.

@ErikBjare

This comment has been minimized.

Copy link

ErikBjare commented Dec 2, 2018

Same, tried to figure out why but no luck

@ironjan

This comment has been minimized.

Copy link

ironjan commented Dec 9, 2018

Hi,

the mi fit app now has an export functionality, most like because of GDPR. Through some google search I came across the URL the in-app browser of Mi Fit would be using for the export: https://user.huami.com/hm_account/2.0.0/index.html?loginPlatform=web&platform_app=com.xiaomi.hm.health&v=s3.1.1#/

You can get your data from there*. I just checked the files and the numbers matched the app so far. The export contained 6 CSV files in my case:

(NAME OF FILE).csv
(CSV HEADER)

ACTIVITY_<ID>.csv
date,lastSyncTime,steps,distance,runDistance,calories

BODY_<ID>.csv
timestamp,weight,height,bmi,fatRate,bodyWaterRate,boneMass,metabolism,muscleRate,visceralFat,impedance

HEARTRATE_<ID>.csv
date,lastSyncTime,heartRate,timestamp

SLEEP_<ID>.csv
date,lastSyncTime,deepSleepTime,shallowSleepTime,wakeTime,start,stop

SPORT_<ID>.csv
type,startTime,sportTime,distance,maxPace,minPace,avgPace,calories

USER_<ID>.csv
userId,gender,height,weight,nickName,avatar,birthday

*I did not test the app export functionality itself as it requested me to login again - with my main Google account in an app-internal browser, despite using Google as my "Mi Fit App login".

@ErikBjare

This comment has been minimized.

Copy link

ErikBjare commented Dec 9, 2018

@ironjan That's great news! Trying it out now, thanks a bunch for letting us know ❤️

Edit: Export worked fine, but disappointed to only find day-resolution data and not minute resolution for steps/heartrate 😞 Was that available in the exports made with the mifit-data-export tool?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.