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-walandcontacts.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 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:
- 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 folderDownloadorDocuments. - Use ADB (without root).
Connect your phone to the PC, enable
USB Debuggingin the developer settings and run the command:adb backup -f contacts.ab -noapk com.android.providers.contactsThis will create a backup copy of your contacts in a file
contacts.abwhich can then be converted to.vcfusing tools like Android Backup Extractor. - Third-party applications.
Applications like Super Backup & Restore or My Contacts Backup can export contacts to
.vcfor.xmlwithout 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_contactsidata) to.csv. - ๐ง Android Contacts Extractor: Utility for extracting contacts from backups
contacts.ab(created via ADB). - ๐ง Heic2Vcf (for Xiaomi): Converts backups
.bakfrom 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_v2for 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.data1FROM 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:
- Check synchronization with Google:
Go to
Settings โ Accounts โ Google โ Account synchronizationand make sure that the "Contacts" option is enabled. If not, turn it on and wait for the synchronization to complete. - Restore from backup:
On Samsung:
Settings โ Accounts and archiving โ Restore data.To Xiaomi:
Settings โ Storage โ Backups โ Restore. - 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).
- 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
.vcfon 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:
- Connect the device to the PC via USB and use
ADBto create a backup (adb backup). - 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:
- Remove the memory card (if contacts were exported there).
- 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).