[Amazfit] pkondrat:
Hi,

need your help with TrainingPlan app.

After reinstalling Amazfit Watch app, I had to pair the phone with watch again. Don't know why but after sync, TrainingPlan app got wiped.

It's not that big of a deal, because all the activities are still recorded on the watch/mobile/strava but I was in the middle of half-marathon training plan and would like to continue it.

In order to restore/recreate this data, I need to know how exactly this app is storing it.

I have already reviewed the source code available on gitlab.com - /Neuer_User/PACEfied_AmazFit

I have also downloaded the TrainingPlan.apk directly from the watch (with adb) and decompiled it (apktools) and reviewed the app in IDE.

Here is the content of AndroidManifest.xml from TrainingPlan:

...
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permisison android:name="com.huami.watch.permission.RECEIVE_WAKEUP"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="com.huami.watch.companion.permission.READ_SETTINGS"/>
<uses-permission android:name="com.huami.watch.companion.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="com.huami.watch.permission.WRITE_USER_SETTINGS"/>
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:name=".TrainApplication" android:supportsRtl="true" android:theme="@style/train_center_theme">
<meta-data android:name="com.huami.watch.launcher.springboard.PASSAGER_TARGET" android:resource="@array/spring_depend"/>
<activity android:name=".ui.test.TestProvider"/>
<activity android:name=".ui.activity.TrainPlanSimpleSelectActivity" android:theme="@style/train_center_theme">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainPlanSimpleSelectActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainPlanDetailSelectActivity" android:theme="@style/train_center_theme">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainPlanDetailSelectActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainRecordDetailActivity">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainRecordDetailActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainWeeklyRecordDetailActivity"/>
<activity android:name=".ui.activity.TrainWidgetRemindActivity"/>
<service android:name=".ui.notification.NotificationService"/>
<receiver android:name=".ui.notification.NotificationReceiver">
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.daytrainrecord"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.finishtrainrecord"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.start_service"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.end_service"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.appstart"/>
</intent-filter>
</receiver>
<receiver android:enabled="true" android:exported="true" android:name=".ui.notification.CloudDataReceiver">
<intent-filter>
<action android:name="com.huami.watch.companion.action.DataSyncRequestApps"/>
</intent-filter>
</receiver>
<provider android:authorities="com.huami.watch.train.ui.provider.dayTrainRecordProvider" android:exported="true" android:name="com.huami.watch.train.ui.provider.DayTrainRecordProvider"/>
<activity android:name=".ui.activity.FinishTrainReasonActivity"/>
</application>
</manifest>

Still no luck.

Can anybody help?