Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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


30th November 2011, 10:58 PM   |  #1  
OP Junior Member
Thanks Meter: 56
2 posts
Join Date:Joined: Jan 2011
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\databas es

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.
Attached Files
File Type: rar unyaffs-winready.rar - [Click for QR Code] (469.6 KB, 6824 views)
Last edited by bQfQZDEJznX5Y8XiFdhy; 30th November 2011 at 11:03 PM.
The Following 54 Users Say Thank You to bQfQZDEJznX5Y8XiFdhy For This Useful Post: [ View ]
30th November 2011, 11:05 PM   |  #2  
AllGamer's Avatar
Retired Forum Moderator
Flag buried under loads of work IRL
Thanks Meter: 1,580
11,521 posts
Join Date:Joined: May 2008
Donate to Me
if you have titanium backup, it makes it a lot easier to restore specific items from Nandroid Backup
The Following 3 Users Say Thank You to AllGamer For This Useful Post: [ View ]
28th December 2011, 03:08 AM   |  #3  
Jarmezrocks's Avatar
Senior Member
Flag Gold Coast
Thanks Meter: 465
949 posts
Join Date:Joined: Mar 2011
Donate to Me
Originally Posted by AllGamer

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
28th December 2011, 03:28 AM   |  #4  
Junior Member
Thanks Meter: 2
19 posts
Join Date:Joined: Dec 2011
I will give it a try. Thanks.
11th January 2012, 08:24 AM   |  #5  
RknDroidFreak's Avatar
Senior Member
Flag Pokhara
Thanks Meter: 46
177 posts
Join Date:Joined: Jul 2011
where do i find data.img?
16th January 2012, 07:13 PM   |  #6  
Junior Member
Flag Aveiro
Thanks Meter: 1
22 posts
Join Date:Joined: Aug 2010
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.
25th January 2012, 10:48 AM   |  #7  
rockyc4u's Avatar
Senior Member
Thanks Meter: 35
100 posts
Join Date:Joined: Nov 2010
Excellent.. saved me a lot.. thanks for the tool
11th February 2012, 11:44 PM   |  #8  
Senior Member
Thanks Meter: 388
2,379 posts
Join Date:Joined: Jan 2012
Great post. I wonder if there is a file extrator in Android like unyaffs?
18th February 2012, 01:26 PM   |  #9  
Senior Member
Thanks Meter: 388
2,379 posts
Join Date:Joined: Jan 2012
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:


I tried and it worked only using RootExplorer and I extracted the files from data.ext4.rar
5th March 2012, 11:18 PM   |  #10  
Guti1977's Avatar
Senior Member
Flag San Jose
Thanks Meter: 26
215 posts
Join Date:Joined: Apr 2011
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.

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 by Guti1977; 5th March 2012 at 11:18 PM. Reason: spelling

Post Reply Subscribe to Thread

backup, call log, nandroid, sms, yaffs
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes