All Articles

Android mmssms.db

I’m currently playing around with MMS for a possible hack. So I needed to access more “raw” data in terms of ids etc. If my understanding is correct (currently wip) MMSs’ are stored on an external server (like http) and the app fetches it via url.

Anyhow, in the version of android that I’m using (4.4) you can find the messages in an sqlite database under /data/data/com.android.providers.telephony/databases/mmssms.db. Note that you need root to access it. So to access it from your e.g. computer:

  1. plug in usb and enable developer mode. Allow for ADB-access.
  2. adb start-server to start the adb server for communicating with your android. Then adb root to run it in root mode. Finally adb shell to get a shell.
  3. Now in the shell you can run sqlite3 /data/data/com.android.providers.telephony/databases/mmssms.db and you have access to your stored messages.
sqlite> .tables
addr                 pdu                  threads
android_metadata     pending_msgs         words
attachments          rate                 words_content
canonical_addresses  raw                  words_segdir
drm                  sms                  words_segments
part                 sr_pending

I didn’t find much information on the database schema, but it doesn’t seem too hard to figure out. The table “sms” seems to contain the basic text messages. MMS seem to be stored in “pdu” and “part”.

Some sources:

Published Oct 22, 2014

Security Engineer with a dash of software. Originally from Stockholm, now in Berlin. I like to hack things.