64

Where in the file system are SMS messages stored?

I'm using ES File Explorer to browse around but can't seem to find this - is it on the phone or the SD, and where?

I have an HTC Wildfire but I would imagine it doesn't vary hugely from vendor to vendor (although I am an iOS developer who knows little about Android).

4 Answers 4

45

See here: https://stackoverflow.com/questions/4809874/how-to-access-the-sms-storage-on-android

The gist is that SMS/MMS are residing in databases on the phone and the answer to the question contains the link to this tutorial.

The location of the database might vary from phone to phone, but you can look it up with this command via adb (you need to be root to find it because it's in the protected storage area):

find / -name "*mmssms*"

On my device (Samsung Galaxy S) these databases turned up:

./dbdata/databases/com.android.providers.telephony/mmssms.db
./data/data/com.jb.gosms/databases/gommssms.db

The first one being the native db and the second one is by the sms app I'm using.

7
  • could you explain how it's stored... it looks like XML? also where is it? - I'm not talking from a coding point of view as I do not know anything about android development. Commented Dec 13, 2011 at 23:44
  • 3
    It's an sqlite database. You can look at it with an sqlite viewer - which operating system do you use?
    – joweiser
    Commented Dec 13, 2011 at 23:50
  • Here's a platform independent sqlite viewer if you want to look at those files: http://sourceforge.net/projects/sqlitebrowser/
    – joweiser
    Commented Dec 14, 2011 at 0:24
  • Thanks a lot for this answer! I had a some weird problem where sending SMS to a contact would send them to other contacts. I had to edit an entry in canonical_addresses in mmssms.db. Now it's working as it should again.
    – TheLostOne
    Commented Jun 26, 2013 at 12:32
  • 2
    @masterjo: SQLite Database Browser hasn't been developed since 2009 and it couldn't show anything from the .db file when I tried it today. Here's another SQLite browser that worked - sqlitestudio.one.pl Commented Oct 17, 2013 at 7:17
10

Here's a helpful piece of info also.

This is the absolute path to SMS and MMS DB on most android devices:

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

2
  • 1
    This should actually be renamed to /data/data/com.android.providers.telephony/databases/mmssms.db. Notice the .telephony
    – smac89
    Commented Dec 30, 2016 at 8:02
  • On kitkat device/data/data/com.android.providers.telephony/databases/m‌​mssms.db
    – JinSnow
    Commented Jun 8, 2017 at 14:45
10

Looks like it moved to data/User_DE/0/com.android.providers.telephony/databases with Nougat.

At least, this is where it can be found on my Nexus 6. Hope this helps.

1
  • I also found this to be the location on Android 11. Note that user_de is lower case, not capitalised like you have put
    – coxe87b
    Commented Jun 13, 2021 at 14:54
9

Note that, as of Kitkat (Android 4.4, released Sept 2013), the default path changed from:

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

to

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

Update: As mentioned in the comments, the latter path already exists in JB.

2
  • The changes must have been introduced way before KitKat was launched since /data/data/com.android.providers.telephony/databases/mmssms.db exists in my JB.
    – Firelord
    Commented Jan 10, 2016 at 5:09
  • Well, JB is one release before KK. So, "way before" may be a bit exaggerated. ;-)
    – eyecatchUp
    Commented Jan 10, 2016 at 18:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .