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 http://code.google.com/p/unyaffs/downloads/list 
wget http://unyaffs.googlecode.com/files/unyaffs.c
wget http://unyaffs.googlecode.com/files/unyaffs.h
gcc -o unyaffs unyaffs.c 
unyaffs data.img 

3) after extracting the image browse the contact database location
cd data/com.android.providers.contacts/databases 

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.

    ReplyDelete

Intel Corporation XMM7360 LTE Advanced Modem in ArchLinux

The required packages are available in ArchLinux User Repository (AUR) so it will be easier if you can use an AUR helper package like yay . ...