I am testing my custom BackupAgent. Below is my test in Simulator and Eclipse ADT
Verify 1 backup and restore using the ---- WORK WELL command
- Enabled bmgr shell adb
- adb shell bmgr backup app_package
- Launch bmgr adb shell ---------------------- Start backup (called BackupAgent.onBackup)
- In the application, I deleted some data
- adb shell bmgr restore app_package ------- Restore data from backup
- Everything is restored, including some data that I deleted in step 4 ------ WORK WELL
Test 2 Backing up / uninstalling the application / reinstalling the application ---- DOES NOT WORK
- Enabled bmgr shell adb
- adb shell bmgr backup app_package
- Launch bmgr adb shell ---------------------- Start backup (called BackupAgent.onBackup)
- adb uninstall app_package --------------- Uninstall the application after backup
- Debugging As / Android Application again ---- The application is reinstalled BUT BUT the data is restored (backing up data in step 3)
Update
- I found that Test 2 was working on a Nexus 5 simulator (API 19 - 4.4.2)
- BUT Test 2 did not work on Nexus 4 simulator (API 16-4.1.2)
Does anyone have any ideas? Thanks!
source share