Extract/Restore SMS/MMS, Contacts/Call Log, and Launcher Config. From Nandroid Backup

Search This thread
Jan 26, 2011
2
62
I was using Nexus S i9020T, CM7 nightly (a few weeks old) and for some reason I wake up this morning and couldn't get past the CM7 "blue circle" screen booting. I had about a month old backup but I didn't want to lose any recent data so I made a Nandroid backup.

Normally, to restore SMS or MMS from an old backup, one can just restore the nandroid backup, use a third party SMS backup program to backup the data to sdcard or gmail, restore or install new rom, then restore the SMS from the third party backup software.

However, in my case, I had a nandroid with data on it that I wanted to keep but that wouldn't boot.

So I did some searching and others have had this problem before but I figured I'd put it here for others that may have the same problem. I am not taking credit for this I just found various pieces of info around the web.

The solution is to use a utility called unyaffs. Unyaffs will need cygwin.dll. Yaffs is the file system that CWM recovery nandroid backups are stored in. Windows cannot read or mount this file system AFAIK.

Instead of compiling unyaffs for windows and installing all of cygwin, just use the attached pre-compiled unyaffs.exe and cygwin.dll.

Here's the process:

To restore SMS/MMS from a nandroid backup using MS Windows:

  1. place unyaffs.exe + cygwin.dll + data.img in a folder
  2. open command prompt in this directory (shift+right click -> open comand window here)
  3. type: unyaffs data.img
  4. the contents of the data.img will be extracted to this folder. wait for extraction to complete
  5. browse to \data\com.android.providers.telephony\databases in the extracted folders
  6. copy mmssms.db, mmssms.db-shm, mmssms.db-wal to sdcard
  7. use root explorer to copy these three files to \data\data\com.android.providers.telephony\databases

To restore contacts/call log from a nandroid backup:

  • repeat above process for \data\com.android.providers.contacts\databases

To restore launcher configuration (only for stock Gingerbread launcher):

  • repeat above process for \data\com.android.launcher\databases

Note: Be aware that replacing the existing files with those extracted from the backup will remove the existing data so if you're not 100% sure what you're doing, change the names to mmssms_OLD.db or otherwise back them up before pasting the files from the backup.

Edit: Just thought I'd add, I also came across an app called AppExtractor but, despite the good reviews, the SMS/MMS restore didn't work for me.
 

Attachments

  • unyaffs-winready.rar
    469.6 KB · Views: 11,409
Last edited:

Jarmezrocks

Senior Member
Mar 25, 2011
959
493
Gold Coast
tinyurl.com
if you have titanium backup, it makes it a lot easier to restore specific items from Nandroid Backup

Doesn't work for migrating from Gingerbread to Ice Cream Sandwich for some reason?

I am going to give this one a try.

To the OP your a dead set legend! thank you

PS: Where the bloody hell is the thanks button on this forum? I can't find it
 

carapauzinho

Member
Aug 19, 2010
23
1
Aveiro
I'm on an SGS I9000 and made an SMS/MMS backup using titanium backup when I was on Gingerbread.
Now I've installed the "Onecosmic's ICS Port Android 4.0.3 RC3.1" and restoring the backup file using titanium (only data) makes my message app FC.

Jarmezrocks were you successful when restoring your SMS/MMS on ICS?


Does anyone knows how to restore them? From titanium backup I only have an *.apk.gz and *.properties files.

Thanks for any help.
Cheers
 

albsat

Senior Member
Jan 1, 2012
3,319
555
Xiaomi Mi 10T / 10T Pro
I found out that you can restore SMS just by using Root Explorer.

The location is the same, just that the files are these ones:

mmssms.db
nwk_info.db
telephony.db

I tried and it worked only using RootExplorer and I extracted the files from data.ext4.rar
 

Guti1977

Senior Member
Apr 5, 2011
244
30
San Jose
Does this need to be done using ADB? I have set a nandroid backup from a GB ROM and flashed ICS on the phone; however when I extract the data.img using unyaffs and browse to the mentioned directory, there are no db files whatsoever. :confused:

Could the nandroid backup be corrupted for some reason?

I am looking at the data\com.android.providers.contacts folder and I only see a lib folder with nothing on it.

Hidden system files are set to show BTW
 
Last edited:

RichAP

Senior Member
Feb 3, 2010
162
29
Austin
I did this yesterday using Titanium Backup for my SMS/MMS

You need to go into Preferences and check the *Migrate system data [Experimental] option

Then you go to More - Extract from nandroid backup

There it is listed as Dialer Storage

You can probably do the Phone log this way to but I did look for it.

I would recommend you do a current backup of [SMS/MMS/APN] Dialer Storage before you attempt this.
 

Lafenear

Senior Member
Sep 4, 2011
262
36
Stuttgart
Does this restore the whole smsmms database like with the sms.db file on the iPhone? I hate it when MyBackupPro has to restore my texts and the dates are all messed up and i've lost all my MMS'. And it restores them one by one, instead of just putting it in there all at once. Took me like an hour to restore everything.
 

shears

Senior Member
Feb 15, 2010
72
4
This method doesn't work for me :/
I followed it exactly step by step but when I'm done and go to the Messages app, it's empty.
The same happens if I try it with appextractor or titanium backup.

I made the nandroid backup on CM7, and want to restore the messages to CM9+AOKP on ZTE Blade.
 

shhadas

Member
Jun 17, 2012
6
0
Thanks :)

THANK YOU !!!!
That was so helpful. I was migrating from GB to Nyx ICS RC5.0 yesterday and the application I used (super backup) failed to restore the Contacts.
Another app I used did that but missed allot of details (and also was damn slow).
I used your technique and it did the trick!!!
All data is there the same as I left it on CM7.2

You're the king :)

Thanks

[EDIT] just a correction Super Backup was able to restore the contacts but with missing details
It failed to restore the SMS
The other APP (forgot the name) restored the SMS (after ages) but contact associated with the SMS were completely messed up.
 
Last edited:

Spectre99

Member
May 9, 2012
18
3
St. Petersburg, FL
perfect

I did this yesterday using Titanium Backup for my SMS/MMS

You need to go into Preferences and check the *Migrate system data [Experimental] option

Then you go to More - Extract from nandroid backup

There it is listed as Dialer Storage

You can probably do the Phone log this way to but I did look for it.

I would recommend you do a current backup of [SMS/MMS/APN] Dialer Storage before you attempt this.

This worked perfectly for me, got all my sms messages back from my nandroid backup.
Thanks!
 

stars01

Member
Jul 5, 2011
5
0
Las Pinas City
thanks!

I did this yesterday using Titanium Backup for my SMS/MMS

You need to go into Preferences and check the *Migrate system data [Experimental] option

Then you go to More - Extract from nandroid backup

There it is listed as Dialer Storage

You can probably do the Phone log this way to but I did look for it.

I would recommend you do a current backup of [SMS/MMS/APN] Dialer Storage before you attempt this.

I did this today when I had to reformat my phone because of a bootloop. I'm using an HTC Desire on MildWild. Worked perfectly for me and was able to restore my messages. Loads of thanks to you!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 60
    I was using Nexus S i9020T, CM7 nightly (a few weeks old) and for some reason I wake up this morning and couldn't get past the CM7 "blue circle" screen booting. I had about a month old backup but I didn't want to lose any recent data so I made a Nandroid backup.

    Normally, to restore SMS or MMS from an old backup, one can just restore the nandroid backup, use a third party SMS backup program to backup the data to sdcard or gmail, restore or install new rom, then restore the SMS from the third party backup software.

    However, in my case, I had a nandroid with data on it that I wanted to keep but that wouldn't boot.

    So I did some searching and others have had this problem before but I figured I'd put it here for others that may have the same problem. I am not taking credit for this I just found various pieces of info around the web.

    The solution is to use a utility called unyaffs. Unyaffs will need cygwin.dll. Yaffs is the file system that CWM recovery nandroid backups are stored in. Windows cannot read or mount this file system AFAIK.

    Instead of compiling unyaffs for windows and installing all of cygwin, just use the attached pre-compiled unyaffs.exe and cygwin.dll.

    Here's the process:

    To restore SMS/MMS from a nandroid backup using MS Windows:

    1. place unyaffs.exe + cygwin.dll + data.img in a folder
    2. open command prompt in this directory (shift+right click -> open comand window here)
    3. type: unyaffs data.img
    4. the contents of the data.img will be extracted to this folder. wait for extraction to complete
    5. browse to \data\com.android.providers.telephony\databases in the extracted folders
    6. copy mmssms.db, mmssms.db-shm, mmssms.db-wal to sdcard
    7. use root explorer to copy these three files to \data\data\com.android.providers.telephony\databases

    To restore contacts/call log from a nandroid backup:

    • repeat above process for \data\com.android.providers.contacts\databases

    To restore launcher configuration (only for stock Gingerbread launcher):

    • repeat above process for \data\com.android.launcher\databases

    Note: Be aware that replacing the existing files with those extracted from the backup will remove the existing data so if you're not 100% sure what you're doing, change the names to mmssms_OLD.db or otherwise back them up before pasting the files from the backup.

    Edit: Just thought I'd add, I also came across an app called AppExtractor but, despite the good reviews, the SMS/MMS restore didn't work for me.
    7
    I did this yesterday using Titanium Backup for my SMS/MMS

    You need to go into Preferences and check the *Migrate system data [Experimental] option

    Then you go to More - Extract from nandroid backup

    There it is listed as Dialer Storage

    You can probably do the Phone log this way to but I did look for it.

    I would recommend you do a current backup of [SMS/MMS/APN] Dialer Storage before you attempt this.
    4
    if you have titanium backup, it makes it a lot easier to restore specific items from Nandroid Backup
    1
    Try the free version of "appextractor“ from the play store. I find out to be the easiest & fastest way to restore sms/mms from nandroid, since I have never had much luck successfully restoring through titanium.

    Sent from my Nexus S 4G using Tapatalk 2
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone