Have you ever lost contacts after resetting your settings or updating your firmware on Xiaomi? Or just want to know where your phone numbers are physically stored in your device's memory? Unlike photos or music, contacts don't lie in the DCIM or Downloads folder that you can access -- they're hidden in the Android system partition, which is not easy to get to without root rights.
In this article, we will learn which folder Xiaomi stores contacts in, how to access it (including without root), and what to do if the database file is corrupted. You will also learn how to manually export contacts in.vcf or.db format so as not to lose them when you flash or change your phone. The instructions are relevant for all models, from Redmi Note 10 to Xiaomi 14 Ultra, regardless of the version of MIUI.
Where to store contacts on Xiaomi: a system path to the database
Contacts on Xiaomi smartphones (as well as on other Android devices) are stored in the SQLite database with the extension.db. The main file is called contacts2.db and is located in the following way:
/data/data/com.android.providers.contacts/databases/contacts2.dbImportant: this folder is located in a secure system partition /data, which is not available without root rights or special tools. Even if you connect your phone to your computer in MTP mode, you will not see this path in Windows Explorer or macOS.
File. contacts2.db contain:
- ๐ All saved phone numbers (including duplicates)
- ๐ค Names, surnames and additional fields (email, addresses, birthdays)
- ๐ท๏ธ Contact groups (e.g., โFamilyโ, โWork")
- ๐ Change history (if sync with Google Account is enabled)
If you have root access, you can copy the file manually, and without root, alternative ways are to use ADB or specialized backup applications (discussed below).
How to find a folder with contacts without root rights
If you don't have root, you can't get direct access to /data/data/... but there are workarounds. Here are 3 working methods for retrieving contacts:
1.Across ADB (Android Debug Bridge)
The ADB tool allows you to back up system data, including contacts.
- Enable USB Debugging in the Developer Settings (Settings โ About Phone โ MIUI Version โ Press 7 times, then return to Additional โ For Developers).
- Connect your phone to your PC and execute the command: adb backup -f contacts.ab -noapk com.android.providers.contacts
- On the phone screen, confirm the creation of a backup (password can not be set).
The contacts.ab file will be saved to your computer. To retrieve contacts2.db, use the Android Backup Extractor (Abe) utility.
2. through the "Google Contacts" app
If your contacts are synced with your Google Account, they can be exported in.vcf format:
- Open contacts.google.com on PC.
- On the left menu, select Export.
- Specify the format (Google CSV or vCard) and click Export.
This method does not allow access to the file itself. contacts2.db, It allows you to keep all the numbers in readable form.
3. Through third-party applications
Applications like Super Backup & Restore or My Contacts Backup can back up contacts in.vcf or.xml format without root, but they donโt extract the original database file, they only export the data to a compatible format.
Check if sync with Google Account is enabled|Install. ADB-PC drivers|Download Android Backup Extractor (if you use it) ADB)|Create a folder for backups on your computer|Disable battery optimization for the Contact app"
-->
File structure contacts2.db: inside the contact database
File. contacts2.db โ It's a SQLite database, which is made up of several tables:
| Title of the table | Description | Example of data |
|---|---|---|
| raw_contacts | List of raw contacts (each contact may have multiple records) | _id=1, account_name="Google", account_type="com.google" |
| data | Specific data (numbers, email, addresses) | mimetype="vnd.android.cursor.item/phone_v2", data1="+79991234567" |
| groups | Contact groups (e.g., โFriendsโ, โColleaguesโ) | title="Family", notes="Family" |
| phone_lookup | Index for quick search by number | normalized_number="+79991234567", contact_id=1 |
To view the contents of the database, use programs like DB Browser for SQLite or SQLiteStudio. Please note: manual editing of the file is not recommended - this can lead to data corruption.
The critical detail is that if you delete the contacts2.db file, the system will recreate it the next time you run it, but all contacts will be lost.
What to do if contacts2.db is damaged?
How to Transfer Contacts from One Xiaomi to Another
If you change your smartphone (for example, from the Redmi Note 11 to the Xiaomi 13T), you can transfer contacts in several ways:
- ๐ Sync with Google Account: the easiest method: just log in to the same account on a new phone, and contacts will be automatically downloaded.
- ๐ฑ Export/import via.vcf: On the old phone: Contacts โ โฎ โ Contact management โ Exports/imports โ Export to file. Transfer the contacts.vcf file to a new phone (e.g., via Bluetooth or the cloud). On a new phone: Contacts โ โฎ โ File-based import.
Backup through MIUI:
Settings โ Additional โ Backup and Reset โ Local Backup
โ ๏ธ Note: when importing.vcf to a new phone, duplicates are possible if contacts are already synced with Google. Before importing, check if sync is enabled to avoid repeats.
๐ก
If some contacts donโt show up when importing.vcf, try opening a file on your computer in a text editor (like Notepad++) and checking it for correctness. Sometimes Cyrillic characters or special characters break the format.
Frequent Contact Problems on Xiaomi and Their Solutions
Xiaomi users often face the following problems:
โ ๏ธ Note: If after the update MIUI The contacts are gone, don't rush to reset! First check if Google sync is disabled. Go to Settings โ Accounts. โ Google โ Sync your account and turn on the switch next to Contacts".
1. Contacts are duplicated
This happens if the same contact is stored in both the phone book of the device and in the Google Account to fix:
- Open Contacts. โ โฎ โ Contact management โ Connecting contacts.
- Select duplicates and click "Combine".
- Turn off contact display from unnecessary sources (โฎ โ Settings โ Display contact).
3. Contacts cannot be edited
If the editing menu does not open when you click on the contact, check:
- Have administrator rights been set for third-party applications (e.g. Clean Master or Security).
- Are the permissions for the Contacts app disabled (Settings โ Applications โ Contacts โ Permissions).
How to protect contacts from loss: best practices
To never lose contact, follow these rules:
- โ๏ธ Enable automatic sync with Google: Go to Settings โ Accounts. โ Google โ Sync your account. Make sure the Contacts switch is on. Click on Sync Now to force the data to be updated.
- ๐ Create local backups regularly: Use built-in backup MIUI Apps like Super Backup.
- ๐ Export contacts before important actions: resetting, firmware or updating MIUI.
- ๐ซ Do not keep your contacts only on SIM-map: this format supports a limited number of fields (e.g. no email or addresses).