[Amazfit] lfom:
Hello, All!

After upgrading my Pace to WOS2 beta, I have done lots of tests about syncing data and I think I have figured out how it works mostly, and probably the cause of common sync data errors, specially if another firmware was flashed. Please let me expose some facts, and fell free to ask any questions so this guide can be improved.

To make things shorter: CN = Chinese / EN = English or International.

- The QR code shown in the watch is always the same is a myth. It seems that it always identify the same watch, probably based on the Bluetooth MAC address of the device, but every time it is shown the chances are it will be different. It's a token actually: it allows the device identification in a unique way, without disclosing the real information(the MAC address). You can actually save one image and it will always refer to your watch, so for safety precaution, if you want to save the QR code, keep it safe.

- The QR code generated when the device is unpaired or factory reset actually shows if the device is a Chinese or International model, and Amazfit app in English (current versions, at least) won't pair if the watch is a CN model. I don't remember having this issue with CN Amazfit, but I am not sure.

- By the other hand, the QR code generated with the app on watch called BLE Connect is a "generic" one, so it can always be used to pair the watch.

- Now the fun begins... You can only bind a watch to one Amazfit app account, each account in the app has an unique ID. So if you ever paired your watch with a Mi account using a CN Amazfit app, all the data sent to the cloud will be bound to your Mi account. This means that if you pair the watch using another account without first unpairing it with the previous one, all the new data will be sent to the cloud using the old account as an identifier, because the watch is actually still bound to the old account. So if you delete the app and install again, sign in using the new account, the new data will be gone. You must be careful when changing accounts.

- To bind the watch to another account, you must unpair it with the old account using Amazfit app. You don't need to factory reset the watch, but it will be easier to show the QR code to pair with the new account, of course. You can put the watch in airplane mode, unpair in Amazfit app and the watch won't be erased. But then you need to manually show the QR code on watch to pair again (see tips below).

- Once the activity data is saved to the cloud, it is bound to the account that the watch was also bound to at that moment forever, using a token that identifies the account bound to the watch, and not necessarily the current account used in Amazfit app. So you cannot simply pair the device in Amazfit app hoping that the data on watch will go to the new account, it won't happen. It may show in the new app, but it's bound to the old account, so if you re-install the app using the same account the new data won't show up as explained previously.

- Now this explains why some people can sync data with MiFit while other can't: the watch must be bound/paired to the same account used in MiFit. The sync with MiFit isn't done via Amazfit app, but via the cloud, so MiFit will only show the data if the watch is bound to the same account in Amazfit app.

- It seems that this is the case for Strava too, and this explains why some people can use CN Amazfit app and still have the activities sent to Strava. But the data will be bound to the account used in the EN app, so if you re-install Amazfit the data is gone too. Data is sent to Strava even when phone is in Airplane mode and data is uploaded using the watch. AmazMod seems to work with Mi accounts to enable Strava sync too. Keep in mind that if there is any problems syncing with Huami servers or your account when you send data to the cloud, it won't be sent to Strava later, you have to upload the activity manually, either exporting on watch as GPX or using my AmazeBackup tool to extract data from watch.

- This also explains the fact that if you re-install the app using the same account that is bound to the watch, it will already show the watch connected (if you didn't erase the watch, of course), or simply ask to pair the Bluetooth again if it was erased, because the account still have the watch bound to it.

- When you pair a watch that isn't bind to any account, Amazfit app will ask if you want to restore the data from the cloud to the watch.

- If you unpair the watch while it is connected to Amazfit app, it will be erased (factory reset). Also if you do a factory reset in watch settings while connected to the app, it will be unpaired.

- You can pair two devices of the same type with Amazfit (at least using version 2.4.0 or newer), but in MiFit you cannot pair different types, for example one MiBand and one Pace (you can add other devices tho).

- You can only pair the watch with one Amazfit app.

- Tips for trying to fix Strava sync: logout from your account on Amazfit (I recommend using the latest Play/AppStore version for enabling Strava sync), go to Strava website -> Settings -> My Apps and revoke Amazfit access, then login back to Amazfit app, the watch should be paired automatically meaning it's bound to this account, then go to your profile and add your Strava account again. Only new activities saved after doing this will be sent to Strava, old ones have to be exported manually (see tips below about using your computer to get the data into GPX or TCX).

So to be safe, it's very important to pair the watch and use the same account always in Amazfit app, this way the data will be always in sync and safe in both watch and app. If you ever decide to use another account, unpair the watch first using the Amazfit app or Factory reset on watch while still connected to the phone.

UPDATE: CN Amazfit 2.4.0 now supports all logins if the language isn't Chinese, so it should be much easier and painless to go from one firmware to another as you can login to both apps using Amazfit US, Google or Facebook.

OK, now the cool part, the tips.

1. You can show the QR code on the watch if you enable the hidden apps listing, and to do this push an empty (0 bytes) file named "launcher_config.ini" to the /sdcard (it is the same place where the folder WatchFace is). This can be done using any way you use to transfer files to the watch, for instance using adb:

adb push launcher_config.ini /sdcard/

2. There is also a command that opens it directly, but requites a watch with root enabled:

adb shell am start -n com.huami.watch.ble/com.huami.watch.qrcode.QrActivity

3. You can backup the sport activities directly using adb too (this won't affect the data shown in Amazfit app in any way).

For Pace/WOS1:

adb backup -f sport_data.ab -noapk com.huami.watch.sport

For Stratos/WOS2:

adb backup -f sport_data.ab -noapk com.huami.watch.newsport

To restore the data (it will erase any new data added since the backup):

adb restore sport_data.ab

Check other XDA threads about exporting the data to TCX directly from the watch, it's a good way to have a backup of the data and export it to any other service besides Strava. This is a link to my AmazeBackup tool, with support for both Pace and Stratos, all versions of firmware, that exports data to TCX and GPX:

https://xdaforums.com/smartwatch/amazfit/utility-amazebackup-backup-tool-pace-t3801165