Wednesday, November 8, 2017

How to fully backup non-rooted devices?



I know I'm asking for the close-to-impossible -- as a real full-backup certainly requires root permissions. But still there are many folks around not wanting to root their devices -- afraid of voiding their warranties or bricking their devices, or just not having their devices supported by any rooting method.


I also know there were a lot of questions asked already on this topic, and I checked all of them having the backup tag -- none covers the entire topic, all just have pieces, and especially people new to Android (but other non-power-users as well) would have a hard time figuring out the best way.


So I want a detailed canonical answer to the question:


Not involving root-solutions, how to achieve a backup as close as possible to a full backup?


Please do not give simple one-liner answers like "Use app xyz [full-stop]." If mentioning an app (and I doubt a single app would be the answer here), include what parts are covered by it -- as well as ideas on how to fill the gaps it leaves. (And to make it absolutely clear: I know the first thing coming to mind is Titanium Backup -- I use it myself, but this does not apply here: This question is strictly about methods for non-rooted devices!) Moreover, the answer should be as generic as possible in terms of applying to a wide range of devices (i.e. it should not be restricted to one device or manufacturer).


I already mentioned having investigated all questions here tagged backup. These will certainly be helpful providing details for answers here, so I will list up the topmost ones concerning my question:



All these provide some details for my question (so feel free to get inspired by them) -- but I feel there are still details missing. Also it would be helpful to have a summary -- say, an answer including the full description of "the maximum possible".


A last criterium: While I'd consider cloud-based solutions legit, I'd favour local solutions. If you can provide both: all the better. But some people value privacy quite high (I'm one of them), and thus would not trust their data to some cloud service.





Thanks to Ryan, we now have a solution for a really complete backup of all apps and their data -- which I didn't dare to hope for! The only disadvantage: His solution only works for less than 10% of all Android users; namely those whose devices are running at least with Android 4.x.


So again, I ask the close-to-impossible: Any solutions applicable at least on Gingerbread (2.3.x) or, better, even Froyo (2.2.x) -- so they cover the majority of current devices? These solutions may involve multiple tools (try to keep it as simple as possible though; think of your mother to follow your instructions ;)


And keep in mind: NO ROOT!




To further motivate high-quality answers (and hopefully avoid low-quality ones), I will be a harsh one here: As I rarely do, I will down-vote answers not fitting the mentioned criteria on one end -- but on the other end, I will setup a bounty for the best answer (which cannot be done immediately, but earliest after 2 days).



Answer



Solution Available for 4.0+ Devices:


For 4.0+ devices there is a solution called "adb backup".


Note: This only works for apps that do not disallow backup! Apps that disallow backup are simply ignored when creating a backup using this way.


This makes use of adb so you have to have the Android Software Development Kit (SDK) installed on your computer (on some Linux distributions: just packages android-tools-adb and android-tools-adbd).




The options for the adb command are:


adb backup [-f ] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|nosystem] []


  • -f : the path of the *.ab file that will be saved on your computer. This file is a compressed file that contains an archive of the data/apks from your device.

  • -apk|-noapk : indicates if the *.apk files should be backed up (default is -noapk)

  • -obb|-noobb : enable/disable backup of any installed apk expansion (aka .obb) files associated with each application (default is -noobb)

  • -shared|-noshared: enable/disable backup of the device's shared storage / SD card contents (default is -noshared)

  • -all : indicates that you want the entire system backed up. you can use the packages filter to just backup specific packages, or use -all for a full system backup.


  • -system|-nosystem: indicates if all the system applications and data are included when backing up. (default is -system)

  • : this is where you can list specific packages to backup. Use these if you want to back up only specific applications. If using -all, you do not need to specify packages.




How to backup your device:


First, you need to enable "USB debugging" on you Android device:



  1. Go to "About device" (or "About phone" or "About tablet") section in Settings

  2. Tap 7 times on "Build number" row (usually the last row). After that "Developer options" section will appear in Settings



Enabling



  1. Go to "Developer options" section in Settings

  2. Tap the "USB Debugging" checkbox


Enabling


Second, on your PC from the command prompt you will need to be able to locate both the adb command and your backup file. The easiest way to do this is to run the adb command from the directory where adb is located.


In Windows Explorer navigate to where you installed the Android SDK and SHIFT+RIGHT CLICK on the platform-tools folder. shift+rightclick


This will open a command prompt (your window will look different than mine).


In Mac's Terminal you can type cd and then drag the folder platform-tools folder from finder to the terminal window and the path will be inserted. Hit and you will be in the right place.



In Linux, I hope you know how to locate and cd to the parent directory of the adb command. You are using Linux after all.


From here type the following command:


Windows:


adb backup -apk -shared -all -nosystem -f backup08262012.ab

Linux & Mac


./adb backup -apk -shared -all -nosystem -f backup08262012.ab
## Notice that -all doesn't mean ALL. See the big bold NOTE at the top of this answer.
# drop the `./` in the command if you are using `android-tools-adb` package


(if you want to store the backup in a different directory, include a path for the ".ab" file as shown in the screenshot below.)


cmd


You will then be prompted on your device for a password (this is used to encrypt the backup):
backup screen


To restore, it works almost the same way.


Windows:


adb restore backup08262012.ab

Linux & Mac


./adb restore backup08262012.ab


Then you will be prompted for your password to restore on the device: restore screen




Now for the shameless self promotion:


Droid Explorer (v0.8.8.7+) will be able to handle this for 4.0+ devices. While Droid Explorer is currently optimized for Rooted devices, this functionality will work for non-rooted devices as well.


Droid Explorer will do full backups of the device and save them in %USERPROFILE%\Android Backups\. Within that folder is a folder named for the device, and inside that folder are the backups.


de backup


Double clicking on the Android Backup file will allow you to restore your device from the backup file.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...