Using adb to Fullbackup an Android Device

Sunday, February 3rd, 2013

While trying to get a Android Backup using the the adb tool in the Android SDK on my Samsung Galaxy Nexus I ran into issues so I figured I would document what worked for me so the next person doesn’t have to suffer.

First, you need to install the Android SDK. That part is pretty straight forward, just use the bundle download at the link here http://developer.android.com/sdk/index.html. The only issue I found with this step is that the system tool ‘monitor’ doesn’t actually run on a Windows 7 installation that has a user name with spaces in it (1). That one messed me up big time. The simple workaround is to use the ddms tool in the tools folder. It will warn you that it is deprecated, but just ignore the warning.

Next big obstacle that was not at all obvious to me was that I had to install Samsung USB drivers to get the debug mode working. I found the drivers at the link here Samsung USB Drivers Note that the drivers at this link must be a bit outdated since first time I connected my phone Windows 7 spent 15 minutes going out to the windows update site and downloading updates and applying them.

Final obstacle was to understand how to make it all come together. Here’s the steps I had to take;

  1. Start ddms so it is running.
  2. Connect your phone via USB. If the device drivers need updating, let them update before going to the next step.
  3. Open a command prompt and switch to your sdk folder then the platform-tools folder and test adb to make sure it sees your device. The command below should display your device, if it doesn’t, recheck all your work.
    adb devices
  4. Once you know adb sees your device, issue the backup command line as follows:
    adb backup -f Backupfilename.ab -all -share -apk
  5. You will see a prompt on the phone to permit the backup. If you enter a password, the backup will be encrytped, if not it will not. Either way, you need to approve the backup on the phone by selecting backup my data.

For a loaded phone, the backup will take some time so be patient and let it run.

 

(1) Note that Rev 22 of Android SDK Tools fixes this problem with monitor, so go ahead and use monitor instead of the deprecated ddms. May 23, 2013