Shared publicly  - 
Android 4.0 ADB Backup/Restore
I switch phones quite a bit and the cloud is immensely useful for that, almost all of my #Android apps restore and most of the data is up there, even my wifi settings and wallpaper get reinstalled. But games are still lagging behind on this, they rarely keep their settings in the cloud or give a backup/restore option.

I really didn't want to lose my 'World of Goo' progress so I've just used adb backup/restore to pull it off one ICS device and push it onto another. Worked a treat.

The command lines I used:
> adb backup -f worldofgoo.bak com.twodboy.worldofgoofull
and a little dialog appears on the phone screen to confirm the backup and offer the chance to enter a password to protect.

> adb restore worldofgoo.bak
and another little dialog appears to confirm the restore

et voila, done. Other options on adb backup allow for full user data backups (-all), just type adb to see all options.
Gregor Baumann's profile photoTibor Soós's profile photoWantong Su's profile photoThomas Durif's profile photo
Doesn't your device need to have an unlocked bootloader though?
another beautiful solution is to root the phone and use titanium backup and store the backups on dropbox.
Hmmm, wonder what I'm doing wrong. Always getting "adb: unable to open file filename.bak or filename.ab"
+Rich Hyndman The other day I was trying
"adb backup -all"

Today I tried your command for just World of Goo.

The weird thing is, even if I have multiple devices connected it doesn't even bitch about specifying the device.
It works quite well, but it doesn't seem to backup APN's and accounts (by design?) if you do a full backup. It also offers encryption, which is great.
interesting. +Nikolay Elenkov I was wondering if you allowed it to also backup system apps whether APN settings etc would get copied, but maybe it avoids things in
It's looking like it's something Windowsy related. Maybe I'll just boot back into OSx. Don't really feel like dealing with this crap today.
how to set that google cloud system? it never work for me Backup and restore... that option in settings do nothing. I never not see any apps restored.
+Ing. Michal Ivanič it is pretty automatic, if you reset your device or sign into a new one the apps and settings should be restored
+Rich Hyndman thats problem it dont work for me...mybe becouse of root and custom ROM?
Got it to bring the backup activity up when I booted to OSx. But... can't ever click "back up my data" no matter how long my encryption password is. Oh duh, it asks for a device encryption password, which is not setup.... so ummm...
Do the backups work between different ICS versions / devices? Like from 4.0.1 to 4.0.3 or Galaxy Nexus to Nexus S and so on.
ADB works on any device, as long as you can enable USB debugging on settings, and you have the right drivers for the device :)

One thing to notice though, is that the title suggests "Android *4.0*", not sure if this functionality is exclusive to ICS devices.
+Ing. Michal Ivanič Custom ROM and/or root hasn't stopped the cloud backup/restore from working for me on multiple devices; however it's been a long time since I've seen my WiFi passwords restored on a Google sync on a fresh device.
+Mike DiGiovanni I noticed that sometimes you can't fully access a device with adb until you mount /system and /data. I don't know if this is supposed to happen automatically but it didn't on my Galaxy Tab 10.1 on my last backup. I used fastboot and a clockwork recovery image that gives the option to mount both and was able to do backups with adb with no problem. But I'm on a PC, don't know about Macs.
android app extension is "APK" .... Not worldofgoo."bak"
+Dwight Worley Yeah, not sure exactly what happened but a reboot of the phone worked. I can now press the back up button.
I just wish this worked in the real world on enough devices to keep users happy. Supporting things that only work with ADB isn't a real solution for the common app user.
+Mohammad AL-Rashed This feature backs up the app's data, not the APK. So the first parameter is a filename, which can be anything you like, whether "something.bak" or "very-important-data.nyan".
The first line, changing phones and using the cloud, is specifically about Backup and Restore. The title of the page also matches the title of the existing "Backup and Restore" feature in Android. Perhaps I was confused by the post. From what I see in ADB, bmgr and backup are closely related and seem to work together. But I am very often wrong about this type of stuff.
+Cory Trese indeed BackupManager came in with 2.2 and I believe bmgr forces an app that has implemented BackupManager to do that. But I'm still pretty sure adb backup/restore of an applications private data is only from Android 4.0 onwards and only via a cable.
+Rich Hyndman Forgive me, I'm just a bitter game developer who implemented BackupManager for game progress and preferences. I am happy that ADB works for you. From a Android/Google standpoint this seems like another poor implementation of a badly needed feature. You're clearly very savvy with this stuff but most Android users don't want to install ADB or run command lines. They just want it to work.
+Cory Trese it's awesome that you implemented BackupManager, thanks, I wish more games would do the same. It'll become more important in the future as more users have multiple devices, phones, tablets...
I love this game. I played the demo version on my Wii and I had to get the whole thing.
+Cory Trese God damn thank you. Can you share some tips with how you tested the backup manager? That's always been my qualm with implementing it in my apps, there was not a clear way to test the functionality across devices.
Thanks for this. Got it to work on Ubuntu but no dice on Windows 7 x64. It just says "adb: unable to open file <filename>" and the backup Activity doesn't launch on my Galaxy Nexus.
Someone please create a GUI for this to add it into DroidExplorer or AirDroid!
This is my main peeve about games on android, also some people forget the .NOMEDIA file and I end up listening to a load of sound effects!
+Rich Hyndman Hi, thanks for your great work. I really need this feature badly. Just now I tried it on my Nexus S running Android 4.0.3 and it works fine. Then I tried the parameter -shared before I realize that it will take a long time to back up the contents on my SD card. To stop the backup progress, I pressed Ctrl-C on my PC and back button on my phone. It appears that backup progress has been ended. However later when I tried to backup again, the prompt window does not show on my phone and there's only a blank file saved on my PC. Rebooting the phone and restart adb server both do not help. Can you give me some advice to solve this problem? Really appreciate!
My apologies...I found that I toggled the -nosystem parameter -all parameter. Perhaps a warning message or help message should be printed. :)
+Rich Hyndman Sorry for the disturbance but later I found that it's my fault, I toggled -nosystem parameter without -all parameter.
Although backup doesn't work on Windoze, restore does. I took a backup on Ubuntu, unlocked the bootloader (which wipes everything), restored on windows. This meant I could apply the 4.0.2 update manually using clockwork recovery without losing data so thanks again!
I tried adb backup on my Galaxy Nexus (so I could restore my settings after unlocking). The phone prompts for "my device encryption password" (which I never set) and nothing I enter allows me to press the "Backup my data" button. Any thoughts? Would having a corporate email security policy set (to sync with and Exchange account) cause this? I've tried removing that mail account but it doesn't seem to eliminate the problem.
+Jeff Schriesheim are you using an app that does an overlay ? or an app where you can do some gesture on the screen?

As a security feature, if you have something obscuring your screen, even if it's invisible, you can't press certain buttons. This button is one of them, the 3rd party app install is another.
I tried this for two individual games moving from one JB phone to another and neither worked. It says that the restore ended and everything looks like it should have worked, but when starting the game none of the progress/preferences have been restored.
I need to migrate app data of some apps from Gingerbread (rooted) to KitKat (unrooted). Can you please help?
+Rich Hyndman Helium isn't compatible with Gingerbread & Titanium Backup needs rooted KitKat. Is there a way to make backups made by Titanium Backup compatible with ADB restore you mentioned?
I've never tried the Titanium solution before so unfortunately I don't know format it uses to store the files. 
Add a comment...