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.
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.dborcontacts2.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
.dbin the system folder) - the main storage. - โ๏ธ Google Account (synchronized with
contacts.google.com). - ๐ SIM card (limited number of records, format
ADN). - ๐พ Backups (files
.vcfin a folderDownloador 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 Debuggingon the phone (Settings โ About phone โ Build numberโ tap 7 times, then return toSettings โ System โ For Developers). - ๐ USB cable (preferably original).
Instructions:
- Connect your phone to the PC and open
Command Line(Windows) orTerminal(Mac/Linux). - Enter the command to check the connection:
adb devicesMust the device serial number will appear.
- 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/dataviaadb shelland commandsu. 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:
- Boot into TWRP (usually
Power + Vol Up). - Select
Backup โ Select Partitions to Back Up. - Mark
Dataand confirm creating a backup. - Connect your phone to the PC and copy the backup file (usually in a folder
TWRP/BACKUPS). - Unzip the backup using 7-Zip or TWRP Manager and find
contacts2.dbin the pathdata/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:
- Open the application
Contact. - Click on the three dots (โฎ) โ
Manage contactsโImport/Export. - Select
Export to .vcf fileand 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:
- Install the app and open the file
contacts2.db. - Go to the tab
Data overview. - Select table
raw_contactsโthe main contact data is stored here. - For phone numbers, see the table
phone_lookupordata(fieldmimetype_id=5).
Example SQL query to retrieve all numbers:
SELECTraw_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
Contactwill 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:
- Open
Settings โ Accounts โ Google. - Select your account and enable synchronization
Contact. - 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
.vcfand.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:
- Open
Contacts โ Settings โ Import/Export. - Select
Export to SIM card. - 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:
- Open
Contacts โ Settings โ Manage contacts. - Select
Merge duplicates. - 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
ContacttoSettings โ 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:
- Copy the contact to local memory or Google Account.
- 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
.vcfor 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:
- Disable synchronization with accounts.
- Delete all local contacts via
Settings โ Applications โ Contacts โ Memory โ Clear data. - 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.
FAQ: Answers to popular questions
๐ 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:
- Insert SIM into the old phone and export contacts to
.vcf. - Use an adapter for nano-SIM (if the new phone only supports eSIM).
- Manually copy numbers via
Settings โ Import/Export.
โ๏ธ How to transfer contacts from iPhone to Android?
The most reliable way:
- On iPhone open
Settings โ Apple ID โ iCloudand enable synchronization contacts. - Go to icloud.com, select
Contactand export to.vcf. - 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:
- Immediately change the password from Google Account (this will disable synchronization on the stolen device).
- Use Find My Device (google.com/android/find) to block the phone.
- 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.