4

Once upon a time, I ran this on an Android 4.3.0 Nexus 7 2012 running ParanoidAndroid:

adb backup -all -nosystem -apk -shared \
  -f backup-all-nosystem-apk-shared-201309132331 

Now I would love to restore at least one of those apps on my Android 4.3.1 Nexus 7 2013 running vanilla. (I haven't installed it.) I've preemptively ran:

adb backup -f backup-all-system-apk-noshared-20131027111818 -apk -noshared -all -system

and now I wonder: what could possibly go wrong if I restored the original backup? Would re-applying the backup I've just made on top of it get me to a... working system? Do I want to take additional safety measures?

4

Don't know if you figured this out or not, but Titanium Backup has a feature where you can import an ADB backup and then from there restore individual apps or all apps. Only down side, Titanium Backup does need root. That being said, I think it's worth it.

For details:
http://www.titaniumtrack.com/kb/titanium-backup-kb/titanium-backup-howtos.html#backup-without-root

In case that link goes away:

  • Connect your device and make sure its listed with the following command:

    adb devices

  • Run a FULL backup with the following command:

    adb backup -f FullBackup.ab -apk -all

  • This will create a “package” called “FullBackup.ab” on the current location in your command prompt. This is your backup package.
  • Now you can root your phone.
  • Once finished rooting, insert the “FullBackup.ab” package on your sdcard
  • Hit the menu button and look for “Extract from ADB backup” option. This will prompt you to search for the file. Use the file manager that you installed earlier and navigate to the directory and select the FullBackup.ab file.
  • Now restore like as if the backup was made with Titanium Backup. Don’t forget to make a fresh copy of the backup using Titanium Backup. You’re Done!
3

First: As you did a backup including all your apps, you cannot restore a single app from it easily1 (adb restore is an all-or-nothing; either you restore the entire backup, or nothing – there are no parameters to specify parts to be restored).

Second: If you'd create separate backups (one per app), a restore should be possible across devices and Android versions (at least "upwards", i.e. backup made on the same or lower Android version as you want to restore it to). I've done that multiple times successfully, even across different brands and Android versions, in this way. Though that's not a guarantee :)


1 There are tools available to decode/split files created by adb backup, especially for that reason: to be able to restore a single app if you didn't think of that when creating the mega-backup.

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.