How to take TWRP Backup directly on PC via ADB

Gone are the times when you needed to make extensive ROM backups on your device, saving them either on your internal or Micro-SD storage. With the latest TWRP 3.1 update having been released officially, users will now be able to make direct backups of their apps and data from their PC itself.

For those not in the know, ADB (Android Debug Bridge) is a command line tool that allows you to access every nick of your Android phone via the command line. It’s a very powerful tool, and the latest TWRP 3.1 update has brought in support for ADB for taking TWRP (nandroid) backup directly on the PC.

Below is a handy guide to create an ADB backup using TWRP recovery. Follow it to the word and you should be good to go.

How to take TWRP Backup via ADB on PC

  1. Setup ADB on your PC.
  2. Connect your device to the PC via USB.
  3. Enable Developer options on your device:
    1. Go to Settings » About phone.
    2. Tap Build number 7 times until it says You are now a developer.
    3. Under Setting » Developer options, set USB debugging to On.
  4. Reboot your device into TWRP recovery.
  5. On your PC, create a new folder where you want to save the TWRP backup files. Then do Shift + Right click on any empty white space inside the folder, and select Open command window here from the context menu.
  6. Once command window is open, type in the following command to initiate TWRP backup:
    adb backup --twrp
  7. This will bring up the GUI and allow you to choose partitions from the backup page.
    2stepphone-e1489231772684
  8. Select the partitions you want to include in your backup and then Swipe to backup.
    1stepphone-e1489231797111
  9. Wait until backup process finishes. Once completed, you can disconnect your device from the PC.

How to Restore TWRP backup via ADB?

If you can take a TWRP backup via ADB, you can of course restore it back to the directly from the PC via ADB. To do that, do the following:

  1. Open a command window inside the folder where you saved the TWRP backup on your PC.
  2. Boot your device into TWRP recovery, and connect to the PC via USB.
  3. Issue the following command into the command window:
    adb restore --twrp

    That’s it. 

  • Prateek

    First of all thanks for nice tutorial
    I’m getting “Now unlock your device and confirm the backup operation” error

    • Kanav Sharma

      Hey Prateek, many people are encountering this error primarily because your command prompt (adb) fails to recognize that you’re connected to the TWRP recovery. I suggest that you re-insert the usb cable and reboot into TWRP recovery all over again, just to be safe.

  • Fred

    Same problem as prateek – nothing happens after ‘adb backup –twrp’
    adb devices recognises device is in recovery, twrp is booted, but nothing starts

    Is this possible using fastboot boot twrp.img or do i need to install recovery? I can’t see why that would matter

    • Fred

      Edit rebooted and worked 🙂