tomato4 / Amazfit_sportdata_exporter

Exports sport data from watch to .tcx files. Amazfit watch itself doesn't support to export workouts without gps data.
GNU General Public License v3.0
1 stars 1 forks source link
amazfit amazfit-pace amazfit-stratos sports-data

Amazfit sport data exporter (non GPS sport data only)

What does this app do

note: this app only exports workouts, that doesn't contain GPS data (indoor sports). If they do, watch can export them directly.

note: App cannot export triathlon and multisport. I don't plan to implement this if there is no interest...

Future plans

How to use this app

  1. In App folder run Amazfit_data_exporter.exe
    • It checks for new version and give info
  2. click "y" for continue
  3. App sends request for backup to Amazfit. Click on Backup my data
    • Wait until it finishes the backup. This can take up to minute.
    • If Amazfit disconnected during the backup or another issue happends it will give an error. Just restart the app and try again.
    • If more android device are connected to PC (with android debugging enabled) app tries to export data, but I can't controll from which device it will export (if wrong device, it throws error)
  4. After export it shows all workouts.
  5. (If there is unknown sport app will ask whether to export or not. Press "y" or "n".)
  6. Last prompt - press "y" for creating .tcx files of workouts
  7. Enter to exit

How this app works (advanced stuff)

Amazfit watches uses android core, so there can be used ADB (android debug bridge). So using Adb I backup apk with id com.huami.watch.newsport, transfer backup file to .tar (something like .zip) and then extract that. Now there is sport_data.db - this file is database and contains all needed data. Sport_summary table's rows represents one workout each row (with track_id as key). This timestamp by the way is unix time in miliseconds. And finaly heart_rate table containing whole workout details. Each record is assigned to one workout and contain eg. time from start or BPM of heart (beats per minute). From this data app can build xml formated document. Tcx file is basically xml file.