Does the command:
adb backup -all -f backup.ab
include contacts in the backup?
No, it would not backup Contacts. Yes, it would backup Contacts.
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.
Yes, it does. You can get it via:
adb pull /data/data/com.android.providers.contacts/databases/contacts2.db
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.
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.