Tuesday, May 05, 2015

Android and full backup notes


these are the steps for a full backup Android phones on Linux.

  1. Download the SDK
  2. install and configure the SDK
  3. Enable debugging mode on the phone and connect it to the computer
  4. Create the backup

  1. Download the SDK
Not much to say here. From the download site under SDK tools only(if you are not interested in downloading the Android Studio as well) select android-sdk_{version}-linux.tgz and unzip with
tar -xvzf android-sdk_<ver>-linux.tgz
You need to have installed java.
  1. install and configure the SDK
 It is recommended to locate it under your home directory. if so, next
cd ~/android-sdk-linux/tools
./android
and install all the updates.

Optional but probably you will need that as well for efficiency. Open .bashrc or  .bash_profile and add:

export PATH=~/android-sdk-linux/tools:~/android-sdk-linux/platform-tools:$PATH
export PATH=~/android-sdk-linux/build-tools:$PATH
export LD_LIBRARY_PATH=~/android-sdk-linux/tools/lib:$LD_LIBRARY_PATH
Now you are able to run adb command from everywhere.
  1. Enable debugging mode on the phone and connect it to the computer 
On the phone now,

Settings>developer options>enable usb debugging.
  1. Create the backup
the last step requires from you to create a folder where the backup will be stored and run

adb backup -apk -shared -all -f ~/Backups/fullbackup-20130722.ab

obviously replace "~/Backups/fullbackup-20130722.ab" with you own folder and give any name on your file that you like.

To restore the backup
adb restore ~/Backups/fullbackup-20130722.ab

That is it. If you need read some extra notes look at http://www.all-things-android.com/content/android-device-backups which was also the resource of this article.

No comments: