备份完整的SMS / MMS通过ADB内容备份、完整、内容、SMS

2023-09-05 06:28:27 作者:早晚栽在你手里.

我一直在试图利用亚行拉从设备的全部短信/彩信收件箱,但我遇到了一些麻烦。这款手机是植根我尝试了下面的命令:

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:

输入

./adb pull /data/data/com.android.providers.telephony/databases/mmssms.db

输出

Permission denied

输入

./adb pull su /data/data/com.android.providers.telephony/databases/mmssms.db

输出

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?

感谢

推荐答案

获取/ data目录中的内容的一种方法是sqlite的分贝先复制到地方,都可以访问,然后利用亚行拉从那里复制到主机。

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.

例如,下面的命令使用android桥抓住SMS数据(假设它包含在/data/data/com.android.providers.telephony/databases/mmssms.db):

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 .

现在你有MMS / SMS数据库的主机上,探头寻找最流行的收件人,例如:

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