How to Backup and Restore your Android Device with adb

By | 2014/11/09

Backup your Android Device with adb! No root required. This procedure backs up your device to a single file which can also be easily restored.

1. Enable USB Debugging on your Device


2. Run adb devices to verify device is visible

$ adb devices


$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
06649f1ef0ec7bc1        device

3. Backup with adb backup

The command to create a backup is:

$ adb backup -apk -shared -all -f mybackup.ab

As an example, consider tacking on the date to the file name:

$ adb backup -apk -shared -all -f nexus5_444_2014110501.ab

For best security, provide a password on your device for the backup.

The backup can take 5-10 minutes depending on the size of your backup.


Restoring from backup

Restoring replaces your phone contents with the backup.

To restore, use:

$ adb restore mybackup.ab

Example restoring my backup file:

$ adb restore nexus5_444_2014110501.ab

5 thoughts on “How to Backup and Restore your Android Device with adb

  1. JK

    Brilliant. Have been looking for a way to back-up from the command line. thanks!

  2. Russ

    I get this message:

    adb: unable to connect for backup

    Any suggestions?

  3. michael s.

    Can anyone help ? adb backup does not seem to do anything for me…
    – galaxy s7 edge with 6.0.1. Marshmallow
    – adb installed ( latest version )
    – usb debugging / dev turned on
    – connection with usb cable
    – “adb devices” shows a good connection

    when I run the adb command
    “adb backup -apk -noshared -all -f backup.ab”, there is no backup.

    I get the message:
    “now unlock your device and confirm the backup operation”

    but the mobile phone does NOT show any sort of “full backup” screen or operation and
    the backup file shows 0 bytes.

    1. anos888

      dis u enable password on ur phone.?? i think u need to enable “password” for backup to work?


Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.