0

I have made a full backup of my formerly unrooted android device using Android Debug Bridge, later rooted it and now would like to restore the backup while maintaining root access.

Will this work by restoring the backup with adb restore or will my phone possibly be unrooted (just like with a factory reset)?

Edit: My Samsung Galaxy Nexus GT-i9250 is currently running on Android 4.3, the backup was made with the same version using the command adb backup -apk -shared -all -f.

Update: I restored the update and my device is still rooted (checked with Root Checker from Super User), though a few apps and some data were not restored.

  • Would you say that the question is answered then? – MitchB Dec 30 '16 at 22:03
0

As long as you don't restore the system partition (I don't know whether this is backed up by ADB), your root access should be preserved.

You could just make a backup of the state of your device now and restore it, when needed.

  • adb backup backs up files, not partitions :) Still, the idea of another backup I support – just in case :) – Izzy Dec 29 '16 at 22:52
0

If you used systemless root(Android 6.0+), I'm not sure if that will remove your root access. If you used system root(Android 5.1 and below), this will not remove root.

Regarding,

adb backup -all

If this is the command you ran, this backs up only the /data partition, not any other partitions. For a full backup of /system /boot /recovery /data, etc. you would have to perform a nandroid backup from recovery.

  • Thank you! I ran the command adb backup -apk -shared -all -f and have Android 4.3. This means a restore would be safe? – xoxox Dec 29 '16 at 22:04
  • If you had ran the backup with the -nosystem modifier, I would say yes, there is a high chance of you being safe. Since you didn't specify, adb backup automatically backs up the system. This would unroot your device. You could install root after restoring from the backup though as root does not require your data to be wiped. – MitchB Dec 29 '16 at 22:35
  • @MitchB why would that unroot the device? I don't think it would remove files, just restore what was backed up. Still, restoring a system backup across different Android versions is strongly discouraged. – Izzy Dec 29 '16 at 22:54
  • @Izzy I have tried to find some documentation of the adb command but it is sparse. I am going off of what I found on this wiki and I believe that if it were to restore the /system partition then that would remove root if the root is /system based, which is likely given that @xoxox is running 4.3. Also, I don't think they said whether their backup and live versions are different. – MitchB Dec 29 '16 at 23:03
  • ADB backups are file based, not partition based. So to my knowledge, a restore would just write back the files from the backup, overwriting existing files, but not deleting anything. I never tried restoring a full backup, though, so I cannot tell for sure. – Izzy Dec 29 '16 at 23:06

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.