Sunday, December 17, 2017

backup - Can adb be used to recover SMS messages while in permanent "Safe Mode"?


I have a non-rooted Droid X2 that is in permanent "Safe mode", but I want to recover SMS messages. SMS Backup and Restore will NOT work because safe mode only allows system apps to run.


adb shell will get me into the phone, but does not allow me to get to the SMS database:



[rjt@pc232 workspace]$ adb shell
$ cat /proc/version
Linux version 2.6.32.9-00008-gc406305 (hudsoncm@il93lnxdroid80) (gcc version 4.4.0 (GCC) ) #2 SMP PREEMPT Tue Jan 24 22:54:19 CST 2012

$ cd /data/data/com.android.providers.telephony/databases/
$ pwd

/data/data/com.android.providers.telephony/databases
$ ls
opendir failed, Permission denied
$ su -l root
su: permission denied
$ sudo
sudo: permission denied
$ sudo su -
sudo: permission denied
$ sudo su -l root

sudo: permission denied
$

Since SMS Backup and Restore is allowed to access my SMS messages when in normal mode, is "Safe mode" blocking my access or the fact that this phone is not rooted?


Can I root the phone without losing my existing SMS messages?



Answer



You will be unable to do this without a rooted device, as the /data directory can only be read by the Android system, and apps can also read their own /data/data/ directory only.


Android devices do not come with sudo, and you need to be rooted to use su as it switches to the root shell (on unrooted ROM's, su can't switch to the root user, as the kernel denies it).


If you do find a way to root the device, (which may be difficult), you can mount the /data partition as RW, then you can copy files from it.


Use these command to remount the /data patition:



su


mount -o remount,rw /data


The su command can only be executed on a rooted device.


EDIT:


Just for clarification, the SMS Backup & Restore app uses an API call to get the SMS messages via the Messaging app, hence the need for the READ_SMS permission.


EDIT2:


Most rooting methods don't wipe the device data, however some do. You would have to google for a way to root your droid 2 however, and see if it wipes the data.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...