[Nexus 5 General] bitdomo:
In this thread I am going to use adb backup command to backup user app datas and apks. I am aware of the fact that Helium backup does the same just with a nice GUI, but I beleive it is important to know these basic tools like adb backup. I know many of you just causal android users who don't like wrting commands and etc... but for people like me it was an interesting discovery that this magical Helium backup is not that magical at all.

What is adb backup?

Some of you may know that it is not possible to root your Nexus 5 wihtout a full wipe. Adb backup is a tool which let you back up your data on your phone without root. Then after root you can easily restore your data.

Adb backup parameters:

Requirements:

Ability to use adb command.

Have usb drivers installed. (Windows users)

Seting up adb and installing drivers are not part of this guide. If you have to do that then please use [MENTION=2872010]rootSU[/MENTION]'s great thread to find the guides you need.

Let's start!

Enable USB debugging on the phone.

Connect USB cable.

Open CMD or terminal window.

Depending on what you want to do, backup only user app data with apk or without apk or just certain apps, you will have many options. I will try to cover everything to serve everyone's need.

Type any command to CMD or terminal window which suits your needs.

After executing the command you will be prompted on your phone to start the backup:

You can give a password for your backup if you want

Select Back up my data on your phone to start the backup.

Option 1:

Backup only user app data with apk.

(Note: you can't backup paid app apks)

If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.

You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.

Windows: C:\Users\<username>

Linux: /home/<username>

Option 2:

Backup only user app data without apk.

If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.

You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.

Windows: C:\Users\<username>

Linux: /home/<username>

Option 3:

Backup system app data and user app data with apk.

(Note: you can't backup system app apks)

If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.

You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.

Windows: C:\Users\<username>

Linux: /home/<username>

Option 4:

Backup system app data and user app data without apk.

If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.

You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.

Windows: C:\Users\<username>

Linux: /home/<username>

Option 5:

Backup everything.

System app data, user app data with apk and sdcard content.

(Note: you can't backup system app apks and paid user app apks)

If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.

You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.

Windows: C:\Users\<username>

Linux: /home/<username>

Option 6:

Backup certain app or apps.

(Note: you can't backup system app apks and paid user app apks)

First find out the name of the app or apps you want to backup.

Go to play.google.com.

Search for your app or apps.

The name you have to input to CMD or terminal will be the end of the URL after the '=' sign.

Type following command to back up your desired app:

Example:

I want to backup Bloons TD Battles.

I search for it on play.google.com.

The URL for that is http://play.google.com/store/apps/details?id=com.ninjakiwi.bloonstdbattles

So the name of the app which I have to input is com.ninjakiwi.bloonstdbattles

To back it up I use the following command:

If I want it with apk

If I want to give a custom name for the backup file.

If you want to backup multiple apps then just write the app names like this:

List all installed apps:

Windows users type this command:

The name of the app will be after the '=' sign.

Linux users type this command:

Restore the backup

(Note: If you have backed up paid apps, then first install them from playstore before you restore your backup)

Enable USB debugging on the phone. (If it is disabled)

Connect USB cable.

Open CMD or terminal window.

Type the following command:

After executing the command you will be prompted on your phone to start the restore:

Enter your password for the backup if you have any.

Select Restore my data on your phone to start the restore.

Example:

I store may backups in the C:\backups folder.

I know I made a backup one week ago and I gave backup-2014-07-15.ab as backup name.

The command I use to restore the backup is:

Extras:

There is a adb plugin for Total Commander which has the option to handle your backup-restore operations. I found it more useful than Helium backup.

If you want to extract your backup then I can recommend you this tool. It works both on windows and linux, but you will need java to run it. It is a command line app. Read the README.TXT for usage.