Have you ever lost contacts after resetting your phone or updating the firmware? Or tried to manually transfer numbers to a new smartphone, but could not find the data file? The problem is that Android does not store contacts in the usual folder like Download or DCIM. The system uses protected directories, access to which is limited even for experienced users.

In this article we will figure out where exactly Android (including Samsung One UI, MIUI, ColorOS and clean Google Android) saves contact database, how to find it through file manager, ADB or special applications. You will also learn why simply copying a file contacts.db is not always enough to transfer data and how to properly make a backup copy.

Spoiler: the path to the contacts folder depends on the version of Android and the manufacturer. On modern devices (Android 10+), access to system directories is blocked without rootrights, but there are workarounds.

๐Ÿ“Š How do you usually transfer contacts to a new phone?
Via Google Account
Export to VCF
I copy the SIM card
I use third-party applications
I canโ€™t transfer it, I enter it again

1. Where contacts are physically stored on Android: folder structure The main file is called

Contacts in Android stored in SQLite database with extension .db. The main file is called contacts2.db (on new versions) or contacts.db (on old versions). It is located in a protected system directory, the path to which varies depending on the manufacturer:

  • ๐Ÿ“ฑ Standard path (pure Android, Google Pixel, Motorola): /data/data/com.android.providers.contacts/databases/contacts2.db
  • ๐Ÿค– Samsung (One UI): /data/data/com.sec.android.provider.contacts/databases/contacts.db or contacts2.db
  • ๐Ÿ“ฒ Xiaomi (MIUI), Redmi, POCO: /data/data/com.android.providers.contacts/databases/contacts2.db (may be duplicated in /data/user_de/0/...)
  • ๐Ÿ”„ Outdated versions (Android 4.xโ€“7.x): /data/com.android.providers.contacts/databases/contacts.db

It is important to understand that these folders not accessible without root access or ADB on modern devices (Android 8+) Even if you connect the phone to the PC and enable USB debugging, standard Windows Explorer or Mac Finder will not show the directory /data โ€”it is hidden for security.

In addition, contacts can be stored in several places at the same time:

  • ๐Ÿ”„ Local database (file .db in the system folder) - the main storage.
  • โ˜๏ธ Google Account (synchronized with contacts.google.com).
  • ๐Ÿ“‡ SIM card (limited number of records, format ADN).
  • ๐Ÿ’พ Backups (files .vcf in a folder Download or on an SD card).
โš ๏ธ Attention: On devices with Android 11+ and scoped storage even applications with rights READ_CONTACTS cannot read the database file directly. They gain access only through ContentProvider.

2. How to access the contacts folder without root

If you do not have rootrights, but need to urgently extract the file contacts2.db, there are three working methods:

Method 1: Through ADB (Android Debug Bridge)

This official tool from Googlethat allows you to manage the device via the command line. You will need:

  • ๐Ÿ–ฅ๏ธ A computer with ADB drivers installed.
  • ๐Ÿ“ฑ Enabled USB Debugging on the phone (Settings โ†’ About phone โ†’ Build number โ€” tap 7 times, then return to Settings โ†’ System โ†’ For Developers).
  • ๐Ÿ”Œ USB cable (preferably original).

Instructions:

  1. Connect your phone to the PC and open Command Line (Windows) or Terminal (Mac/Linux).
  2. Enter the command to check the connection:
    adb devices

    Must the device serial number will appear.

  3. Copy the contact database to your computer:
    adb pull /data/data/com.android.providers.contacts/databases/contacts2.db C:\Contacts\

    (replace C:\Contacts\ with your path).

โš ๏ธ Attention: On some devices (for example, Xiaomi s MIUI 12+) ADB may request additional confirmation of unlocking access to /data via adb shell and command su. Without root, this will not work.

Method 2: Via backup (TWRP or Titanium Backup)

If custom recovery is installed on your phone TWRP, you can create a backup of the partition /data:

  1. Boot into TWRP (usually Power + Vol Up).
  2. Select Backup โ†’ Select Partitions to Back Up.
  3. Mark Data and confirm creating a backup.
  4. Connect your phone to the PC and copy the backup file (usually in a folder TWRP/BACKUPS).
  5. Unzip the backup using 7-Zip or TWRP Manager and find contacts2.db in the path data/data/com.android.providers.contacts/databases/.

Unlocked bootloader

Installed recovery TWRP

Battery charge > 50%

Disabled screen lock (PIN/password)

-->

Method 3: Export to VCF file

The simplest, but not universal method:

  1. Open the application Contact.
  2. Click on the three dots (โ‹ฎ) โ†’ Manage contacts โ†’ Import/Export.
  3. Select Export to .vcf file and save to an SD card or phone memory.

The file contacts.vcf will appear in the folder Download or DocumentsIt can be opened in Excel, Google Contacts or import to another device.

Method Root required? Difficulty Suitable for
ADB โŒ No โญโญโญ Android 5โ€“12 (limited on new versions)
TWRP Backup โœ… Yes (custom recovery) โญโญโญโญ Devices with unlocked bootloader
VCF export โŒ No โญ All devices, but without system contacts
Root Explorer โœ… Yes โญโญ Devices with root access

3. How to read the contacts2.db file on a PC

By copying file contacts2.db, you will receive a binary database SQLite. To view or edit contacts, you will need special software:

  • ๐Ÿ’ป DB Browser for SQLite (free, sqlitebrowser.org) - a simple editor with a graphical interface.
  • ๐Ÿ“Š SQLiteStudio (an advanced tool for working with requests).
  • ๐Ÿ” Notepad++ with SQLite plugin (for experienced users).

Instructions for DB Browser for SQLite:

  1. Install the app and open the file contacts2.db.
  2. Go to the tab Data overview.
  3. Select table raw_contacts โ€”the main contact data is stored here.
  4. For phone numbers, see the table phone_lookup or data (field mimetype_id=5).

Example SQL query to retrieve all numbers:

SELECT

raw_contacts._id,

raw_contacts.display_name_primary,

phone_lookup.normalized_number

FROM raw_contacts

JOIN phone_lookup ON raw_contacts._id = phone_lookup.raw_contact_id;

๐Ÿ’ก

If there is a lot of garbage in the database (duplicates, old numbers), make a backup copy of the file before editing contacts2.db. An error in the SQLite structure can lead to the loss of all contacts when imported back to the phone.

4. Why you canโ€™t just copy contacts2.db to another phone

Many users try. transfer contacts by simply copying the file contacts2.db to the same folder on the new device. This works only in 30% of cases and here's why:

  • ๐Ÿ”‘ Different versions of Android: The database structure may differ (for example, in Android 10 new fields have appeared for contact_aggregation).
  • ๐Ÿ“ฑ Manufacturers modify contacts: Samsung and Xiaomi add their tables (for example, for synchronization with Samsung Cloud or Mi Account).
  • ๐Ÿ”„ Synchronization with accounts: If contacts are linked to Google, they will automatically overwrite the local database.
  • ๐Ÿ”’ Access rights: On new Android devices, blocks changes to system files without root.

What will happen if copying fails:

  • ๐Ÿ“ต Contacts will not be displayed in the application.
  • ๐Ÿ”„ The application Contact will start permanently reboot.
  • โ˜ ๏ธ In the worst case, the database is damaged and all contacts disappear.
How to correctly transfer contacts via contacts2.db?

1. Make sure that both devices have the same version of Android and firmware (for example, both MIUI 13).

2. Stop the contacts service: adb shell am force-stop com.android.providers.contacts.

3. Copy the file to the same folder on the new phone, replacing the old one.

4. Reboot the device and wait until the database is rebuilt (may take 5-10 minutes).

5. Check the contacts in the application. If they do not appear, restore the original file and use export to .vcf.

5. Alternative methods for backing up contacts

If access to the system folder is blocked, use these methods:

Method 1: Synchronization with a Google Account

The most reliable way:

  1. Open Settings โ†’ Accounts โ†’ Google.
  2. Select your account and enable synchronization Contact.
  3. Wait for completion (check on contacts.google.com).

Advantages:

  • ๐Ÿ”„ Automatic update when adding new contacts.
  • โ˜๏ธ Access from any device.
  • ๐Ÿ›ก๏ธ Protection against loss when resetting the phone.

Method 2: Applications for backup

Recommended apps:

  • ๐Ÿ“ฑ Super Backup & Restore (saves to .vcf and .xml).
  • ๐Ÿ”„ My Contacts Backup (sends backup to email).
  • โ˜๏ธ Samsung Smart Switch (for devices Samsung).

Method 3: Manual copy via SIM card

Suitable for a small number of contacts:

  1. Open Contacts โ†’ Settings โ†’ Import/Export.
  2. Select Export to SIM card.
  3. Insert SIM into the new phone and import contacts.

Limitations:

  • ๐Ÿ“ต Stores only a name and one number (no email, addresses, photos).
  • ๐Ÿ“ Limit ~250 contacts per SIM.
๐Ÿ’ก

Synchronization with Google Account is the only method that is guaranteed to work on all devices without root and does not require technical skills.

6. Frequent problems and their solutions

When working with contacts, users encounter typical errors:

Problem 1: Contacts are duplicated

Cause: synchronization with multiple accounts (Google, Samsung, Mi Account).

Solution:

  1. Open Contacts โ†’ Settings โ†’ Manage contacts.
  2. Select Merge duplicates.
  3. Disable synchronization of unnecessary accounts.

Problem 2: Contacts disappear after updating

Cause: application cache reset Contact or database version conflict.

Solution:

  • Check whether synchronization with is enabled Google.
  • Uninstall application updates Contact to Settings โ†’ Applications.
  • Import backup .vcf.

Problem 3: You cannot edit contacts (gray text)

Cause: the contact is saved on a SIM card or in an account that does not support editing (for example, WhatsApp).

Solution:

  1. Copy the contact to local memory or Google Account.
  2. Delete the original from SIM/account.
โš ๏ธ Attention: On some devices (for example, Huawei without Google Services) contacts can be stored in a proprietary format. To transfer them, use Huawei Backup or export to .vcf.

7. Security: how to protect contacts from loss

Contacts are one of the most valuable databases on your phone. Their loss may mean the loss of business connections, relatives' numbers or important notes. Follow these rules:

  • ๐Ÿ” Enable two-factor authentication for Google Accountlinked to contacts.
  • ๐Ÿ“… Make a backup once a month (via .vcf or Google Contacts).
  • ๐Ÿšซ Do not store contacts only on the SIM card โ€”it may break or get lost.
  • ๐Ÿ” Check application permissionsrequesting access to contacts (especially instant messengers and games).

If you are selling or transferring a phone, be sure to delete all contacts:

  1. Disable synchronization with accounts.
  2. Delete all local contacts via Settings โ†’ Applications โ†’ Contacts โ†’ Memory โ†’ Clear data.
  3. Reset to factory settings (Settings โ†’ System โ†’ Reset).
๐Ÿ’ก

Before resetting your phone, export your contacts to .vcf and save the file to your PC or cloud. This will take 2 minutes, but will save hours on recovery in case of an error.

๐Ÿ” Is it possible to recover deleted contacts without backup?

If the contacts were synchronized with Google Account, check the trash on contacts.google.com (stored for 30 days). For local contacts, try apps like DiskDigger or GT Recovery, but the chances are low - Android right away. clears the space after deletion.

๐Ÿ“ฑ Why doesnโ€™t the new phone display contacts from the SIM card?

Modern smartphones often do not support import from SIM automatically. Try:

  1. Insert SIM into the old phone and export contacts to .vcf.
  2. Use an adapter for nano-SIM (if the new phone only supports eSIM).
  3. Manually copy numbers via Settings โ†’ Import/Export.
โ˜๏ธ How to transfer contacts from iPhone to Android?

The most reliable way:

  1. On iPhone open Settings โ†’ Apple ID โ†’ iCloud and enable synchronization contacts.
  2. Go to icloud.com, select Contact and export to .vcf.
  3. Send the file to Android (by email or via Google Drive) and import.

Alternative: use the application Move to iOS (but it only works the first time you set it up Android).

๐Ÿ”ง Is it possible to edit contacts2.db directly?

Technically yes, but this is risky. The database contains related tables (raw_contacts, data, phone_lookup), and an error in one of them will lead to the collapse of the entire file. If you need to edit contacts in bulk, use:

  • Google Contacts (web version supports group editing).
  • Excel + plugin for import/export .vcf.
  • Scripts on Python with library vcfpy (for advanced users).
๐Ÿ›ก๏ธ How to protect contacts from theft?

If the phone is stolen or lost:

  1. Immediately change the password from Google Account (this will disable synchronization on the stolen device).
  2. Use Find My Device (google.com/android/find) to block the phone.
  3. If the contacts were on the SIM, contact your operator to block the card.

For prevention:

  • Set up SIM card lock (PIN code).
  • Enable Phone encryption (Settings โ†’ Security).
  • Do not store contacts in unencrypted backups on SD card.