4

I just tried to make a backup from my Nexus 5 (before installing CM 11) It is unlocked but not rooted. On PC side I'm working with Ubuntu 13.10.

When I type

adb backup –all -apk -nosystem –f /data/Nexus5Backup/backup_17042014.abk

then my phone asks me if I want to backup and I confirm. But the terminal in Ubuntu immediately returns to prompt (~$) and my phone says the backup is complete.

When I type

adb backup –all -apk -shared -nosystem –f /data/Nexus5Backup/backup_17042014.abk

and also confirm that I want to backup then the terminal hangs at

Now unlock your device and confirm the backup operation.

The phone is displaying "shared storage".

But the weirdest thing is that in both cases the backup file (/data/Nexus5Backup/backup_17042014.abk) is never being generated.

How can I do a full backup? I already did backups in the past and they worked. Is this a bug in my Android version (4.4.2 KitKat)? And is there a workaround?

2

Is ADB hung or just inconsiderate in reporting on what it's doing?

I came here with a similar question; on Win7 adb backup -apk -shared -all -nosystem -f path\to\backup_file.ab the Nexus 5 reported "com.stuff.foo .com.stuff.bar" ... for awhile and then stopped for a very long time, 20+ minutes, on "shared storage". Jacking up the confusion and anxiety level, after I picked up the phone when the screen blanked, the display auto-rotated, and then from that point didn't show any status messages at all.

On the PC side, the console never reported anything other than the initial unlock device message.

What kept me hanging in was that the backup_file.ab was created, the time-stamp continued to match current time within a minute or so, and the file size was multi-GB and kept increasing slowly -- albeit in fits and starts -- one pause was about 10 minutes(!), and then jumped by 0.5GB in a single shot.

After more than an hour the phone the Backup/Encryption Password screen closed of it's own accord, and the PC console prompt became active again. Neither one exited with a message to indicate whether they'd finished successfully or in an error state.

Final .ab file is just under 8GB. Nexus > Settings > Storage reports 12.55GB total space and 500mb free.

I think perhaps you just didn't wait long enough (understandable given the lack of feedback!) and that perhaps Linux spawns adb as a background process? (thus the return to prompt).

  • ((next Q: how to verify what is in backup and that it is good?)) – matt wilkie Sep 13 '14 at 20:30
  • Actually the machine I used doesn't exist anymore. On my recent computer with a newer version Ubuntu everything works perfectly (The file is generated and immediately grows). Ubuntu 14.04 comes with a newer version of adb. So I guess it was a bug in adb. – Scindix Sep 19 '14 at 21:03
0

I asked this question some time ago and as I weren't able to fix it, I simply forgot about it. However as adb backup seems to work again for me and because it may be an issue for others I'll post here, what has changed since last time.

Actually an update fixed that issue. So I guess it was a bug. I can't determine which version it was but everything works fine at least since the versions of Ubuntu and adb you can see below. If the tip of matt wilkie doesn't work out for you and if you are using an older version of Ubuntu and/or adb I strongly recommend an update.

$ adb version
Android Debug Bridge version 1.0.31
$ lsb_release -d
Description:    Ubuntu 14.04.2 LTS
0

Just add

adb backup –all -apk -shared -nosystem –f /data/Nexus5Backup backup_17042014.abk

double quotes!

adb backup "–all -apk -shared -nosystem –f /data/Nexus5Backup/backup_17042014.abk"

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.