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?


2 Answers 2


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.

  • 2
    adb shell content query --uri content://com.android.contacts/data >> contacts.vcf saves the contacts to a file (Linux).
    – user598527
    Jul 1, 2022 at 9:26
  • 1
    @user598527 While this does dump some data to a file, but it is not a valid .vcf and can't be imported by the contacts app. Also, vcf-validator from vcftools also says it is not valid too.
    – Yoseph
    Aug 17, 2022 at 17:39

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.

You must log in to answer this question.

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