Saturday, December 21, 2013

How to do a backup (no root required)

Accidents happens all the time...

Who among us didn't have a time when using their device, deleted a file or an app that you installed and 2 minutes regretted that? sometime our devices decides to be "crazy" and they show some error messages that won't let you use your device.

For that - a backup solution could always help.

In Android world, there are tons of applications for the purpose of backup and restore. If your device is rooted, you can use apps like Titanium backup which lets you backup and restore, but also remove unwanted apps (yeah, the kind that some vendors like to stick into devices, specially the phone companies), doing a scheduled backup, and even sync your backup with Dropbox/Google Drive and Box. Personally I used it on almost all my Android based devices, and I recommend it. Another backup solution is ROM Manager and TWRP, they're both different from Titanium backup, as they let you backup your entire device including recovery and other partitions.

If your devices is not rooted (like in the case of Slate 21, my device that I love), there is a backup solution which is called "ADB Backup". If you're the type who don't like to use command line, there is a Windows and Linux app called "Holo Backup", it's easy to use and self explanatory. If you do like command line (I like you ;) ) - read on...

First, you'll need to install ADB and become "Developer". If you used Android before and used the adb command, then you know what I'm talking about. If not, you'll need to install the "Naked" drivers (if you're using Windows) and the Android SDK (you can use the minimal version should suffice, and can be downloaded from here. Install both (don't forget to add to your path the android SDK path) and then open a command line and type: adb devices. If you're device is connected to your PC, with Debug enabled (on your Slate press Settings, scroll to the bottom, click on About, click 7 times on the build and you should see on the left a new option "Developer". Click it, select USB Debugging (your Slate will reboot, don't know why HP did this)) - then you should see a number with the word "device" - you're good to go!

Unlock your device, and open a command line on your PC (where you typed the adb devices command).

We need to decide where to put the file. I suggest a temp directory, so if you don't have one, create one (for example: c:\temp on Windows or ~/tmp on Linux/Mac).

Now lets do a full backup: run the command adb backup -all -f c:\temp\mybackup.ab

On your Slate screen, you'll see that an app has been launched and it asks your for password (if you want to encrypt your backup. You should use a password, but you don't have to), press the lower right button to start the backup and wait. The GUI is not very intuitive but you'll see on the screen that it process some weird package names, thats ok.

When it finishes, the app will close. Wait few more seconds and on your PC you should get your prompt back.

Congratulations - you have your backup. If you're a developer (or someone who like to write scripts), you can automate this, type adb help to see the commands you can use for backup and what to backup).

Take this backup, and put it somewhere safe, you might need it in the future. You can upload it to your Dropbox account or Google Drive, or SkyDrive or anywhere.

Need to restore? piece of cake: open the command line, and make sure you have the backup available locally, and type adb restore -f filename.ab (where filename.ab is your backup name). You'll see on your slate that the backup/restore app comes and asks for your password. If you didn't use a password, click on the lower right button to start restore and after few moments your apps and your settings would be back!

Here is a tip: Make sure you do a periodic backup. A backup from a year ago won't be much help if you lost some pictures that you took/moved few weeks ago.

Good luck.

1 comment: