22

I have a non-rooted Verizon Samsung Galaxy Nexus, and I wanted to try the "adb backup" feature. Possibly in preparation for rooting, but that's not really relevant to the question.
I want to back up everything.
I used this command on a Windows 7 command line:

adb backup -apk -shared -all -f c:\mybackup.ab

My phone prompted me for my password, which I entered, and clicked the button to begin the backup.

I let it run for several minutes, and the cmd window returned to C: prompt. On the phone, it was still flipping through filenames.

At some point, it stopped flipping through filenames but the back up selection buttons were still greyed out. C:\mybackup.ab existed, and was about 1GB in size, which is significantly smaller than I thought it should be, especially since I said to back up the apk files and the whole "shared" space (/mnt/sdcard).

What should I see (on the PC and on the phone) when the backup process completes? How long should I wait, if I estimate I'm using about 10GB of the 32GB of space?

Edit: ... and/or is that the wrong set of command line arguments?

  • I tried running it a second time, got a different filesize (more like 1.7GB) when it had returned to prompt, and my phone had its screen off and was unresponsive until a few seconds after i hit the power button and saw the boot animation (but not the google logo, like a "soft reboot") – Josh Sep 20 '12 at 1:57
  • 1
    Are you sure that the adb backup command is fully supported on an unrooted device? My only experience is using Galaxy Nexus Toolkit, and that gave me issues with backing up when I was not root. If it tries to backup protected system partitions, it will probably be denied. – pzkpfw Sep 20 '12 at 8:41
  • I thought that was the whole point of adb backup, from what I read about it on the Googlenet. If I were already rooted, I would use a more robust backup tool like Titanium. If I can't get adb backup working, then it's not the end of the world; it's just a big pain to reinstall everything (especially where the Amazon appstore is involved) and restore settings manually... and lose "critical" things like my Angry Birds progress. – Josh Sep 20 '12 at 12:46
  • 1
    If adb backup tries to backup things like /system it will fail for sure on an unrooted device. – pzkpfw Sep 21 '12 at 11:05
  • 4
    Tried again with -nosystem and it completed. The file size was 7.5GB which definitely sounds closer to correct, and the backup process actually exited on the phone. Can one of you please post your comment as an answer so I can mark it as "best"? – Josh Sep 22 '12 at 3:14
13

The adb backup command won't work fully on an unrooted device as it will attempt to backup things like the /system partition, and without root access the phone will deny you this for safety reasons. I'm glad to hear running it with the -nosystem flag worked out for you :)

If you want to do a complete backup you need to be rooted. The /system partition, according to this page:

contains the entire operating system, other than the kernel and the ramdisk. This includes the Android user interface as well as all the system applications that come pre-installed on the device. Wiping this partition will remove Android from the device without rendering it unbootable, and you will still be able to put the phone into recovery or bootloader mode to install a new ROM.

This means that your backup does not include anything related to your operating system, only your apps and their settings. If you decide to root your device, you can create a very solid backup from CWM Recovery where all partitions are backed up to the sdcard on the device, including the system and boot partitions.

  • Ended up here after trying the steps HERE. I'm linking because this is a key detail for those of us trying to backup a non-rooted phone (like the Verizon Note 4). Should the file size change as backup occurs? I decided to do -shared also and the phone is just sitting there on "Shared storage" with no file change. Wondering if that's expected behavior. – rainabba Jul 22 '15 at 18:59
  • I think the ability to adb backup /system varies on a per ROM basis. – jiggunjer Aug 28 '17 at 12:08
0

I know this is really old, but I just want to add that the phone should explicitly tell you that the backup is done using a toast notification, in the same way it does to show that the job started.

Also, in my case, with a non-rooted phone, it would get stuck trying to backup a specific app and the shared storage. To solve the first problem, I got a list of packages using this command and simply remove the failing one and the flag -all from the command: http://www.digitalinternals.com/mobile/android-adb-list-installed-package-names/416/

0

My own two cents

My backup froze at some application that was running in the background. I stopped the application and backup continued.

  • Umm, could you tell us how your post is addressing "What should I see (on the PC and on the phone) when the backup process completes? How long should I wait, if I estimate I'm using about 10GB of the 32GB of space?" – Firelord Aug 17 '17 at 12:26
  • @Firelord my bad I had another page open and may be I meant to answer on that. – Amanuel Nega Aug 17 '17 at 13:34

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.