0

I have an HTC Wildfire S A510e (Android 2.3.5, not rooted). I want to extract my SMS messages and import them into another device.

Problems:

  • There is no free space on the internal memory left. No apps such as SMS backup can be installed.
  • The touchscreen is broken, I cannot unlock the display or use any buttons (e.g. home, back, search).
  • Device is not rooted. I cannot view the contents of /data/ or erase anything inside it using adb shell.

In which directory are SMS messages stored on HTC devices? I could then perhaps use the following command to obtain a backup, as it works without root permissions:

adb pull <backupfile>

What format does the SMS database have? Perhaps I can search the filesystem for that file-extension?

Is it possible to root a phone if there is no internal memory left?

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Hello_World
  • 387
  • 3
  • 13

1 Answers1

1

SMS messages are stored in a SQLite database within the data folder of the messaging app. The extension of the database should be .db.

Although I'm unfamiliar with HTC devices, it should be located here:

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

Perhaps you can try pulling that file via adb?

Paul Lammertsma
  • 37,593
  • 16
  • 136
  • 187
  • 1
    I doubt that he can access `/data` without root... – WarrenFaith Mar 12 '13 at 09:36
  • Yes, root is needed to read anything under `/data`. With root, [this answer should suffice](http://stackoverflow.com/a/13904529/154306), but if rooting is really not an option, it *is* possible to read the database out programmatically (i.e. install an app). – Paul Lammertsma Mar 12 '13 at 09:51
  • So the best way would be: Create an app that exports the sms database to the sdcard and register a broadcast receiver to `BOOT_COMPLETED` and restart your phone, than you should be able to pull the export file from the sdcard... – WarrenFaith Mar 12 '13 at 09:56
  • Just tested: the broadcast receiver is not necessary. If you run your app from eclipse, the onCreate() of the activity is executed even with turned off screen. – WarrenFaith Mar 12 '13 at 09:58
  • "/data/data/com.android.providers.telephony/databases/mmssms.db" is the right file on HTC Wildfire. However, I can't copy or even display it with cat-command. It says "Permission denied". – Hello_World Mar 12 '13 at 11:06
  • @WarrenFaith Correct. Also you can open apps using the ActivityManager ([see here](http://stackoverflow.com/a/5494891/154306)). – Paul Lammertsma Mar 12 '13 at 11:48
  • @Hello_World Either you'll need to root, or make some space to install an app that backs up the database without any user interaction. – Paul Lammertsma Mar 12 '13 at 12:00
  • 1
    This question is off-topic here, and about to be deleted, but it looks like your answer contains some useful information that I would hate to be lost forever. Perhaps you could consider posting it over on the Android Q&A site, like in response to [this question](https://android.stackexchange.com/questions/5478/htc-desire-crashed-deleted-all-sms-mms-can-i-recover)? – Cody Gray - on strike Aug 30 '17 at 05:41