In attempt to install 2.2 I've deleted all my contacts(contacts were saved on phone, not as google contacts)
I've done full nandroid backup while phone still had those contacts; however when I try restoring image; I get bootloop.
Nandroid backup contains system.img, data.img, cache.img and boot.img;

I'm wondering if I can restore only data.img to get contacts back.

I have thought of 2 other solutions:

a) make a new nandroid image of current status; verify that it's ok by doing restart; then open copy database with contacts from one backup to another.

b) open database with contacts from data.img; and manually retype 200 phone records.

Is there any smarter (quicker, easier) way??

5 Answers 5


Clockworkmod recovery has an 'Advanced Restore' option that allows you to pick just one of the following partitions: boot system data cache sd-ext

If you don't already have it, download ROM Manager from the market and this will help you install the clockworkmod recover.

(I've no idea whether this will solve your problem, but yes you can restore the data partition! ;) )


Mount the image in your computer (Linux) or phone, extract the contacts database, and copy it over the contacts database in the phone. You do this using a loopback device, e.g. mount -o loop /sdcard/myimage.img myimage. "myimage" is where you can view the contents afterward. The database should be data/data/com.android.providers.contacts/databases/contacts.db.

You can restore the data for a single app by copying the relevant folder in /data/data/.


You can use unyaffs to decompress a backup image, and then access the data directly. Here's a guide on how to do so.

  • I didn't think of unyaffs here, good call. I added a good guide I found for it. Commented Aug 10, 2011 at 20:24

I couldn't mount data.img via mount -o loop :( Also restoring old data.img resulted in Android phone being stuck at Cyanogen logo screen and not loading Android OS fully :(

I managed to extract contacts from old backup by doing this:

  1. Install the Android SDK

  2. Boot into recovery mode

  3. Make full backup of your current system via Nandroid backup

  4. Restore /data partion of your old backup

  5. Boot into recovery mode

  6. Start adb server:

for Fedora
   $ su -
   # cd ~/android-sdk/tools
   # ./adb kill-server ./adb start-server
OR for Ubuntu
   $ sudo su
   # cd ~/android-sdk/tools
   # ./adb kill-server ./adb start-server
  1. Connect to your Android phone via adb SDK command

    ./adb shell

  2. Mount /data and /sdcard partition via Recovery menu on your phone

  3. Copy contacts from your old /data partition to your /sdcard partition

   # cp /data/data/com.android.providers.contacts/databases/contacts2.db /sdcard/contacts2.db.old
  1. Unmount /data partition

  2. Format /data partition

  3. Restore your current /data partition from backup image

  4. Backup your current contacts database

    # cp /data/data/com.android.providers.contacts/databases/contacts2.db /sdcard/contacts2.db.current
  1. Copy your old contacts over your current one
    # cp /sdcard/contacts2.db.old /data/data/com.android.providers.contacts/databases/contacts2.db

There are also several apps available helping with a partial Nandroid restore:

They all give you the opportunity to extract parts of your Nandroid backup: Apps and their data, SMS, etc., and make the procedure a little easier.

  • None of these exist anymore? :(
    – endolith
    Commented Jan 3, 2021 at 13:48
  • @endolith Wow. Then I'm seeing a ghost. Titanium Backup is still there (though not updated for a while).
    – Izzy
    Commented Jan 3, 2021 at 21:13
  • Yes but Titanium Backup can't see Nandroid backups anymore
    – endolith
    Commented Jan 4, 2021 at 0:46
  • 1
    Ah! Didn't know that. Long ago that I tried… I meanwhile checked, and couldn't find any newer tool either, sorry.
    – Izzy
    Commented Jan 4, 2021 at 1:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .