Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blog:2012:1007_recovering_contacts_from_dead_android_phone [2015/02/20 14:27] Andreas Böhlerblog:2012:1007_recovering_contacts_from_dead_android_phone [2017/04/26 12:11] (current) – Discussion status changed Andreas Böhler
Line 5: Line 5:
 I remembered that I once installed ClockWorkMod recovery alongside with CyanogenMod on the device. Unfortunately, I left USB debugging disabled in Android, as I had hoped to be able to pull the database files via ADB on plugging the phone in. Luckily, CWM comes with ADB debugging enabled, so I booted straight into CWM (on the ZTE Blade by holding down the Vol- button while powering the phone on), attached the phone to the computer and logged in. First step: Mount the data partition with I remembered that I once installed ClockWorkMod recovery alongside with CyanogenMod on the device. Unfortunately, I left USB debugging disabled in Android, as I had hoped to be able to pull the database files via ADB on plugging the phone in. Luckily, CWM comes with ADB debugging enabled, so I booted straight into CWM (on the ZTE Blade by holding down the Vol- button while powering the phone on), attached the phone to the computer and logged in. First step: Mount the data partition with
  
-[sourcecode language="bash"]andy@x200t:~$ adb shell+<code>andy@x200t:~$ adb shell
 android:~$ mount /data android:~$ mount /data
-android:~$ exit[/sourcecode]+android:~$ exit</code>
  
  
 Then, pull the contacts file: Then, pull the contacts file:
  
-[sourcecode language="bash"]andy@x200t:~$ adb pull /data/data/com.android.providers.contacts/contacts2.db[/sourcecode]+<code>andy@x200t:~$ adb pull /data/data/com.android.providers.contacts/contacts2.db</code>
  
 This is actually a SQLite database containing all the contact's information. A short research on the internet revealed nothing of interest, so I had to dig myself into the format of the file. I came up with a simple Python converter script, that converts most of the information into a VCard file. Phone numbers are all trated as cell numbers and E-Mail addresses are all treated as home mail addresses. I put question marks on the fields where I suspect lies the relevant information to distinguish the type of phone number, but the information was not consistent in the file. This is actually a SQLite database containing all the contact's information. A short research on the internet revealed nothing of interest, so I had to dig myself into the format of the file. I came up with a simple Python converter script, that converts most of the information into a VCard file. Phone numbers are all trated as cell numbers and E-Mail addresses are all treated as home mail addresses. I put question marks on the fields where I suspect lies the relevant information to distinguish the type of phone number, but the information was not consistent in the file.
Line 151: Line 151:
  
 ~~META:date created = 2012-10-07~~ ~~META:date created = 2012-10-07~~
 +
 +~~DISCUSSION:closed~~