Is there any way to backup/restore SMS and MMS messages using ADB, when the device is not rooted?
adb pull
won't work here, as the corresponding database (/data/data/com.android.providers.telephony/databases/mmssms.db
) cannot be read by ADB if it's not running in insecure (root) modeadb shell "cat /data/data/com.android.providers.telephony/databases/mmssms.db > /sdcard/mmssms.db
doesn't work either without root accessadb backup
for some reason doesn't cover this database on the device I've checked with (empty backup – just the 41 bytes of the backup header in the resulting file)
I especially wonder why adb backup
doesn't cover this. If it's for "privacy reasons", then the same should apply to the contacts database – which clearly is backed up.
References:
- Can adb be used to recover SMS messages while in permanent “Safe Mode”? covers the same topic – but other than there, I'm not restricted to safe-mode
- backup full sms/mms contents via adb (on our developers sister-site) is for a "rooted solution" (and, apart from that, a bit of age: question and answers are more than 3 years old)
So: Any solution on a non-rooted device? Note that I'm NOT asking for an app-based solution. I'm fully aware there are several apps available for this. I specifically want a "shell based solution", to be used via ADB.
adb backup
: few exceptions, most of them ignorable, but user very much likes to keep SMS which also were not covered.