Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,165 Members 44,265 Now Online
XDA Developers Android and Mobile Development Forum

Where is MMS saved?

Tip us?
 
OminousPrime
Old
#1  
OminousPrime's Avatar
Member - OP
Thanks Meter 0
Posts: 59
Join Date: May 2008
Location: MO USA
Default Where is MMS saved?

I'm sure someone has figured this out.
Where in the file system are the pictures I receive via mms saved?
I'm sure they have to be somewhere, there has to be a way to get them without the fwd to pc email / attach image to new email / email back to phone trick.

Bonus points, I deleted a thread - can I still find those images somewhere in the file system and restore them?
 
JesusFreke
Old
#2  
JesusFreke's Avatar
Recognized Developer
Thanks Meter 41
Posts: 736
Join Date: Oct 2008
Location: Dallas
I believe they're stored in a sqlite3 database, so it's not as easy as just copying a file.

It looks like this is the database:
/data/data/com.android.providers.telephony/databases/mmssms.db

I don't have any mms/sms messages atm (recently wiped phone), so I don't have any data to look at in the database.

If you want, give me an IM or PM and I'll give you my cell number so you can send me an sms with a pic, so I can figure out how to extract it from the database
"Whether You Think You Can or Can't, You're Right"
--Henry Ford

Android Developer Phone 1 - JFv1.51 - REPRESENT!
 
haitiankid4lyf
Old
#3  
Senior Member
Thanks Meter 0
Posts: 269
Join Date: May 2008
i dont think its in the database: its the same size no matter how many messages there is
 
JesusFreke
Old
(Last edited by JesusFreke; 29th November 2008 at 11:39 PM.)
#4  
JesusFreke's Avatar
Recognized Developer
Thanks Meter 41
Posts: 736
Join Date: Oct 2008
Location: Dallas
Found it. The text and attachments are saved in /data/data/com.android.providers.telephony/app_parts

They are stored in files named something like "PART_1228000671287", with no extension.

To see what type of files they are, you can run this command on the phone (assuming you have RC30 v1.2).

sqlite3 -header /data/data/com.android.providers.telephony/databases/mmssms.db "SELECT _data, ct FROM part;"

The first column is the full path to the file, and the 2nd column is the mime type of the file
"Whether You Think You Can or Can't, You're Right"
--Henry Ford

Android Developer Phone 1 - JFv1.51 - REPRESENT!
 
OminousPrime
Old
#5  
OminousPrime's Avatar
Member - OP
Thanks Meter 0
Posts: 59
Join Date: May 2008
Location: MO USA
Awesome, good work Android Master JesusFreke.
too bad I have the factory RC30
(why oh why did I hit the update button that night?)*

but that's cool to know that they can be found.
Now we just need someone to apply that knowledge into making a SaveImage option appear in the MMS thread.





* on an unrelated note I need to put in another thread: when RC29 came I noticed the camera worked like 5 times better. I was even able to snap pics of the kids on the swings and they came out clear, when RC30 came it was back to blurriness as usual.
 
dcman008
Old
#6  
Member
Thanks Meter 1
Posts: 69
Join Date: May 2006
Quote:
Originally Posted by JesusFreke View Post
Found it. The text and attachments are saved in /data/data/com.android.providers.telephony/app_parts

They are stored in files named something like "PART_1228000671287", with no extension.

To see what type of files they are, you can run this command on the phone (assuming you have RC30 v1.2).

sqlite3 -header /data/data/com.android.providers.telephony/databases/mmssms.db "SELECT _data, ct FROM part;"

The first column is the full path to the file, and the 2nd column is the mime type of the file
Would it be possible to write a program that would automatically extract the imgs/vids from that path and put them on the sd card with the correct file extension?
 
JesusFreke
Old
(Last edited by JesusFreke; 30th November 2008 at 08:14 PM.)
#7  
JesusFreke's Avatar
Recognized Developer
Thanks Meter 41
Posts: 736
Join Date: Oct 2008
Location: Dallas
Sure. It would certainly be possible for rooted phones. I'm not sure for non-rooted phones.
"Whether You Think You Can or Can't, You're Right"
--Henry Ford

Android Developer Phone 1 - JFv1.51 - REPRESENT!
 
dcman008
Old
#8  
Member
Thanks Meter 1
Posts: 69
Join Date: May 2006
I should have added on rooted phones on my first post.
Guess i should get off my butt and start messing around with some code.
I'm kinda leery about messing with root comands.
 
neoobs
Old
#9  
Retired Moderator
Thanks Meter 10
Posts: 1,271
Join Date: Mar 2008
I think it would be possible for rooted as well. Can't applications have message privys so they can read messages? if they can read them can't they save the data?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Get Your Cargo to its Destination in 4×4 Military Operations Reborn

Racing games have evolved quite a bit since the days of Pole … more

Automate Your Device with Sfen

Changing the profile of yourdevice manually is now long forgotten. Since the advent of Android automation … more

Galaxy Photo Screen Lock Displays a Photo Slideshow on Your Lock Screen

Being the most often looked at part of our devices UI, the lock … more

Boost the LG G3 Speaker and Headphone Volume

It seems like OEMs are stepping up their game, with regards to thequality of their devices sound … more