Losing contacts on a smartphone is one of the most unpleasant situations for a user. Even if you regularly synchronize your phone with your Google account, knowing that where contacts are physically stored in Android memorywill help in emergency cases: when resetting the settings, breaking the device, or needing to manually transfer data. Unlike photos or music, which are located in clear folders like DCIM or Music, contact files are hidden deep in system directories, and their format depends on the version of Android and the smartphone manufacturer.

In this article we Let's look at how Android can store contacts - from standard databases to proprietary solutions from all possible paths, in which Android can store contacts - from standard databases to proprietary solutions from Samsung, Xiaomi and Huawei. You'll learn how to access these files without root, what tools can help you export contacts to a readable format, and what to do if your phone won't turn on but you need to save your data. We will pay special attention to hidden folders that are not visible through the standard file manager, but contain backup copies of contacts.

Contact storage structure in Android: databases and files

Contacts in Android are not stored in the usual files like .vcf (business cards) or .csv. Instead, they are written to binary SQLite databases, which are controlled by the system application com.android.providers.contacts. The main files responsible for storing:

  • ๐Ÿ“ /data/data/com.android.providers.contacts/databases/contacts2.db โ€” the main contact database (requires root access).
  • ๐Ÿ“ /data/data/com.android.providers.contacts/databases/contacts.db-wal and contacts.db-shm โ€” auxiliary files to speed up the database.
  • ๐Ÿ“ /data/data/com.android.providers.contacts/app_contactphotos/ โ€” folder with photos of contacts (thumbnails in the format .jpg).

These files cannot simply be copied can be opened on another device - they are encrypted and tied to a specific Android installation. However, they can be extracted using specialized tools (we will discuss them below). It is important to understand that the path /data/data/ is accessible only with superuser rights (root) or via ADB (Android Debug Bridge).

On some firmware (for example, MIUI from Xiaomi or One UI from Samsung) the contacts may duplicated in additional databases:

  • ๐Ÿ”„ /data/data/com.miui.contacts/databases/ โ€” for Xiaomi devices.
  • ๐Ÿ”„ /data/data/com.samsung.android.contacts/databases/ โ€” for Samsung gadgets.
โš ๏ธ Attention: If you use Google Contacts for synchronization, then the local database on the device is just a cache. The main data is stored on Google servers, and it can be restored even after a complete reset of the phone. via contacts.google.com.
๐Ÿ“Š How do you usually reserve contacts?
I synchronize with Google
I export to a VCF file
I use third-party applications
I donโ€™t make any backups

How to find contacts without root access: available methods

If you do not have root access, you will not be able to obtain direct database files. However, there are several legal ways to extract contacts:

  1. Export through the standard Contacts application.

    Open the application, click on the three dots (โ‹ฎ) โ†’ Manage contacts โ†’ Import/Export โ†’ Export to .vcf file. The file will be saved in the folder Download or Documents.

  2. Use ADB (without root).

    Connect your phone to the PC, enable USB Debugging in the developer settings and run the command:

    adb backup -f contacts.ab -noapk com.android.providers.contacts

    This will create a backup copy of your contacts in a file contacts.abwhich can then be converted to .vcf using tools like Android Backup Extractor.

  3. Third-party applications.

    Applications like Super Backup & Restore or My Contacts Backup can export contacts to .vcf or .xml without root.

If the phone does not turn on, but you have access to the internal memory via TWRP (custom recovery), you can manually copy the database files from the path /data/data/com.android.providers.contacts/databases/ to a memory card or PC.

๐Ÿ’ก

Before exporting contacts, disable synchronization with Google and other accounts in the settings. This will prevent duplicate entries in the resulting file.

Where are contacts backed up on Android

Android and smartphone manufacturers automatically back up contacts in hidden folders. These files can be used for recovery if the main database is damaged. Here's where to look for them:

Manufacturer Backup path File format Root required?
Samsung /dbdata/databases/com.android.providers.contacts/contacts2.db SQLite (.db) Yes
Xiaomi /data/com.miui.backup/AllBackup/contacts/ .bak (encrypted) Yes
Google Pixel /data/data/com.google.android.apps.restore/files/ .vcf (sometimes) No (via ADB)
Huawei /data/data/com.huawei.contacts/backup/ .hbd (proprietary) Yes

On devices with MIUI contact backups can be found in the menu Settings โ†’ Storage โ†’ Backups. Samsung offers a similar function in Settings โ†’ Accounts and archiving โ†’ Archiving and recovery. These copies are usually encrypted, and to extract them you will need proprietary utilities (for example, Samsung Smart Switch or Xiaomi Backup Tool).

โš ๏ธ Attention: Automatic backups of contacts on some firmwares (for example, ColorOS from Oppo/Realme) can be stored in the manufacturer's cloud, and not locally. Check your brand account settings.

Disable synchronization with Google

Create a fresh backup via the Contacts application

Check the free space on the memory card or PC

Use the original USB cable to connect to the PC-->

How to open and convert Android contact files

If you managed to extract the database files (contacts2.db), you need to convert them into a readable format. Here are several ways:

  • ๐Ÿ”ง SQLite Browser: A free app for PC that allows you to open the .dbfile and export tables (for example, raw_contacts i data) to .csv.
  • ๐Ÿ”ง Android Contacts Extractor: Utility for extracting contacts from backups contacts.ab (created via ADB).
  • ๐Ÿ”ง Heic2Vcf (for Xiaomi): Converts backups .bak from Xiaomi to standard .vcf.

For files .vcf (business cards) any text editor or specialized apps like Outlook, Thunderbird or online services like VCF Viewer. If the file is damaged, try restoring it using VCF Repair Tool.

Example file structure contacts2.db (tables that contain data):

  • raw_contacts โ€” basic contact records (ID, name, account linking).
  • data โ€” details (phone numbers, email, addresses).
  • mimetypes โ€”data types (for example, vnd.android.cursor.item/phone_v2 for numbers).
How to link data from tables in SQLite Browser

In the contacts2.db file, open the "Execute SQL" tab and run the query:

SELECT raw_contacts._id, raw_contacts.display_name_primary, data.data1

FROM raw_contacts

JOIN data ON raw_contacts._id = data.raw_contact_id

WHERE data.mimetype_id = (SELECT _id FROM mimetypes WHERE mimetype = 'vnd.android.cursor.item/phone_v2')

This will show the names of contacts and their phone numbers.

Features of storing contacts on different versions of Android

The mechanism for storing contacts has evolved along with Android. Here are the key differences:

Android version Storage features Database path
Android 4.xโ€“6.x Base contacts.db without division into tables for accounts. /data/data/com.android.providers.contacts/databases/contacts.db
Android 7.xโ€“9.x Added contacts2.db with support for multiple accounts (Google, SIM, local). /data/data/com.android.providers.contacts/databases/contacts2.db
Android 10โ€“13 Added data isolation (Scoped Storage), direct access to /data/ blocked even for ADB. The same, but required adb root or TWRP.
Android 14+ Complete ban on access to /data/ without root. Export via API or backup only. No direct access.

Starting from Android 10, Google has tightened the rules for accessing system folders. Now even the command adb pull will not work without superuser rights. An alternative is to use adb backup, but this method is not always reliable (some manufacturers block contact backup).

On Samsung devices with One UI 5.0+ contacts can be stored in encrypted form even in a local database. To extract them, you will need proprietary software Samsung Smart Switch or a rooted device.

โš ๏ธ Attention: On Android 14 and newer, an attempt to access /data/ without root may result in protection Google Play Protect activating and blocking the device. Use only official export methods.

What to do if contacts are missing: data recovery

If contacts suddenly disappeared, do not panic. Here is the algorithm of actions:

  1. Check synchronization with Google:

    Go to Settings โ†’ Accounts โ†’ Google โ†’ Account synchronization and make sure that the "Contacts" option is enabled. If not, turn it on and wait for the synchronization to complete.

  2. Restore from backup:

    On Samsung: Settings โ†’ Accounts and archiving โ†’ Restore data.

    To Xiaomi: Settings โ†’ Storage โ†’ Backups โ†’ Restore.

  3. Use specialized utilities:

    apps like Dr.Fone, Tenorshare UltData or EaseUS MobiSaver can scan the device memory and recover deleted contacts (requires connection to a PC).

  4. Check the SIM card:

    If contacts were saved on the SIM, they can be imported through the Contacts application (option Import from SIM).

If the phone does not turn on, but you can access the memory via TWRP or Fastboot, try extracting the database files and restoring them using SQLite Forensics Browser. It is important to act quickly - when overwriting the memory the chances of recovery are reduced.

๐Ÿ’ก

The most reliable way to avoid losing contacts is to enable automatic synchronization with Google and regularly export backups manually.

How to transfer contacts to a new phone

Transferring contacts to a new device depends on where they were stored on the old phone:

  • ๐Ÿ“ฑ Synchronization with Google:

    Simply add the same Google account on the new phone and enable contact synchronization. The data will be loaded automatically.

  • ๐Ÿ“ฑ Local contacts (without an account):

    Export them to a file .vcf on your old phone, then import them on the new one through the Contacts application.

  • ๐Ÿ“ฑ Contacts on the SIM card:

    Insert SIM into the new phone and import contacts via Settings โ†’ Contacts โ†’ Import/Export โ†’ Import from SIM.

  • ๐Ÿ“ฑ Backup via manufacturer:

    For Samsung use Smart Switch, for Xiaomi โ€” Mi Mover, for Huawei โ€” Phone Clone.

If you are transferring contacts from iPhone to Android, export them via iCloud to a file .vcf, then import to Android. For reverse transfer (from Android to iPhone), use iTunes or the service Move to iOS from Apple.

When transferring via .vcf pay attention to the file encoding. If โ€œcrazy wordsโ€ appear in the contact names, open the file in Notepad++ and save it in encoding UTF-8.

FAQ: Frequently asked questions about storing contacts in Android

Is it possible to see contacts in a file manager without root?

No, standard file ones managers (like "Files" from Google or Total Commander) do not show system folders like /data/data/. Even with show hidden files enabled, you will only see user directories (Download, DCIM etc.). To access the contact database, use ADB or specialized backup applications.

Why were the contacts not restored after resetting the settings?

Probable reasons:

  • Synchronization with Google was disabled before the reset.
  • You reset the phone to factory settings without prior archiving.
  • Contacts were stored only on the SIM card or in the local database (not in Google).
  • On the new device, synchronization with the same Google account is not enabled.

Check contacts.google.com โ€”if there are contacts there, they will be downloaded to the phone after synchronization is enabled.

How to extract contacts from a broken phone?

If the screen does not work, but the phone turns on:

  1. Connect the device to the PC via USB and use ADB to create a backup (adb backup).
  2. If ADB does not recognize the device, try connecting via Fastboot (for this, the phone must support this mode).

If the phone does not turn on:

  1. Remove the memory card (if contacts were exported there).
  2. Contact the service center to extract data from the internal memory (specialized equipment is required).

Is it possible to edit contacts directly in the database data?

Technically yes, but this is highly not recommended. The database contacts2.db has a complex structure with many related tables. Incorrect editing can lead to:

  • Loss of some contacts.
  • Duplication of records.
  • Errors in the Contacts application.

If you need to bulk edit contacts, export them to .vcf, edit them in a text editor (for example, Notepad++), and then import them back.

Where they are stored contacts in Telegram or WhatsApp?

Contacts in messengers (Telegram, WhatsApp, Viber) are not stored in the Android system database. These applications synchronize phone numbers from your address book, but the contacts themselves (names, avatars) are stored on the messenger servers. To save contacts from the messenger:

  • In Telegram: export chats via Settings โ†’ Advanced โ†’ Export data (contacts will be in a separate file).
  • B WhatsApp: create a backup copy of chats (contacts are not exported separately, but you can copy numbers from the message history).