yashsingh1/xdaforums huggingface dataset:
[Huawei Watch] *Invader Zim*:
My problem is the calorie count is not your daily count, but rather your activity count which is completely useless.

Also, if I sync with Google Fit the heart rate does not pull through.
[Huawei Watch] ethgkk:
Hi,

Just checked shortly your file and found a few things: if you import it to excel as delimited by semicolon, you can do the necessary conversions, needed to use Excel GPX converter. I am not allowed to post links here, so please search for the site. Please check the requirements how to name the Excel columns!

What shall you do?

- e.g remove lat=, lon=, from the beginning of the coordinates - for 18119 points

- tp=alti rows contains the altitudes, again remove the 'v=' before the value - for 3560 points

- tp=h-r contains the heart rate, again remove the 'v=' before the value - for the same 3560 points

- tp =rs contains the average speed for the same 3560 points, again remove the 'v=' before the value. Speed is most probably m/s.

- tp=s-r - i have no idea what is this, but can be identified if you share what kind of activity you did and where

- tp=p-m - no idea

- tp=b-p-m - no idea

- In case of speed - it is calculated for every 5th point, so you must copy speed values with k=0 to an additional column right to the coordinates, like this: speed for k=0 you copy to coordinates from k=0, k=1, k=2, k=3, k=4, continue with k=5, etc. in the same way.

- Due to the fact that we have Heart Rate and altitude records in the same amount as speed, I guess we have to do the same (add two more columns to the excel and copy the same way). I have no idea, what those huge k values mean at the beginning of the rows, my best guess is a coded time stamp, the difference is always 5000. Half second? 5 second? Can you tell me when you made that track (date and time)?

It's OK, if you convert just e.g. 10-20 records and skip the rest, just to check if the theory is correct or not.

At the end you must remove the columns which contain just type and sequence information (first two). Please also be sure that at the end no formulas remained in the excel, just simple values. Run the GPX export, try to import it to Strava.

If it does not work, download a GPX file from Strava open in Excel as xml and check what is the difference. Fine-tune the excel conversions accordingly and it will work sooner or later. If you can share the final working method here, I will really appreciate it!

I might buy a Honor Magic Watch or a Huawei Watch GT. If that happens, I will write a conversion program to avoid manual work in Excel.

Best regards,

Gabor
[Huawei Watch] aricooperdavis:
Well done finding this file - it looks like it might finally be a step in the right direction for getting this data out of the Huawei Health app! I'm going to give this a go with data from a Huawei Band 2 Pro.

Regarding the huge time-stamp, I suspect it's simply the number of seconds since the unix epoch, written in scientific notation. For example the first timestamp (t=1.543646826E9) written without scientific notation becomes (1543646826) which corresponds to (Sat, 1 Dec 2018 06:47:06 GMT).

I'm going to try and access this file without rooting my phone, hopefully by "backing-up" the app-data to my computer using ADB. I'm reluctant to root my phone as I don't want to lose the ability to use Google Pay. I'll keep you updated!
[Huawei Watch] aricooperdavis:
Update: I could neither debug nor backup the Huawei Health app (Version: 9.0.4.332) on my unrooted Huawei P10 Lite. A workaround might be to backup the Health data to the Huawei cloud and re-download it onto a different rooted handset, but as I don't have a rooted handset at the moment I can't do that. Another workaround might to be trying to download an older version of the app, and hoping that it doesn't restrict backup/debugging. Another option might be to use the HiSuite application to backup the data to your computer and extract the health data from there. I'm trying all these options to avoid rooting.
[Huawei Watch] GiovaniM:
Why does not Huawei put the option to export to gpx in the Health application?
[Huawei Watch] aricooperdavis:
I wish! There is an open question on the Huawei forums for this - it's probably worth adding your voice to the crowd to push it up their priority list :)

I have found a way to access the data without a rooted phone though!!

Download the Huawei Backup app (previously called KoBackup)

Make a local backup to an SD card of just the Huawei Health App Data (ensuring that the backup is not encrypted)

Navigate to the backup on your SD card and you'll find a .tar file containing the data files posted above. You can then move this across to your computer for processing.

The relevant files start `HiTrack_` then a unix timestamp, and can be found in `com.huawei.health/files/`

It is currently not possible to use the HiSuite to extract this data directly to your computer as it is encrypted, even if you choose not to use a password. There are some expensive commercial tools that can decrypt the data (MOBILedit Forensic Express), and a new paper (doi: 10.1016/j.diin.2019.01.008) has been released that proposes a framework for doing this but they don't supply the tool that they've created.

So now we just need to work on converting this data to a useful format, such as Garmin's .tcx- I'll try and whip up a python tool to do this so that it can be cross-platform. I have no experience working with XSD Schema so any help would be appreciated!
[Huawei Watch] aricooperdavis:
I've not forgotten about this and am working on it - I've wrapped my head around generating .tcx files and can generate valid ones in python now based on very simple data. Now I'm working on parsing the HiTrack files in order to feed them in to my .tcx generator.

I have noticed that my backed-up com.huawei.health folder doesn't always hold all of my recorded tracks. It doesn't even seem to only store the recent ones, but a somewhat random selection. I'm beginning to think that these files aren't how the data is stored long-term, but something that the app is producing as temporary files in order to make displaying the information easier/faster. This might be a pain later on, but for now it's better than nothing.

I've also noticed that our files are slightly different, probably because mine is generated using a Huawei Band 2 Pro rather than the Watch GT. Again, this is a problem for later on - perhaps altitude measurements from your watch won't transfer across initially (mine has no altitude measurement), but with enough data files from you I'll be able to sort that.

I've worked out that the tp=p-m lines store your pace (the number of seconds it took you to run that particular kilometer), and on these lines k is distance run in micrometers (!?). I still have no idea what tp=b-p-m but it's probably also measured in micrometers. We can calculate pace from our timestamped location data so I'm going to ignore these lines.

Finally, the timestamps associated with location and heart-rate measurements are not the same, meaning we will need to interpolate heart-rates for the locations that we do have recorded. For the moment I'll just ignore heart-rate data, and that can be a problem for later on.
[Huawei Watch] aricooperdavis:
There we go, I've got a very early-alpha version up on GitHub :)
[Huawei Watch] aricooperdavis:
There is now!

[IMG="Map of grlazy's route - extracted from the datafile provided in his post."]https://i.imgur.com/D9qNw05.png[/IMG]

I noticed whilst processing your data that you have 4 or 5 incorrectly recorded GPS points that pointed at:

lat=90.0;lon=-80.0

Once I'd stripped these out by hand the conversion went smoothly.

I'll implement some kind of filter that removes lines that contain these coordinates during conversion so that you don't have to do this by hand in the future. I don't think those coordinates will crop up in real run data, as they're in the middle of the arctic ocean...

EDIT: Done, you can now filter these records out by passing the tool the command line argument '-f' (see readme for details).
[Huawei Watch] grlazy:
@ aricooperdavis

those are very good news, thank you so much for your time and effort .

I will test it asap (most likely at weekend ) and report back
[Huawei Watch] lio_pawel:
[MENTION=9768249]aricooperdavis[/MENTION]

Hi, I have Watch GT.

tp=s-r - This is cadence. Your program works excellent. I use the tcxconverter program to attach altitude. I'm just missing cadence. Could you implement it?
[Huawei Watch] aricooperdavis:
My pleasure! If you have any trouble send me the files and errors and I can troubleshoot :)

---------- Post added at 06:02 PM ---------- Previous post was at 05:59 PM ----------

I'll see if I can add it :) At the moment I'm not interpolating the heart-rate, I'm just putting it in where it appears, so I can do the same for cadence?
[Huawei Watch] lio_pawel:
exactly. I compared HR and everything is correct.

Wysłane z iPhone za pomocą Tapatalk
[Huawei Watch] majo_scigo:
not sure if it is going to help, but I found by chance that you can request your data from Huawei. Just click your picture in the health app click setting/ request your data. you will be asked to confirm your mobile and they will email it to you. I have done it the other day and got the data within few hours. If someone wants, i am happy to share over a year of my data from Huawei Band 2 (my steps, sleep and heart rate, plus couple of gps routes)

Just to add all the info is generated in .xml format.
[Huawei Watch] aricooperdavis:
There you go, I've updated it :)

Can you have a look and see if that's worked for you? The TCX schema for cadence is a bit complicated; there is a <Cadence> tag for each trackpoint but according to Strava this isn't used for Running; instead you need to use the <RunCadence> extension. This is what I've done, and the files validate happily enough, but I'm not 100% sure that tools like Strava will recognize them. Let me know if this is a problem.
[Huawei Watch] aricooperdavis:
Thank you - that's potentially very useful for iPhone users who aren't currently able to access these HiTrack files, although it is a shame that you can only request your data once per month. I have requested a copy of my data too; hopefully it will be possible to adapt the tool, or make a new one, that can process these .xml files directly in order to generate .tcx files of activities :good:
[Huawei Watch] lio_pawel:
Thank you very much for your work. Cadence is here, but the distance has disappeared. The TCX Conventer after loading the file generated by your program, does not show the distance and I can not add the altitude. In the previous version it worked great.

---- Input File ----

reading: OKAY

filtering: OKAY

processing gps: OKAY

processing heart-rate/cadence: OKAY

---- Details ----

start: 2019-02-16 14:00:50

duration: 00:24:46

distance: 0m

sport: Running

---- XML file ----

generating: OKAY

saving: OKAY

validating: OKAY
[Huawei Watch] aricooperdavis:
:eek:!?!?!

I can't replicate that problem - can you send me your HiTrack file? You can upload it here or as an issue on GitHub! Thank you!
[Huawei Watch] lio_pawel:
I uploaded two files. One is correctly processed, the other is missing a distance. Before adding cadence, all files were correct. In my files there is also a altitude at the end of the file. This is probably the last thing missing.
[Huawei Watch] aricooperdavis:
I've fixed the bug which wasn't displaying distances correctly (which I've put up on GitHub) and I'm currently working on adding Altitude information. I've got it generating TCX files but the validation package is throwing an error whilst trying to raise an error, so I'm struggling to debug it :laugh: I'll let you know when it's done :good:

Edit: Both changes now on GitHub :)
[Huawei Watch] grlazy:
[MENTION=9768249]aricooperdavis[/MENTION]:

IT WORKS .Also on garmin

this what i needed at first place and i hope it would cover other users needs.

Sometimes we don't have gps devices with us (just watch) and we find a single track at a shortcut to an other area etc.

So i needed to get it recorded somehow and and process it with Garmin's base camp (it works there too,but it cuts off the HRM data) so to have if for future use.

HRM data can be viewed via the app , no trouble there (i always remember where i almost fainted).

Some notes:

Route/track is there.No question about that.

Don't have Huawei phone so root is the only way for me to get the files .Unless a backup software like TItanium can take the files and restore them elsewhere

Have a look at Garmin.Heart rate data seems to be scattered (i had a suspition that the hitrack file wasn't complete with HRM data). Don't really need them but other may have use for them

If hitrack isn't at place, open Huawei Health and go to ride/training record etc. and open Trajectory .This will make the Hitrack file to appear/create.

Here are some screen shots from HUAWEI HEALTH for you to compare the graphs

https://ibb.co/r5wk5y3

https://ibb.co/cYX4L0n

https://ibb.co/5hfDBF0

At elevation chart , the part with negative altitude is a watch bug.IT should be around 4m altitude (we were having coffee near sea,just before we start to destroy our selfs uphill). I am in talks with HUAWEI at the UK forum.

Thank you .
[Huawei Watch] lio_pawel:
Thank you for "Fix distance display bug". However, altitude, adds an external tool tcxconventer by option "Update Altitude". Correct altitude is automatically downloaded from the Internet. In Strava altitude appears correctly, you do not need to do anything there. Thank you again.
[Huawei Watch] aricooperdavis:
This is very helpful, thank you - I'll update the Readme with this information :) This makes me sure that these HiTrack files aren't how the data is stored, just a file that the app uses to facilitate displaying the routes. If we can find where the original data is we might be able to do more?

The heartrate data isn't included for every gps trackpoint, which is a shame. At some point I will work on adding an argument that interpolates heart-rate into each trackpoint, but this will be an oversimplification of reality so I won't have it doing that by default.
[Huawei Watch] JazzVH:
Holy heck you're a bloody legend! This is impressive. It also completely baffles me that Huawei hasn't made exports like this available in tha app itself, they should very clearly be able to do so. It's a clumsy process for now, but at least it's something, thanks very much!
[Huawei Watch] aricooperdavis:
No worries :good: It is a bit clumsy, but if there's anything you can think of that would make the conversion step a little easier let me know and I'll implement it! :)
[Huawei Watch] GiovaniM:
Leaving a little of the subject. The Huawei Backup App application does not work on xioami's phone. Does anyone have any tips on how do I back up my xiaomi phone?

Regards,

Giovani
[Huawei Watch] JazzVH:
Well, the neatest way to implement something like this would be on android itself of course, but I haven't got a clue how you'd get a Python script to run in-app. And implementing the API's for automatic uploads to Strava, Garmin etc, but then we're talking fulltime App development which is Huawei's job, not yours. I find it impressive how far this has come already, so many thanks.
[Huawei Watch] grlazy:
No , the data must be stored at SQlite files (i think) within /data/data/com.huawei.health/databases. They must be encrypted ( i tried open them but not good at it) .

I have a theory about that.

After my ride , i synced data with huawei cloud and then i flashed back my phone from miui to lineageos (and had it rooted) .

As soon as i got everything working , i started huawei health and had a look at the details of the specific ride (charts,info).

The Hitrack file wasn't at the folder , not until i opened the trajectory option at huawei health.

I believe that they export the file just to have it shown on a google map when we visit the trajectory option
[Huawei Watch] ediblemanager:
Running Python natively on android

Using termux (can't post links, see play store) you can run Python3 scripts on your android device. Once my Watch GT arrives, I'll be trying this (I've got a rooted device, so gaining access to the files should be simple). One step closer to getting the data off the device and into Strava!
[Huawei Watch] aricooperdavis:
I'll put those idea's in the roadmap, but progress on them will be considerably slower since they're bigger projects and there's less of an incentive for me now that I have a working option! :laugh: If I do go down the Android App route then it probably makes sense for me to start development using Kivy, as it has good cross platform GUI tools.
[Huawei Watch] Victormaceio:
I don't know why, but I can't install Huawei backup... Any idea?
[Huawei Watch] aricooperdavis:
So it seems that the Huawei Backup app is only available for Huawei devices! :'( This leaves any other android users to rely on rooting to access their data. There's a slim possibility that someone will be able to decompile the Huawei Health app and modify the manifest to make it debuggable using adb, then re-compile it. This would allow non-rooted non-Huawei users to access their app data. Unfortunately this is way beyond me at the moment.
[Huawei Watch] byggern:
Huawei Health on iOS

Huawei Health on iOS has the same problem with no possible method to export activity data.

Out of couriosity, I did the same approach as you on a iphone, backed up the phone with iMaze, and extracted all the files from the backup related to Huawei Health for iOS.

It seems like they are using a different data model on iOS, and I found GPS coordinates all the interesting stuff in a SQLite file.

The path on IOS under Huawei Health app is Documents\Wear_133.db

The file can easily be accessed with a SQLite browser, and if not Huawei listens to customer demand in due time and builds a export feature I will have a go at extracting the data to a portable format.

Regards

Geir
[Huawei Watch] seneca:
Thats a nice tool.

i works with files from a Honor Watch Magic.

many thanks
[Huawei Watch] undead_knight:
Im having an error 'Input file - reading: FAILED' with my file and the example one.

I know 0 about running python scripts. This is with v3

This is the code im running in admin cmd pointing to the test file.

'C:\Users\user\AppData\Local\Programs\Python\Python37>python.exe C:\Users\user\Downloads\Huawei-TCX-Converter-master\Huawei-TCX-Converter-master\Huawei-TCX-Converter.py HiTrack_1551732120000155173259000030001 -v'

Any hints as to what im doing wrong?

Uninstalled v3 and installed v2.7.16, Now im getting:

line 16
def parse_arguments() -> tuple:
^
SyntaxError: invalid syntax
[Huawei Watch] carlosgeraldo:
Hello could it show you how to install and configure python and also the whole procedure to export file to Strava. Something detailed a step by step for lay people! thankful
[Huawei Watch] TheJoker71:
Thanks... Huawei Band 3 pro... Perfectly uploaded to strava... Hopefully an android app will be coming soon... Thank you so much...
[Huawei Watch] too_old32:
Chinese Beta app has GPS export

Theres a new function on the Beta app thats been released in China that has GPS export. I need to get up to 10 posts so that i can share links etc.
[Huawei Watch] jupiik:
Thas great maybe if we sign this petition: https://www.ipetitions.com/petition/huawei-please-add-gpxtcx-export-and-sync-to

---------- Post added at 08:12 AM ---------- Previous post was at 08:09 AM ----------

I have created online petition on ipetititions com but I cannot post a link, search for "Huawei please add gpx/tcx export and sync to Strava to Huawei Heatlh app" :)
[Huawei Watch] zerozoneice:
does this work with any kind of workout? like swimming or outdoor bike?
[Huawei Watch] aydinglldg:
Sorry how you made this ? I cant see details under the HUAWEI HEALTH app files
[Huawei Watch] elfeneco:
Any new information concerning export possibility ? Thank you !
[Huawei Watch] grlazy:
Found a workaround when phone is not rooted.

i installed BLuestacks at my PC and rooted it via BSTweaker.Then i installed in bluestacks the huawei app and used the same account as at the app on my phone (were the watch syncs).

At Bluestacks i synced the Huawei health app with the cloud backup and then i followed the procedure and got the Hitrack file.

I suppose i have to sync the huawei app on the Bluestacks instance everytime , we will see.
[Huawei Watch] Iceshade:
Also interested, any updates ?
[Huawei Watch] plimboster:
Hi, how can i download "com.huawei.health/files/" data from samsung after i can't install Huawei Backup App and phone is not root
[Huawei Watch] onkelfeix:
Are those Hitrack files only generated by running with the Watch GT/2/Magic Watch ? Ordered the GT2 some days ago, will get it on monday most likely, and did a test-run today with the huawei health app on my rooted samsung note9 to see how this is handled. Don't find any hitrack files in the mentioned folder, so I guess it will just work with the watch, right?
[Huawei Watch] SwiftNano:
Hi All,

This is possibly not exactly what people are after as this method does not get individually defined workout / data files but if you log into HUAWEI ID and go to the privacy settings you can request a complete export of all your data and specifically request health data. This takes a day or so but you receive but you given access to a download which consists of a series of folders containing the data that your device is tracking and storing in the HUAWEI cloud (if you have this enabled).

I have not used any of the data yet but a quick scan of the JSON files looks to have GPS location, heart rate, pace, speed markers etc that I would have expected to be collected from the device. I think this data could be used for most peoples requirements although some manipulation of the data will be needed of these raw data dumps.

Hope this helps.
[Huawei Watch] Tamnan:
You can convert this file from Huawei to .tcx file by Hitrava and then upload to Strava ; If you are not bored to do.

https://github.com/CTHRU/Hitrava#installation
[Huawei Watch] gadg17:
Hi

Not sure what I'm doing wrong but I can't get it to generate an output folder.

I suspect the problem may be the integrity of the zip file I downloaded from Huawei but perhaps you could advise, please?

The zip contains these four folders:

Health detail data & description

Motion path detail data & description

Sport per minute merged data & description

SportsHealth data & desciption [sic]

All four folders contain .xlsx files and the first three also contain .json files of 1kb which appear to contain only a set of brackets [].

Thanks for any advice.
[Huawei Watch] HardCorePawn:
Maaaaaaate... this is brilliant.

I have installed rooted Bluestacks via BSTweaker... then installed the Huawei Health App, logged in with my Huawei ID... it autosynced all my data/workouts.

Using the file manager in BSTweaker, I can view the /data/data/com.huawei.health/files directory and copy of the the "HiTrack" files:

I have to manually select the older workouts in Huawei Health in Bluestacks to generate the HiTrack files, but once I have them copied over, I won't need to do it again.

NOTE: you will likely need to open the workout record, then swap back to BSTweaker file manager and click the "refresh" button in the file manager to get the "new" HiTrack file to show as the app only seems to cache a very limited number.
[Huawei Watch] Tamnan:
Now you can share work out activities from Huawei Health app to Strava with 3rd party app called Health Sync but you must use this feature only with a Huawei phone .
[Huawei Watch] datmir:
i want to import the hitrack files into the heath app, but the app dont show the activities... is there a import chance ?
[Huawei Watch] fpetit01:
Can I use this method to write in the Huawei Health database and send it to the cloud?. There are corrections to made in the weekly, monthly and yearly statistics of the Huawei Health App.

How can I make corrections in the Huawei Health database?.