Mmssms.db

267 views
Skip to first unread message

Merci Malagarie

unread,
Jan 15, 2024, 8:27:42 PM1/15/24
to boiprectahcci

Im trying to recover text messages on a S6+ using Autopsy, phones Rooted, ADB is installed but data/data/com.android.providers.telephony/databases/mmssms.db comes back "does not exist" when using Pull. Im fairly new to phone recovery so I was wondering if im doing something wrong or if the path is different for older android OS's. (its running 7.0 if that helps.) I've pulled other files successfully so I at least know im using the commands properly.

mmssms.db


Download Zip https://t.co/zt5hQTeNAg



When you receive an MMS message, the phone saves the message to the phone's internal memory, which is called mmssms.db. You can manually save your MMS pictures or videos, making them accessible via the path: /storage/emulated/0/download or in the Gallery app on your Android device.

I'm trying to work out what the current phone number is for an Android device based solely off a disk image. I've looked in the mmssms.db and the contacts2.db but neither seem to store the details of the current phone number.

Analysis of db file and db-wal file before and after Message data deletion using scenario I (a) Comparison of mmssms.db before and after app data deletion (b) Traces of deleted data remaining in mmssms.db. The blue box indicates data remaining after deletion.

But it happened to me, that after the upgrade to Cyanogenmod 7 my SMS and MMS were not shown anymore. An empty list appeared - as if I never received an SMS before. Of course I made a backup of mmssms.db (as written in my howto) and copied the file back to its original folder once upgraded. But no SMS...

Panic? Of course not =). The reason for this is a slight change in the structure of mmssms.db. Actually Android uses SQLite databases. Simply explained this is like a database in one file - structures, data, etc. It seems that the database structure between Froyo and Gingerbread has changed so we need to adapt a bit.

5. To work with an SQLite database, you need to install a program to handle it. I recommend the Firefox Addon SQLite Manager. Install and then launch the program (from the Firefox menu -> Tools).
Open (Connect Database) the file mmssms.db which you have saved on your computer (note: this is the OLD mmssms.db, before you made the Gingerbread installation!).

Rename the file to mmssms.db and place it back on your SD Card of your Android phone (at Step 4 we didn't disconnect the USB Mass Storage Mode, so you should still be connected!!).
Once copied to the SD Card, we have to restore the file from the SDCard to the original place. Launch the Console and enter the following commands:

Deleting the two files /data/user_de/0/com.android.providers.telephony/databases/mmssms.db and /data/user_de/0/com.android.providers.telephony/databases/mmssms.db-journal resulted in fixing the problem. Thank you for your help!

Hi, I would like to to import a sms set from an iphone.
I tried using -Tools/ but it seems theses scripts does not work ( -Tools/issues/12) and made my SMS app on replicant crashing. I think it could be a problem of db format change (mmssms.db or mmssms.db-journal) and would like to check.
Do you have any pointer with docs on this subject?
Thanks

Thank you for the answer. In fact, I think I wrote "format" instead of "database structure". To write a script to do that, I need the internal structure of the database, and possibly the format of mmssms.db-journal file. This mmssms.db structure is the point I'm looking for some info.
Do you know where I can find info on this structure ? I found methods to access to the SMS but not the structure used actually in replicant.

I tried several modifications, and it seems the generated mmssms.db has the same structure than the empty db.
However, it seems there is still an issue, since I am notified that "table pdu already exists (code 1)".

Hi, for information, I tried some other actions.
The script does not seems to work, so I tried to convert my sms with samsung smart switch.
When loading theses mmssms.db, I get this message :

It seems the problem is because I convert mmssms.db from an 4.1.2 android and I attempt to load them on a 4.2 replicant version.
Since I did not hear of any soft to convert a mmssms from a version to another one, here is the only way I see to solve this problem : the solution I imagine should be to install a 4.2.2 ROM to convert my SMS from my iphone format to this 4.2.2 format and get them back with adb to push them back on replicant 4.2
Do you see any other mean to do this ?

For information, I tried a simple copy of SQL lines from sms actual table into mmssms.db empty database.
Once copied on replicant and after opening message application, no sms is visible, and here is the result from logcat :

As the same time, with application samsung smart switch which I had locally installed. I discovered that samsung android 4.1.2 contains mmssms.db database version 58 where replicant 4.2 0003 needs a version 57. However, samsung smart switch is not compatible with samsung android version before 4.1.2 so I cannot export sms from iphone to pc and then from pc to 4.1.1 android phone and then transfer them to replicant 4.2.

Therefore I will try to copy content of all tables into replicant mmssms.db based on my mmssms.db obtained by samsung smart switch after deleting tables and fields which are not in replicant db (it seems there is not additionnal fields or tables).

I move forward after a few tries. Here is a sketch for what I did :
- user_version is a SQL PRAGMA which is used by android to decide if it can use the database. It should be 57 for replicant 4.2 but the database converted by samsung smart switch from android 4.1.2 is 58 (I do not understand why a 4.2 android uses an older database version than a 4.1.2 android but whatever...)
- all the database schema should be converted to the 57 version. I started with schema I got from a new replicant installation /data/data/com.android.providers.telephony/databases/mmssms.db. I print schema for the replicant database and the android 4.1.2 database. Then, several steps :
..+ dropping every table, trigger and index which disappears from replicant mmssms.db
..+ converting all the tables for which schema changes and adding all the corresponding trigger (they are dropped when associated table is dropped)
Then when I push the new mmssms.db, I have to wait for android to rebuild mmssms.db-journal (it can take a while).

Thanks you for this information.
I confirm that MMS attachments are automatically stored on the phone, into /data/data/com.android.providers.telephony/app_parts/ directory (path found into _data field of part table, into mmssms.db sqlite file).
I will try copying the files hoping it will be ok to have access to old mms attachments on new replicant...

Cok SMS Recovery is a professional Android phone text message recovery software (it can also recover all iPhone text messages). It can support all Android phones including SANSUNG, HUAWEI, MI, LG, Motorola, HTC, etc. What need you to do is to export the database file mmssms.db (and mmssms.db-wal) which is to store text messages to the computer and then to open and recover through our software.

Free Download

1. First you need to root your Android phone, if not, you cannot export the database file(mmssms.db and mmssms.db-wal) to your computer. you can search "how to root Android phone" in Google.com to find more information about how to root.

3. Open "Root Explorer" app in Android phone, goto "data\data\com.android.telephony\databases" folder, check files mmssms.db and mmssms.db-wal, then click the icon "Copy" at the lower left corner. If there is no mmssms.db-wal file in your android phone, you only need to copy mmssms.db file. Then please click ".." at the top to return to the parent folder, until return to the root directory.

5. Connect your Android phone to the computer, and then open the drive where the phone is located, find out files mmssms.db (and mmssms.db-wal) copied to the sdcard folder. Copy the two files to a folder in your computer, for example, the folder "D:\Android text messages".
Note: if you can't find out mmssms.db-wal file in your android phone, you only need to copy mmssms.db file.

During the investigation process, forensic examiners can come across the need to retrieve text messages that have been sent or received on a specific device. Therefore, it is important to know where its database is saved and how to extract it. In Android Phone Forensics, you may find this information stored in mmssms.db file that is present under /data/data/com.android.providers.telephony/databases.

If you have the Dec 31, 1969 issue like I did, and you don't care to back up your messages, you can delete the "mmssms.db" file, as well as clear the contents out of the app_parts folder. You can then clear your Messenger app's data and cache and reboot your phone. You will have a clean slate. This is because the database file was corrupted and utilities that delete messages just deletes the contents inside of the bad databse file instead of deleting the actual file itself.

3. Open "Root Explorer" software in Android phone, goto "data\data\com.android.telephony\databases", check files mmssms.db and mmssms.db-wal, then click the button "Copy" at the lower left corner. If there is no mmssms.db-wal file in your phone, you only need to copy mmssms.db file. Then please click ".." at the top to return to the parent folder, until return to the root directory.

5. Connect your Android phone to the computer, and then open the drive where the phone is located, find out files mmssms.db and mmssms.db-wal copied to the sd card. Copy the two files to a folder in the computer, for example, the folder "D:\Android SMS database".
Note: if there is no mmssms.db-wal file in your phone, you only need to copy mmssms.db file.

6. Open "SMS Recovery", and click "File" "Open SMS database", then select the mmssms.db file copied to the computer. Then click menu "File" "Recover deleted SMS", after a while, the deleted SMS will be successfully retrieved.

f448fe82f3
Reply all
Reply to author
Forward
0 new messages