Now my phone had a lot of data, none of which I wanted to lose. Google’s cloud-based backup service unfortunately doesn’t do much in my experience, and the total amount of data I had (over 2.5 GB) was pretty large anyway, so I decided it’d be best to use my computer to do a full backup and restore.
Full backups, restores and data transfers have always been a big issue with Android. Android 2.x requires you to root your phone and then use an application like Titanium Backup, which is honestly ridiculous. Android 4.0 is actually a lot better if you’re willing to use the command line a bit. adb for Android 4.0 has working “backup” and “restore” commands, no rooting required.
Here’s my setup: I wanted to transfer all my applications, settings and data from an encrypted Nexus S running Android 4.0 to an unencrypted HTC One V, also running Android 4.0. The instructions should work for any pair of Android 4.0 devices.
I first made sure I had all the prerequisites. You essentially need most of an Android development environment on your computer.
- Download the latest version of the Android SDK for your platform, then run the SDK Manager and make sure you have the latest version of the Android SDK Tools and Android SDK Platform Tools.
- If you’re on Windows, you’ll also need the ADB USB drivers for both devices. The Nexus S drivers can be downloaded via the SDK Manager, while the HTC One V drivers are part of HTC Sync. (The HTC drivers are a pain to install: you need to force-install the “My HTC” drivers from
C:\Program Files (x86)\HTC\HTC Driver\Driver Files\Win7_x64. Ridiculous.) For other OSes, see these instructions.
- If you’re on Windows, let the HTC Sync installer install the prerequisites (including drivers), but do not install HTC Sync itself. It comes with its own, older adb that interacts badly with the SDK’s adb.
I connected the Nexus S to my computer and turned on USB debugging on the phone. Then, from the
platform-toolsdirectory inside the SDK folder, I issued the following command:
adb backup -all -apk -noshared -nosystem -f nexus-s-backup.ab
See this guide for a complete list of options for the
On my Nexus S, a prompt (screenshot to the right) showed up asking me to enter my encryption password. I did so and moved ahead.
I now connected the HTC phone to my computer and turned on USB debugging. There’s one more thing I needed to do: in Settings -> Developer Options, set the Desktop Backup Password to the encryption password from step 3.
I then issued this command from the
adb restore nexus-s-backup.ab
Another prompt (screenshot to the right) showed up asking me to type in my encryption password, even though this phone wasn’t actually encrypted. (Very confusing!). I found I had to type the encryption password from my Nexus S into both fields – this was the only way the restore worked.
I finally copied the SD card’s contents manually. That’s about it. Most apps were restored properly, and whichever apps I downloaded from the
Android MarketGoogle Play Store showed up as installed there. A few didn’t make the cut: most notably Google’s 2-step Authenticator. I’m not sure why.