Export Android contacts contacts2.db to vCard vcf on Windows

The other day I need to restore some contacts on an Android phone, I had Titanium Backup files, though restoring the contacts through there didn’t seem to work.

I searched for a solution but there wasn’t really anything for Windows to restore the contacts so I developed my own VBA script.

I will assume you already have a backup contacts2.db file, it is found the zip file com.android.providers.contacts.

Firstly, download SQLite Manager add-on for Firefox, run it, Connect Database contacts2.db. Under Tables, right-click data table and chose Export Table click OK and save as data.csv.

Download convert-contacts2.db data-to-vcard-vcf.xlsm, open, and enable macros if necessary. Run the macro convertDatatoContacts and select the data.csv file.

You should now have a list of contacts, delete any contacts that you don’t want to import by deleting the whole row. When done run the macro and a vCard.vcf file will be created in the same folder as the Excel WorkBook.

Copy vCard.vcf to the root  directory of your Android phone. On the phone enter Contacts, Settings, Import/Export and Import from storage. The contacts will be imported.

 

  • abdulrahman

    work like a charm , the easiest way ever to restore your contacts manually..
    big thanks

  • abdulrahman

    last step select (writeContactstovCard) and select this Workbook then run
    many thanks

  • MaClaud

    Great! thx

  • Yasser Mohamad

    @abdulrahman 7awel tekalemny darory plz

  • Yasser Mohamad

    3ayzak tekalemny darory plz

  • Jon Hyatt

    Also works for converting Linux Evolution Mail address books from the new contacts.db to the old contacts.vcf for use in older versions or other Unix programs/
    Thanks

  • Pingback: [GUIDE][GT-I9192][stuck at splash] how to get your data back - Android world()