5

Does the command:

adb backup -all -f backup.ab

include contacts in the backup?

3

No, it would not backup Contacts. Yes, it would backup Contacts.

Confused, eh!

Yes, it would backup Contacts.

See this question: Backup/Restore SMS/MMS via ADB on a non-rooted device? The author of it was able to backup contacts. It was later revealed that the device on which the backup was performed ran Android 4.1.2. It was a bizarre revelation for me that the backup succeeded.

No, it would not backup Contacts.

As per the Manifest mentioned here for default Contacts Provider app in Android versions (in series), for Jelly Bean and above Android versions the ADB backup for Contacts Provider/Storage would be denied by system, and hence your contacts wouldn't be backed up.

It's a mere flag android:allowBackup="false" that's the cause of backup denial. See my answers here and here to know more about that flag.

2

Yes, it does. You can get it via:

adb pull /data/data/com.android.providers.contacts/databases/contacts2.db
  • 1
    But adb pull is not adb backup! Also, your command would not work for a device running the kernel in secure mode. – Firelord Aug 9 '15 at 21:09
  • It is most useful knowing exactly where to fetch the contacts from in their raw format. Thanks. – samis Jan 23 '17 at 2:09
1

Yes it should include the contacts. Your syntax appears incorrect though. It should be adb backup -all -f backup.ab rather than adb backup .all -f backup.ab Also the -f backup.ab is optional as that is the default.

0

It doesn't seem to be the case. I tried with both the following commands

adb backup -all -apk -shared -nosystem -f adb_backup.ab
adb backup -all -apk -shared -system -f adb_backup.ab

and neither my photos, SMS nor contacts were backed-up.

  • 2
    I don't know about photos but you're right about SMS and Contacts not getting backed up. See my answer here to know the reason. Also, on which Android version did you test these commands? – Firelord Aug 9 '15 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.