Android - Where on the file system are SMS messages stored?

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.


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


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.