8

I have a phone whose screen broke, but I'd like to export its contacts to .vcf so I can import them to another phone. I usually do this with the built-in import/export function in the Contacts app overflow menu, but without a screen it is inaccessible. Is it possible to do this via adb?

user5104897
  • 181
  • 1
  • 1
  • 2

2 Answers2

6

The contacts database can be queried using the ADB shell:

adb shell content query --uri content://com.android.contacts/data

The command will dump all the content of the database only if the shell have the permission READ_CONTACTS, else it will fail.

St0rm
  • 816
  • 7
  • 12
0

Yes and no. If your screen is working, you can use an OTG cable or a MicroUSB to USB adapter and plug a mouse into your phone. Works like a dream. If you have no visual display that is another matter.

  1. You must have already enabled USB debugging.
  2. You must have already connected the phone to your computer and verified it.
  3. You must have already rooted your phone to access the contacts file.

It's extremely difficult

If you have done the above then you send the adb pull request to the correct location, and with that received file you will have to do a couple of things.

  1. Find out the correct format for your phone's contacts DB.
  2. Figure out the correct conversation script to convert to the new phone's DB format.
  3. Send the converted file to the new phone.

Easiest Solution

Just make sure your contacts are backed up and linked to your Gmail email.

Andrew T.
  • 16,898
  • 10
  • 77
  • 134
Vahalaru
  • 121
  • 2