I've been attempting to use adb to pull the sms/mms inbox in its entirety from the device but am having some trouble. The phone is rooted and I've tried the following commands:
Input
./adb pull /data/data/com.android.providers.telephony/databases/mmssms.db
output
Permission denied
Input
./adb pull su /data/data/com.android.providers.telephony/databases/mmssms.db
Output
The help menu
Am I flawed in my thinking that I can pull the sms inbox via commands similar to the ones I've tried? If it can be done what is wrong with my command?
Thanks
It can backup all APKs and their data, your personal files, downloads, music, pics, etc.
Android's built-in SMS BackupPixels have automatic SMS backup. Google Pixel phones have supported restoring backups since Android 8.1, allowing you to automatically transfer key data from your old phone to your new phone (including SMS messages) after the initial setup.
One way to fetch contents of the /data directory is to first copy the sqlite db to somewhere that is accessible, and then using adb pull to copy from there to the host.
For example, the following commands use the android bridge to grab the sms data (assuming it is contained in /data/data/com.android.providers.telephony/databases/mmssms.db):
adb shell $ mkdir /mnt/sdcard/tmp # su # cat /data/data/com.android.providers.telephony/databases/mmssms.db > /mnt/sdcard/tmp/mmssms.db # exit $ exit adb pull /mnt/sdcard/tmp/mmssms.db .
Now you have the mms/sms database on your host machine, probe to find most popular recipient, for example:
sqlite3 -header mmssms.db 'select address from sms' | sort -n | uniq -c | sort -n
Finally, tidy up the temp area:
adb shell $ rm /mnt/sdcard/tmp/mmssms.db $ rmdir /mnt/sdcard/tmp $ exit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With