tommyblue / huawei-health-to-gpx

Convert activities from the Huawei Health app and activity trackers to GPX files
MIT License
61 stars 2 forks source link
Huawei Health activities to GPX

Huawei Health activities to GPX

Golang app that generates GPX files from a Huawei HiTrack backup.

HiTrack data is what Huawei wearables generate after an activity (Huawei Band 3 PRO is an example).

This app gets as input the HiTrack data from a Huawei Health app backup (as SQLite database) and outputs GPX files with support for timestamped GPS, altitude, heart-rate, and cadence data where available.

This app gets inspiration from Huawei TCX Converter which should be used if your backup has a different format (see below).

How to get the Huawei Health db

Note

For some reason if your wearable loses the GPS signal at the end of the record, the outputted dump doesn't contain GPS data, although the Health app can still show the track. This happen at least on the Band 3 Pro.

The fact that the Health app shows the GPS track let me suspect data is still somewhere, but I didn't find a way to get it :/

How to build and install

git clone git@github.com:tommyblue/huawei-health-to-gpx.git
./scripts/setup
./scripts/install

How to run the app

The app can check the db and list the existing tracks:

hitrack2gpx ~/<path>/com.huawei.health.db

If an activity ID is provided, the app outputs the GPX file:

hitrack2gpx ~/<path>/com.huawei.health.db <ID>

The output can be saved to a file:

hitrack2gpx ~/<path>/com.huawei.health.db <ID> > ~/<path>/file.gpx

Requirements