I wanted to back up everything on my phone: call logs, messages, whatsapp texts, photos, videos, screenshots, screen video captures, recordings, app data... and everything else, before selling my phone. So, basically, data-wise, I wan't to create a clone of the (entire) current state of my phone. I don't necessarily wan't to restore all of it on my new phone, but I want to be able to access the stuff that I backed-up on my computer later, when needed...I saw a few answers on this site, but they don't answer my questions fully.

  1. Is the command line adb backup -apk -shared -all -f <filename> well-suited to my purpose?
  2. My phone has 32G capacity, but the backup file generated is only 5.3G. How do I know that the backup completed properly and contains all the data I wanted?
  3. Are there ways to do the backup over a network (WAN) using ADB, instead of having to depend on the USB debugging mode.

1 Answer 1



  1. No, adb backup will only backup the applications that has Backup option enabled.
  2. It depends on which data
  3. Yes, you use can connect to ADB over TCP (https://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp).


  • List applications that probably can be backed up:
adb shell 
for package in $(pm list packages -3 | cut -f2 -d":"); do
dumpsys package $package | grep "ALLOW_BACKUP" > /dev/null  && echo $package;

Probably: WhatsApp has ALLOW_BACKUP flag but cannot be backed up with ADB.

  • Verify the backup:

To verify the application has been backed up successfully, you can use the Android backup extractor tool.

  • Storage backup:
adb pull /storage
  • Backup SMS:
adb pull content query --uri content://sms
  • Backup contacts:
adb shell content query --uri content://com.android.contacts/data
  • 1
    Note that adb is not encrypted or protected at all (security equivalent to telnet). Therefore using it over a WAN connection is not recommended. I would recommend to only use it within a private WPA2/3 secured Wifi network.
    – Robert
    Commented Aug 20, 2020 at 15:40
  • 1
    Note that -shared includes shared storage (SD card contents), so your point 1 is a bit incomplete. But you're correct: apps can opt-out of backup and thus would not be included.
    – Izzy
    Commented Aug 20, 2020 at 21:47

Not the answer you're looking for? Browse other questions tagged .