yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] fvisagie:
What works on my Nexus 7 is to install ClockworkMod (CWM) Recovery, use that to make a full backup, do other stuff with the device, perhaps make a backup of that, restore the initial backup, etc. So far in my experience everything that was present when the backup was made gets restored, and only backup contents get restored. I.e. no data currently present will survive the restore, unless it happened to have been included in the backup.

IIRC correctly this approach requires unlocking the bootloader at least once initially to install CWM. That means you'll lose all user data at that point. Thereafter I found it more convenient to leave the bootloader unlocked, but you may chose differently. Also, the Nexus 7 automatically restores the factory recovery partition after rebooting, but I found that not to be any hassle having made the necessary backup/s.

Note: at its prompt I did NOT allow CWM to root the device.

If you merely want to back up user data and no apps in-between CWM back-ups (and potentially having to unlock the bootloader for installing it which in turn would clear user data), I find adb perfectly adequate for that.
[Samsung Galaxy Nexus] HJESUS:
I can try this procedure, but i dont like the idea to install programs in my device, i want something to backup to PC something like an image, and restore that image to another device.
[Samsung Galaxy Nexus] flipmode_11:
I'm really impressed with the topic. Thank you for taking the time to compile the info.

I'm backing up a stock Galaxy S4 i9505 device running OS 4.4.2.

However, I am a little confused on your explanation of the "-system" flag? Should I use it or not?

The same with "-shared"? Should I use it or not? I want to backup everything, but is -system and -shared superfluous?

It is not clear whether doing -shared will backup the internal SD card or external SD card.... or BOTH?!?! :P

Thanks for your help.
[Samsung Galaxy Nexus] WarioNeila86:
Hi [MENTION=2172164]flipmode_11[/MENTION]

I would say no to use "-system", as you probably are going to perform a factory reset or maybe you are going to flash a new rom. Anyway, you won't like to have old system applications in your freshly new rom or after a reset. On the other hand, I have made several backups of my Nexus 4 and "-shared" option has never worked fine. At this point, I would recommend you to make a copy of the folders/files you want to your computer (it can also be done with adb).

Regards!
[Samsung Galaxy Nexus] TwoLoops:
"Now unlock your device ... but no button on tablet screen to continue

I am new to this sorry if this is posted int he wrong place or has already been asked. I have tried a number of different searches with no results so far.

I am using adb for windows and successfully created a full backup. Now, I am trying to restore and I am prompted on my Samsung Note 10.5 SM-T800 to enter the current backup password but there is no button on the tablet screen to continue after I enter the password . . . . no "okay" no "continue" no "restore" - any ideas?????
[Samsung Galaxy Nexus] checkfrog:
only creates small file

Hi folks

in my case, it only creates the following file:

ANDROID BACKUP
1
1
none

What could be going wrong?
[Samsung Galaxy Nexus] wivane:
I have a problem.

My problem is once i type in the adb command nothing appears on my tablet to confirm the start of the backup. What am i doing wrong? The code i am using is below.

Once i run the code the backup file has been made but its 0 bytes. and nothing appears on the screen of the tablet once unlocked... i have tried restarting the tablet, changing the folder that the backup is made to. The tablet in question is an Asus MemoPad 7 ME173x and the device IS rooted. What am I doing wrong and has anyone else experienced this?
[Samsung Galaxy Nexus] flipmode_11:
Did you try this?

http://xdaforums.com/showpost.php?p=61262408&postcount=618
[Samsung Galaxy Nexus] kanwonbi:
very usefull post ....can you pls make a video for easy work
[Samsung Galaxy Nexus] leonardoroza:
Thanks
[Samsung Galaxy Nexus] Jayowend:
Anyone else run into device not found errors when the package list is too long?

The bit that's not really documented is that you can run

to get a list of installed apps, and additionally with the -s and -3 flags

Filter to only show system packages. (Like the Clock app to save your preset alarms :))

Filter to only show third party packages. (apps you installed on your own)

to pick out the package names (e.g. com.google.android.deskclock) that you want.

You can also check the end of the Google Play store URL of your favourite app to check its package name.

play.google.com/store/apps/details?id=com.google.android.apps.photos

Then using some online text formatting tools, turn the list of specific packages into one line, space seperated, and append it to the end of the backup command.

Example: to only back up the Facebook, Clock, and Google+ apps and data

But the one issue I keep running into is if that line is too long (something like ~> 1000 characters) and you have too many package names in one line, the backup won't start and adb.exe will return 'device not found'... anyone run into the same problem? :confused: I got past this by just splitting the line into smaller chunks and creating multiple backups.. but still a weird bug!
[Samsung Galaxy Nexus] jpcloudsurf:
its all sweet until..

i finally get the full back up prompt screen and then i try to choose to "back up my data" but it will not allow me to choose the option. i have to choose the other option cancelling the backup. Im not sure whats wrong. i tried to even give it a password but still wont let me back it up. Does anyone know what i should do or perhaps theres another way not using adb? thanks!
[Samsung Galaxy Nexus] KAKsmulan:
Disabling power management

I dunno if its just my phone (xperia c1505), but I have to disable power management and the 'screen lock disable data transfer' feature to make the backup work, otherwise the phone just disconnects as soon as screen lock timeout is reached. And that will happen with a full backup, sooner or later :p

Would be good to add a note about that in the instructions. Might help more users.

Thanks anyway for a great write-up. (I did press the thankyou button :D)
[Samsung Galaxy Nexus] Charles Darke:
I just tried to backup my old rooted N5 with cracked screen to transfer to my new rooted N5 (Android M).

It appeared to copy over 7GB of data, but in the end none of the settings seemed to have been copied over. e.g. Google Authenicator data, app account settings etc. perhaps this was due to the -noshared option. Will try again...
[Samsung Galaxy Nexus] bgodhania:
hi there

trying to backup my galaxy s6... adb devices found ok and connected ok but when try to put backup commend "adb backup -apk -shared -all -f C:\Users\bhavesh\backup.ab" comes with error adb: unable to open file c:\users\bhavesh\backup.ab

can anybody tell what i m doing wrong... please help
[Samsung Galaxy Nexus] GCalzo:
You may not have write permission (strange if your account is bhavesh!) on that folder...

Try to save somewhere else (I save on an USB disk) or try to save directly on you desktop using envar:

adb backup -apk -shared -all -f %USERPROFILE%\Desktop\backup.ab (or your docs' folder using %USERPROFILE%\Documents\backup.ab)
[Samsung Galaxy Nexus] bgodhania:
thanks for quick replay

still the same tried all that but no difference...
[Samsung Galaxy Nexus] GCalzo:
I have done a script that:

list all APPS

extract just the app's name

build and execute the adb command for the single backup, one after the other

I have done that because Helium (my MotoG 2014 is not rooted!) is saving only user apps/data, I want the system's one too but it's much more flexible to have the single apps just in case you need to recover only one!

IE: I had to remove the recently updated Google's Clock, reverting back to the stock one: that has deleted all my alarms! :crying: Fortunately I had a recent full backup made with adb so I was able to restore just the Clock one after recreating a single app backup by following the info from ADBextractor (credits to http://xdaforums.com/google-nexus-5/general/guide-backup-data-root-t2824790 )

The problem with my script is that I must then accept each backups on the phone... :eek: ...and that is a pain... so I gave it up until I found a way to automatically press "backup..." on the phone...

---------- Post added at 11:53 ---------- Previous post was at 11:43 ----------

Did you try with a different disk too? Like and external USB drive?

Try without the -shared (from what I have understood reading here and there is much more secure if you save your SD manually than using the -shared option! Personally I use the sync feature in MyPhoneExplorer to save both the internal memory and the SDcard)

BTW, which adb version are you using? I'm using http://xdaforums.com/showthread.php?t=2317790 on Seven 32bit
[Samsung Galaxy Nexus] bgodhania:
thanks again

did try with different disk it creats a backup.ab folder but still comes with same unable to open file.. removed -shared but still same ... and just download the adb link u provide but still same...
[Samsung Galaxy Nexus] GCalzo:
Sorry but my little knowledge stops here... :) I haven't anything else to suggest...

BTW that "backup.ab folder" was a typo and you did want to write "backup.ab file"?? Because it's a file that should be created and not a folder with that name using the path I gave you... :confused:
[Samsung Galaxy Nexus] pitcher85:
Was the same for me, seems like they changed the expected format for the path.

At the end I tried it just with -f backup.ab (without any drive) and it worked.

Full command:

adb backup -f backup.ab -noshared -apk -all -nosystem

I started my cmd.exe as administrator and having the adb path in the system variables

=> my backup file then got stored in C:\Windows\SysWOW64.
[Samsung Galaxy Nexus] bgodhania:
wow

worked in first go.... so happy.... thank you so so so much.... been trying since 3 days.....

just curious what will be restore commend ??? will be really helpful.....thanks again...
[Samsung Galaxy Nexus] pitcher85:
Just navigate to the path of your backup file (e.g. cd C:\backup_20150925\) and call the restore just with the filename without path.

By navigating to a specific path you can also define where the backup file will be created (the C:\Windows\SysWOW64 is only used if you don't navigate to a path).
[Samsung Galaxy Nexus] GCalzo:
Actually I'm qualifying both ADB and the backup, I have a script and the backup is saved on a subdirectory of the current one...

I'm wondering where is the difference... :confused:

%$adbPath%\adb backup -all -apk -f Giangi\AllApps_%dt%.ab
[Samsung Galaxy Nexus] DeadXperiance:
I have Xperia Mini and running on CM 12.1

I type this code

adb backup -apk -all

after completed phone gone on home screen.

and I found a file backup.ab in adb folder it's size is 8.09 MB

so my question is that the size of backup is enough ?
[Samsung Galaxy Nexus] GCalzo:
Absolutely not! My last full backup is 1,35 GB! Your looks like more a single app backup than a full one...
[Samsung Galaxy Nexus] DeadXperiance:
I want to backup SYSTEM,SYSTEM APPS and DATA, and DOWNLOADED APPS and DATA. don't SD CARD. So what command should I use?
[Samsung Galaxy Nexus] WastedJoker:
oops wrong thread
[Samsung Galaxy Nexus] gontie:
Thanks a lot for the guide,

I just need help for one thing.

Is it possible to backup only certains apps, if yes, how ? the <packages...> is not very clear for me.

Thanks.
[Samsung Galaxy Nexus] GCalzo:
You are right, that part should be explained better and integrated with more info. Here you are what I have found Googling around!

The easiest way to get the name that should be used it to list the packages using another adb command:

adb shell pm list packages

I prefere to have two lists separated by:

system's app using the flag -s

users' app using the flag -3

So I use these two commands:

adb shell pm list packages -s > AppsSYS.txt

adb shell pm list packages -3 > AppsUSR.txt

You will get something like these (I'm pasting the first few lines of each files)

package:com.google.android.youtube
package:com.motorola.motocare

package:com.skype.raider
package:kr.smartools.sysinfo

The string you have to use is the one on the right after package: :)

Yes, it's not easy to understand the displayed name from such string, but even adding the flag -f isn't adding anything useful...

BTW, the output is a little bit malformed (I guess a bug on the parser or a strange behaviour in the Unix 2 Windows converter): the file has a wrong end-of-line which is neither a Unix one nor a Windows one, the EOL is 0x0D0D0A so there is an extra 0xOD for the Windows world. You may see an extra new line depending on the text editor you use! Personally I have scripted a command that after the creation is using vbscript to replace that string with the correct (Windows world) one 0x0D0A
[Samsung Galaxy Nexus] StephenMSmith:
So on non rooted phones, I can use adb backup -all -nosystem to backup the user data for installed apps and then restore to new phone with the same apps installed and all of my app logins, settings, etc will be there on new phone?
[Samsung Galaxy Nexus] AndyPopely:
I've always been able to perform an adb backup using the command adb backup -apk -shared -all -f D:\Android\Nexus5\YYYYMMDD.ab

But since upgrading the SDK platform-tools using installer_r24.4.1-windows.exe now when I use the same command I get the error message

adb: unable to open file D:\Android\Nexus5\YYYYMMDD.ab

and in the D:\Android\Nexus5 folder is an empty folder named YYYYMMDD.ab

To get the ADB backup to work I have to open the CMD window in the D:\Android\Nexus5 folder and then modify the backup command to

adb backup -apk -shared -all -f YYYYMMDD.ab
[Samsung Galaxy Nexus] pavlis.konecny:
Hello,

please I have a one question. The backup via command ADB BACKUP is a backup of ROM also?

I mean for example:

Just now I have android 4.0 on my phone. I will make a backup via adb command. I will make official update to version 4.5. I will not like this version.

Can I use ADB RESTORE command to getting back android version 4.0? Or backup is for personal data only?

Many thanks for answer!

Regards

Pavel
[Samsung Galaxy Nexus] GCalzo:
As far as I know the answer is "no". You need to root the phone for that...
[Samsung Galaxy Nexus] Wendigogo:
Or use a custom recovery and a nandroid backup. [emoji6]

Envoyé de mon X9076 en utilisant Tapatalk
[Samsung Galaxy Nexus] pavlis.konecny:
Thanks for answer! It is a pity that I can not use ADB for this.

I found some application "Online Nandroid Backup." This is for nandroid backup. But it requires ROOT permissions.

Is it some way to make a backup of ROM (operating system) without root? I dont need backup of applications. I am interested about operating system only.

It will be only for case downgrade android version...
[Samsung Galaxy Nexus] Wendigogo:
It mainly depends on your phone. If you can use fastboot and there's a TWRP or CWM recovery for it you can easily make a nandroid backup without installing root or anything else.

On your computer, copy the custom recovery and fastboot utility on the same directory

Start your phone in fastboot mode and plug it to your computer

Run : "fastboot devices" and check there's something in return (it's your device ID)

Run : "fastboot boot recovery.img" and wait a little. Your phone should restart in the custom recovery and you could make a nandroid backup with it.

Note that your device recovery is still here and that you can apply any official update.

But if you want to restore your backup you'll have to repeat this operation to start in custom recovery (the same).

Enjoy!

Envoyé de mon X9076 en utilisant Tapatalk
[Samsung Galaxy Nexus] NCguy:
But you must be unlocked?
[Samsung Galaxy Nexus] Wendigogo:
Yes, that's why it depends on your phone too. [emoji6]

Sometimes you just have to run "fastboot oem unlock" in fastboot mode for that.

Enjoy!

Envoyé de mon X9076 en utilisant Tapatalk
[Samsung Galaxy Nexus] NCguy:
Yup, that's all. That simple to wipe your entire device.
[Samsung Galaxy Nexus] fvisagie:
Remember that unlocking erases user data.

IIRC that also includes installed apps and system updates?
[Samsung Galaxy Nexus] Wendigogo:
It seems it depends on device. I'm pretty sure that it doesn't wipe my data on my Oppo devices. But it's good to know. [emoji1]

Enjoy!

Envoyé de mon X9076 en utilisant Tapatalk
[Samsung Galaxy Nexus] reg66:
i plan on getting a LG G4, and rooting it only, no unlocked bootloader as this invalidates warranty (without unlocked bootloader on the G4 i cannot install TWRP, so backing up this way is not an option).

with root, is there any command i can use to backup the WHOLE rom, which can be restored in the event of a bootloop?

many thanks
[Samsung Galaxy Nexus] Kocai:
Need help.

First of all, thank you for the guide. It really helps me since I don't use any apps to backup my data and apps.

Up until Marshmallow, I've been able to backup my apps and internal SD card.

Now it seems that the adb backup only backup my apps data. It doesn't backup my internal SD card.

Command adb backup -all -apk -shared -nosystem -f [path] only saves my apps data, which I check using adb backup extractor. There's no shared folder inside the backup.ab

I've tried using adb pull /sdcard/ sdcard and it only pulled the app data inside Android folder too...

My phone is Nexus 5 stock MRA58N unrooted.

I use the newest platform tools (v23) from the Android SDK on Windows 7 64 bit.
[Samsung Galaxy Nexus] yhlxda:
solutions to adb backup problems encountered

adb version 1.0.32 did not work for me. It created a 0 byte backup file. However adb 1.0.31 worked fine.

adb backup with -shared option on Galaxy Nexus with android 4.0.4 generates a corrupted backup file. I had to specify -noshared option to get a valid backup that includes shared storage. If you want to know more about this bug, visit

code.google.com/p/android/issues/detail?id=28303 Sorry, I have been barred from posting outside links.
[Samsung Galaxy Nexus] Fralund:
I'm trying to take a backup on my Nexus 6P running CM13, but nothing happens. I run "adb backup -shared -apk -all -f full-backup-2016-02-03.ab" and on the prompt it says "Now unlock your device and confirm the backup operation.". But then adb just exits and there is no prompt on the device. I run the same command on my Nexus 5 and it works just fine. Any ideas?
[Samsung Galaxy Nexus] ChingghisKhan:
I am facing the following problem:

I am running:

adb backup -f /backup/backup.ab -all

I also tried:

adb backup -all -f C:\backup.ab

same problem

When I looked in C:\ it had created a "backup.ab" file in both cases but with 0 kb

I have a set a Desktop backup password in Developer Option and I open CMD as Administrator.

My device prompts for the backup password but the failed "backup" is done in 3 seconds.

Device Samsung Galaxy S 5 AT&T, (SM-G870A), rooted Stock 4.4.2, locked bootloader.

PC: Windows 7-64 PRO and I am Administrator.

Thanks
[Samsung Galaxy Nexus] Oggiie:
Try it

Hello.,

I had the same problem in the past and the problem was windows security, try to direct your backup to your user folder! It worked for me!

About the password, I don't use it so I not sure if the password can cause some problem! I suggest you to remove the password for tests!

I hope that I having helped you
[Samsung Galaxy Nexus] KushagraJ:
What all gets backed up?

I am using a Moto X Play running Android M 6.0. I performed a destop full backup today using:

adb backup -apk -shared -all backup.ab

The backup completed within 10 minutes and has a size of only 1.54GB whereas my phone out of the 25.5GB available storage has only 2.1GB available free storage. I wanted to know what all gets backed up during this process as I am planning to do a factory reset and I don't wanna lose any data.

Please elaborate as much as possible.

Thanks. :D
[Samsung Galaxy Nexus] GunbleR:
i don't know 100% why and investigate it abit later, but with -all backup command and no password, my 1st mashine(both win7) w/ .32 version adb that i just downloaded did the 41bytes backup and another w/ .31 adb ver did proper backup.
[Samsung Galaxy Nexus] iancaz:
Great to see this is still useful after all these years!

One word of note. If you get a backup file with a size of 0k, update your ADB tools.
[Samsung Galaxy Nexus] rasr11:
Usage of shared option

Hi,

Can anyone explain when should I use shared option while backup. I am only interested in backing up game app data without apk. Do I really need the shared option in such scenerios?
[Samsung Galaxy Nexus] amiro13:
:good: tnx!;)
[Samsung Galaxy Nexus] karasahin:
Hi. I want backup everything there is on my device. Which codes I should use?
[Samsung Galaxy Nexus] DankNuts:
Thank you SO much for making this guide!

I was able to transfer the Steam app on my old phone running Android 5.0.2 to my new phone running Galaxy s7 6.0.1

I tried a few different apps with no success, especially difficult since my Galaxy S7 is Snapdragon and cannot be rooted.

At first I tried using "adb backup" to just backup the application data without the APK but that didn't work.

I checked Steam versions and my old phone had Steam version 2.1.4 while my new phone had 2.1.5, so I uninstalled Steam on my new phone and did a new backup on my old phone including the APK this time.

Simply plugged in my old phone and did:

Then unplugged old phone, plugged in new phone then did:

As soon as I launched Steam on my new phone it was instantly logged into my Steam account, awesome!

Checked all of my Steam Guard codes and they are the same on both phones! (have 11 accounts total hooked up to Steam Guard mobile authentication)

Also tested and was able to log out and back into my account on the app without it asking for a Steam Guard code (like it will do on devices other then the phone your account is tied to)

I was then able to update the app easily through the play store to the current version, no problems at all.

It appears the application and it's data made the transfer from 5.0.2 to 6.0.1 without a hitch!

This will also be perfect to keep a backup of my Steam app so I never have to go through the hassle of resetting/restoring my Steam Guard to a new phone :D
[Samsung Galaxy Nexus] tab4:
It was my first try with adb backup (using all available options on) A backup file was created. i was able to enter a password on the tablet, but i could not confirm at the buttom right - this was inactive.

when restoring to another tablet, i missed a lot of things: screen brightness and WLan setting, a firewall app (afwall), alternative keyboard, password that i used to unlock the screen and more.

This is not a "complete" backup in my eyes, so take one device, back it up, restore on a 2nd and the 2 devices look and behave the same. Quite disappointing. Did i do something wrong?

Also - ok i did not expect this - if the first deice is "rooted" and i restore it to a 2nd - shouldn't it be rooted too? because rooting is nothing changed on the hardware..
[Samsung Galaxy Nexus] dimmu.borgir:
its not working
[Samsung Galaxy Nexus] mongo0:
Is it possible to restore an android backup direcly from the shell of the phone?
[Samsung Galaxy Nexus] Neinkob:
Is there still no solution for this bootloop-problem? In my case I can get into recovery mode or Odin-Download mode without any problem, but when I start my phone normal it always restart while booting or a few seconds after android is usable. So it restarts in an endless loop. My phone is not rooted or unlocked. Is there a possibility to get my data (for example sms) from my Galaxy Nexus.
[Samsung Galaxy Nexus] Neinkob:
How did you get adb to work in recovery?

I got my Galaxy Nexus into "Android system recovery", then plugged it to my PC by USB. When I enter "adb devices" the "List of devices attached" is doesn't show any device.

USB-dubugging is turned off. (Unfortunately, I don't know how to change this because when I try to start my phone normally it gets stucked in a bootloop)

Lock Status is "LOCKED"

it is not rooted.

My PC runs windows 7. "Samsung USB Driver for Mobile Phones" is installed (Version 1.5.59.0)