Wednesday, June 6, 2012

How to retrieve contacts from android CWM backup

1) Connect the phone to PC in USB storage mode and get the data.img from the cwm backup
 cp /media/clockworkmod/data.img . 

2) compile and build unyaffs which is need to retrieve the files from data.img 
download unyaffs.c, unyaffs.h from 
gcc -o unyaffs unyaffs.c 
unyaffs data.img 

3) after extracting the image browse the contact database location
cd data/ 

4) use sqlite3 command line client to read the table of contacts 
sqlite3 contacts2.db 
sqlite> select number,name from view_v1_phones;

1 comment:

  1. Hello,
    Well I'm a noob in all this Android stuff. I'm basically a Commerce guy. I somehow bricked my android phone but was able to retrieve this file CONTACTS.DB. I'm a windows user and don't have much of programming skills. I tried using SQLITE DB Browser which does allow to open the file but the data is not meaningful to me. Please help me to get the contacts back in a simple csv or txt format. I need some important contacts and the phone was not synced for quite sometime.

    Please help me.