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: 
  7. adb backup --twrp
  8. This will bring up the GUI and allow you to choose partitions from the backup page.
  9. Select the partitions you want to include in your backup and then Swipe to backup.
  10. 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:

  4. adb restore backup.ab