Sometimes, a backup of a smartphone or tablet just isn't enough, especially if you have a number of (the same) devices that have to be quickly deployed (or redeployed). For that, you need a bit more power than Titanium Backup or Google Drive. If you want to do full-blown backup of devices, you must turn to the Android Software Developer Kit (SDK). With this powerhouse tool, you can easily create a complete backup of a device with a single command.
Let's walk through the steps for this process. I'll use Windows 7 as the platform.
Installing the necessary tools
The first thing you must do is install the following pieces of software:
Preparing your device
Once you've installed both of these tools, you'll need to set up your device to allow a connection between it and the Android SDK. What you must do is enable USB debugging. This is done from within Settings | Developer options. If you don't see Developer options, you need to enable it by finding the build number for your device (usually found in About | Software information | More) and tapping Build number seven times. Once you've done that, you'll see Developer options within Settings. Within Developer options, tap to enable USB debugging (Figure A).
Enabling debugging on a Verizon-branded HTC M8.
At this point, connect your device to the PC running Android Studio.
Install Google USB Driver
Open Android Studio and then, from the main window, click Configure. From the Configure window, click Android SDK Manager. When the manager opens, scroll down to make sure Google USB Driver is checked for installation (Figure B), click Install, accept the license, and click Install again.
Installing the remaining dependencies for creating an image.
If you're doing this for the first time, the download and installation can take some time, so be patient.
Testing the Android Debug Bridge (adb)
At the top of the Android SDK Manager, you'll find the exact path where the SDK was installed. Open up Explorer, navigate to that very location, and then go into the platform-tools folder. Hold down the [Shift] key, right-click within that folder, and select the Open command window. Now, test to make sure adb can communicate with your device, and make sure your device isn't suspended, by entering the command:
You should see your device listed in the output — in the form of a long string of characters followed by device (Figure C).
Testing adb's ability to communicate to your devices.
Creating the backup
It's now time to create the image. From within the same command prompt used to test adb, issue the following command:
adb backup -apk -shared -all -f C:\Users\NAME\backup.ab
Where NAME is the name of your Windows user name.
On the device, a new screen should appear. If you want to encrypt the backup, enter a password — otherwise, tap Back up my data. The backup will begin, and you'll find the backup file in the folder declared in the backup command.
Depending on how much data your device holds, this process can take quite some time.
Restoring the backup
The restoration process is simple. Connect the device to be restored and (from the same location you issued the backup command) enter the command:
adb restore C:\Users\NAME\backup.ab
Where NAME is the name of the same Windows user from the backup process.
Again, depending on how much data is on the backup, the restore process can take some time.
If the standard backup tools aren't enough, or you don't want to root your device in order to get a full backup, you need to turn to the Android SDK. The process works well, and the end result will be a full backup and restore of your device.
What do you use to backup your Android devices? Share your experience in the discussion thread below.
- Prepare your Android device for disasters with this master plan
- Get back that new car smell with your Google device
- Pro tip: Backup and restore you Nova Launcher home screen
- How to manage your Android device backup
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.