Skip to content

alejandrolopezparra/AndroidContactsDatabase-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Android Contacts Database tools

Tools to extract data from Android Contacts Database (SQLite3). By default, it's located at /data/data/com.android.providers.contacts/databases/contacts2.db although some manufacturers may change it.

The easy way to get contacts2.db is using adb tool:

$# adb pull /data/data/com.android.providers.contacts/databases/contacts2.db

More information about Android Contacts Database can be found on:

Python tool by alejandrolopezparra to export contacts data from Android Contacts Databases (SQLite3) to vCard 3.0 text files. It's useful to recover contacts data from an Android phone (contacts2.db) into Google Contacts or other services supporting vCard file format (.vcf).

acdb2vcf.py v1.0 supports:

  • Android Contacts Database format (SQLite3).
  • Account type filtering: Google, Exchange, WhatsApp, Telegram, Phone, SIM, ...
  • N, FN, ADR, BDAY, EMAIL, NOTE, ORG, ROLE, TEL properties from vCard 3.0 standard.

acdb2vcf.py v1.0 depends on:

  • Python 2 by default but Python 3 is also supported.
  • sqlite3 Python module.

Usage

acdb2vcf.py [options] <db_input> <vcf_output>

Arguments:
  [options]
     --all	All contacts will be exported. By default
     --google	Google contacts will be exported
     --exchange	Exchange contacts will be exported
     --telegram	Telegram contacts will be exported
     --twitter	Twitter contacts will be exported
     --phone	Phone contacts will be exported
     --tuenti	Tuenti contacts will be exported
     --whatsapp	Whatsapp contacts will be exported
     --imap	Imap contacts will be exported
     --sim	Sim contacts will be exported

  <db_input>	Input Android Contact Database (SQLite3), e.g. contacts2.db
  <vcf_output>	Output Virtual Contact File (vCard) filename, e.g. MyContacts.vcf

Additional info

It's based on the original tool and instructions by Andreas Böhler on https://www.aboehler.at/doku/doku.php/blog:2012:1007_recovering_contacts_from_dead_android_phone

It's also based on modifications by Ian Worthington on https://forum.xda-developers.com/android/help/extract-contacts-backup-t3307684

Information about vCard 3.0 can be found at:

About

Tools to extract data from Android Contacts Databases (contacts2.db)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages