[TOOL] yaffs extractor, mmssms.db & contacts2.db converter

Search This thread

M.WeWe

Senior Member
Feb 5, 2012
233
27
cairo
Can`t Get Contacts

Hi I Managed To Convert mmssms.db To sms.xml Now I Need To Convert contacts2.db Can Anyone Guide Me Through?
 

rmetanes

Senior Member
May 9, 2010
71
1
Tel Aviv
Hi I Managed To Convert mmssms.db To sms.xml Now I Need To Convert contacts2.db Can Anyone Guide Me Through?

Great app.
I was able to restore 3448 messages, however when I run the "extract.exe -c contacts2.db" command from the same cmd window, I received the following error
"Read 0 calls
Failed to extract calls: list index out of range"

Any advice?
 

M.WeWe

Senior Member
Feb 5, 2012
233
27
cairo
Very Long Way But The Only Way I Figured


I Manged To Got My Contacts By Using This
Very Long Way But The Only Way I Figured Out
First You Need Firefox With
SQLite Manager Mozilla Add-ons
Then Open Contacts2.db From Connect Database Button
(Don`t Forget To Change (SQLite DB Files) To (All Files))
Then Select The File Then Click On Data From The Left Panel
Then Select Browse & search Button From The Right panel
You Should Now See Your Contacts
Now Right Click On Data From The Left Panel Then Export Table
Then Save It As CSV File Now Open It With Microsoft Excel then
Delete the First 9 Rows then delete The Blank Row That After Row Number 10
(The one That Have Contact name with number 2 In Down cell)
Then leave Row Number 12 And Delete All Rows After It
The result Is (Deleting all Rows Except Rows Number 10 & 12)
Here What I Mean Like Those 2 Pics
(Before)
attachment.php

(After)
attachment.php

Now Install GrassSoft Mouse Recorder Then Copy
This Folder
My Settings
To C:\ProgramData
And Make New Folder on Desktop Then Name It Contacts
Now Close All Opened Windows Except (Contacts Folder & Excel)
then Arrange those 2 Windows Side By Side (Right :: Contacts Folder) - (Left :: Excel)
Now Open the GrassSoft Mouse Recorder And Run (Make Contact.msd)
Then select The First Cell In Your Contact Excel File And Hit Start In GrassSoft
Here What I Mean Like This Video
How It Works.Rar
 

Attachments

  • Before.jpg
    Before.jpg
    44.3 KB · Views: 4,604
  • After.jpg
    After.jpg
    14.7 KB · Views: 4,576
  • Grasssoft.rar
    11.3 KB · Views: 500
Last edited:

Faruk88

Senior Member
Mar 20, 2010
160
20
M.WeWe, thanks A LOT for writing that up... I've been trying for hours to recover my contacts from an old backup. I ended up extracting the contacts2.db file and following your steps and now I have what I need :)

PS. I first tried to use the tool from the OP, but it gave me a "list index out of range" error
 

yeahman45

Senior Member
Dec 26, 2010
1,723
111
I converted the sms db to xml... how do i put it back in my phone now? does not work with titanium restore from xml
 

georg3003

Member
Jul 6, 2013
37
0
which fields are extracted???

Hello,
can somebody tell me which fields are extracted by the tools?

I am looking also for the delivery STATUS and DATE. Are they included???

delivery_status, delivery_date

Thank you for your answers.

Best Regards
George
 

brooce

New member
Jan 17, 2019
2
0
Hi there,

Sorry to update such an old thread, but the tool doesn't work for my mmssms.db from Android 4.4.2 - I get the "read 0 messages" error. Can it be that the format got updated once again? Does anyone have a meredy for such issue?

Cheers
 

akyhne

New member
May 13, 2019
3
1
Horsens
Where is the file stored after i run it? This is what I got.
Code:
C:\Users\Damastah>C:\Users\Damastah\Downloads\yaffs-mmssmsdb-calls-extractor\ext
ract.exe -s D:\S3_recovery\mmssms.db
Read 1782 messages
Save as (empty=sms-20130330111807.xml): y

The software is a bit confusing. The "Save as (empty=sms-20130330111807.xml):" doesn't ask to confirm the save with y or n commands, it simply asks for a name of the .xml file.

So in your case your .xml file was either saved at "C:\Users\Damastah>" or "C:\Users\Damastah\Downloads\yaffs-mmssmsdb-calls-extractor\ext" (not quite sure) as an .xml file called "y".
You should have located the file, rename it to [something].xml and copied it to your phone, then use SMS Backup & Restore to import the file.

For other users, just add your preferred file name at the command prompt "Save as (empty=sms-20130330111807.xml): ", e.g. MyContacts.xml.
 
  • Like
Reactions: duttyend

wrsg

Senior Member
Apr 23, 2008
1,019
143
in a cage
If anyone is showing up late to this thread and needs to extract text messages from a bugle_db file (which is a sqlite database file), the easiest way I found was using this https://github.com/p1ne/SMS-Tools
You will need to use it with Python 2.7
You can extract all texts to csv, xml or json
 

Moebiusten

Member
May 5, 2018
18
2
If anyone is showing up late to this thread and needs to extract text messages from a bugle_db file (which is a sqlite database file), the easiest way I found was using this https://github.com/p1ne/SMS-Tools
You will need to use it with Python 2.7
You can extract all texts to csv, xml or json
Bonjour,
Unfortunately, I've installed with 'pip install smstools' but when lauching with "python2 /usr/local/bin/smstools -h' I get an error :
Traceback (most recent call last):
File "/usr/local/bin/smstools", line 6, in <module>
import smstools
ImportError: No module named smstools

So can you tell me how you proceeded ?
cordialement,
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    Some time ago I sold my old android phone and forgot to make a backup of SMS messages and call logs, but kept a complete image backup made by clockworkmod recovery (system.img, data.img, etc.). I wanted to import my SMS messages and call logs to a new phone, but without a reasonable backup this seemed to be impossible. Some quick search over the internet showed that a question about extracting/importing SMS messages from mmssms.db is not so uncommon, but there are no tools to do this. So I wrote one, and decided to share :)

    Sources are available at github.com abbot/android-restore-tools.
    It requires Python 2.6 and above to run.

    I've also made compiled binaries for windows, attached to this post.

    [Binaries last updated on 12.04.2011]
    3
    This is much better and now makes sense: android 4.0 usually has sqlite 3.7.x, previous binary build of this tool had sqlite 3.6.21, and that was the reason for the 'file is encrypted or is not a database' error.

    Now it looks like mmssms.db format in Android 4.0 has changed a little bit. I will have a look on these changes and update the app accordingly. Hope it will not take too much time :)
    3
    Very Long Way But The Only Way I Figured


    I Manged To Got My Contacts By Using This
    Very Long Way But The Only Way I Figured Out
    First You Need Firefox With
    SQLite Manager Mozilla Add-ons
    Then Open Contacts2.db From Connect Database Button
    (Don`t Forget To Change (SQLite DB Files) To (All Files))
    Then Select The File Then Click On Data From The Left Panel
    Then Select Browse & search Button From The Right panel
    You Should Now See Your Contacts
    Now Right Click On Data From The Left Panel Then Export Table
    Then Save It As CSV File Now Open It With Microsoft Excel then
    Delete the First 9 Rows then delete The Blank Row That After Row Number 10
    (The one That Have Contact name with number 2 In Down cell)
    Then leave Row Number 12 And Delete All Rows After It
    The result Is (Deleting all Rows Except Rows Number 10 & 12)
    Here What I Mean Like Those 2 Pics
    (Before)
    attachment.php

    (After)
    attachment.php

    Now Install GrassSoft Mouse Recorder Then Copy
    This Folder
    My Settings
    To C:\ProgramData
    And Make New Folder on Desktop Then Name It Contacts
    Now Close All Opened Windows Except (Contacts Folder & Excel)
    then Arrange those 2 Windows Side By Side (Right :: Contacts Folder) - (Left :: Excel)
    Now Open the GrassSoft Mouse Recorder And Run (Make Contact.msd)
    Then select The First Cell In Your Contact Excel File And Hit Start In GrassSoft
    Here What I Mean Like This Video
    How It Works.Rar
    2
    Hi,

    This may be caused by two things: either my tool can't properly read/extract the image file, or it can't read the database.

    Please try to extract the image (extract -x data.yaffs2.img). If this does not produce any errors, find the mmssms.db file in the extracted data, it will probably be in data/com.android.providers.telephony/databases/mmssms.db. Then try to run extract -s mmssms.db. Please post if you get any errors doing these steps.
    2
    You can restore the XML with SMS backup & restore