1

I am using adb to backup some applications' data from my old phone to my new one. It worked fine for all apps except the one I purchased, it took me a while to figure that out since Android and its log were not showing any errors, instead it was telling me that the backup is complete and the log says:

D/BackupManagerService( 2121): Full backup processing complete.
D/BackupManagerService( 2121): Full backup pass complete.

and the generated backup file has a size of 549B (bytes)

Note: it says "Full" but it actually for a single package.

After searching I now know that Google added some kind of protection in Android 4.1+ to prevent people from coping protected applications between phones. However, I am not interested in backing up the apk itself as I can download the app from Google Play Store, instead I want to backup the data so I can restore it in my new phone and not have to deal with setting the application again.

Is there a way to do that without needing root access to the device?

Note: the old device is Nexus 4 (5.1.1 Cyanogen + root), while the new one is Nexus 6P (6.0 stock, no root).

  • Why don't you use Google Sync to back up application data? – SarpSTA Nov 10 '15 at 23:44
  • @SarpSTA: Google Sync works only for google apps. Google apps are already synced between Android phones if you use the same gmail account so I don't need to back them up. I want to backup third party applications that have no cloud sync abilities. – Fahad Alduraibi Nov 11 '15 at 0:00
  • 3
    Developer can also prevent backup for their apps (e.g. WhatsApp returning empty data). If you're rooted, perhaps you can use Titanium Backup, but I'm not sure if there's other way for non-rooted device. – Andrew T. Nov 11 '15 at 1:49
  • 2
    Give us the link for the app whose data wasn't backed up by ADB. I suspect the flag android:allowbackup="false" and if that's the case then forget backing up the app's data without root. – Firelord Nov 11 '15 at 11:59
  • @AndrewT. I use TitaniumBackup with all my previous phones, but I am trying to see if I can live with a non-rooted phone since google added the new permission control in Android 6. Not being able to backup your own data is nonsense and Google should provide a way to solve it. – Fahad Alduraibi Nov 11 '15 at 17:04
1

I changed the title from saying "purchased apps" to "protected apps" since I found, thanks to @Firelord, the problem that prevents me from doing the backup. These apps have the flag android:allowbackup set to false and that will not only prevent backing up the application apk, but also its data and setting and will prevent you from restoring a backup if you managed to have one. I tried doing a backup from my rooted phone using "Titanium backup", unpacked the apk using "apktool" changed the flag to true, singed the apk with my keys and restored the modified TitaniumBackup into the rooted phone, that allowed me to do the adb backup of the data. However, restoring the data to the original app on the new phone didn't work.

So the only solutions I know of are these two:

  • Use my modified and signed apk instead of the play store version, but that means I have to do the modification and signing whenever there is a new update of the application.
  • Or, root the new phone and use TitanimuBackup to restore settings.

and unfortunately it seems impossible to do it otherwise, not very convenient.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.