Where Xiaomi stores contacts in the memory of the phone: a complete analysis of system paths and formats

Ever wonder where all your contacts are physically stored on a Xiaomi smartphone? A notebook with hundreds of numbers, addresses, and notes seems weightless until you have to transfer it to a new phone, recover it after a reset, or just understand how the system works. Unlike photos or documents, contacts are not in a DCIM or Downloads folder, but are hidden deep inside the Android system.

In this article, weโ€™ll take a look at exactly where Xiaomi (based on MIUI) keeps its contacts, from standard ways in the phoneโ€™s memory to cloud syncs with Google and Mi Account. Youโ€™ll learn what database files look like, can they be edited manually, and what to do if contacts suddenly disappear. And weโ€™ll also reveal the unique nuance of MIUI: why, when reset to factory settings, contacts sometimes recover automatically, even if you havenโ€™t made a backup.

1. Where to store contacts on Xiaomi: system paths in the memory of the phone

Contacts on Xiaomi (as well as on any Android device) are stored as a database SQLite - file with the extension.db.

/data/data/com.android.providers.contacts/databases/contacts2.db

This file contains all local contacts, including numbers, names, email addresses and additional fields, but access to it is limited: the /data/data/ folder is protected by the system, and without root rights or special tools, you will not be able to open it.

What's more important:

  • ๐Ÿ“ฑ Local contacts (those that are not synced to accounts) are stored only in this file. contacts2.db They'll be gone forever.
  • โ˜๏ธ Synchronized contacts (via Google, Mi Account, or other services) are duplicated in the cloud, but local copies of them are also written to this database.
  • ๐Ÿ”„ When resetting the phone to factory settings file contacts2.db deleted, but if the contacts were synchronized, they will be restored after logging in to the account.

โš ๏ธ Note: Do not attempt to edit contacts2.db Manually through file manager without backup! error in database structure can result in loss of all contacts.

๐Ÿ“Š How do you usually keep contacts on Xiaomi?
Only in the memory of the phone.
Synchronizing with Google
Using Mi Account.
Exporting to VCF file
Another way.

2. Contact Storage Formats: SQLite vs VCF vs XML

Xiaomiโ€™s system works with contacts in three main formats, each of which has its own purpose:

FormatExpansionWherever usedCan I edit it?
SQLite.dbThe main database of contacts in /data/data/Yes, but only with root or through ADB.
VCF (vCard).vcfExport/import contacts via phone menuYeah, any text editor.
XML.xmlBackups via MIUI Backup or GoogleYeah, but the structure is complicated.

The most versatile format for users is.vcf. It can be created through the contact menu (Contact Management โ†’ Export / Import) and opened on any device. The contacts2.db file is tied to a specific firmware and version of MIUI, so transferring it to another phone โ€œas isโ€ will not work.

Interesting fact: when exporting contacts to.vcf, Xiaomi adds metadata about the MIUI version and phone model to the file, for example, at the beginning of the file you can see a line:

X-MIUI-VERSION: V12.5.3.0.RKHCNXM

3. How to check where your contacts are stored: step-by-step instructions

To understand where your contacts are located โ€“ in your phoneโ€™s memory, in Google, or in your Mi Account โ€“ follow these steps:

Open the Contacts app

Press three points (โ‹ฎ) โ†’ Contact management

Select Settings โ†’ Import / Export โ†’ Account Management

See which accounts are marked as active for sync-->

If neither Google nor Mi Account is listed, all contacts are stored locally and will be lost when you reset your phone.

  1. Go to Contact Management. โ†’ Exports.
  2. Select the.vcf format and specify the folder to save (for example, Downloads).
  3. Send the file to the mail or cloud (Google Drive, Mi Cloud).

โš ๏ธ Note: If you use dual applications (functions) MIUI For cloning messengers, contacts from the "second" account are stored in a separate database: /data/data/com.android.providers.contacts.secondspace/.... They need to be exported separately!

๐Ÿ’ก

To quickly check if your contacts are synced with Google, go to contacts.google.com from the same account you have on your phone. If the list is empty, sync is disabled.

4. Cloud Storage: How Xiaomi Syncs Contacts with Mi Account and Google

Xiaomi offers two main cloud services for backup contacts: its own Mi Cloud and Google Contacts. Letโ€™s understand how they work and where they physically store data.

1. Mi Cloud (Mi Account)

  • ๐Ÿ“ฒ Contacts are synchronized with Xiaomi servers in encrypted form.
  • ๐Ÿ”— You can access them via the web version: i.mi.com โ†’ Contacts.
  • ๐Ÿ”„ Synchronization is included in the Settings โ†’ Mi Account โ†’ Mi Cloud โ†’ Contacts.
  • โš ๏ธ When you delete your Mi Account, your contacts will be deleted from the servers after 30 days.

2. Google Contacts

  • โ˜๏ธ Data is stored on Google servers and is available at contacts.google.com.
  • ๐Ÿ”„ Synchronization is configured in Settings โ†’ Accounts. โ†’ Google โ†’ Synchronization of the account.
  • ๐Ÿ”„ If you turn off sync, local changes will not be saved in the cloud.

The main difference: Mi Cloud is integrated into MIUI and can automatically restore contacts even after a reset if you are logged in to the same Xiaomi account.Google Contacts are universal and work on any Android device, but require manual sync enabled.

What happens if you turn off sync with Google?
If you turn off sync, existing contacts will remain on your phone, but new changes (add/delete numbers) will not be saved to the cloud.If you delete a contact on your phone, it will only disappear locally, but will remain in Google Contacts (and vice versa).

5. How to access contact files without root rights

If you donโ€™t have root access but need to get the contacts2.db file (for example, to back up or transfer to another phone), there are a few legal ways to do this:

Method 1: ADB (Android Debug Bridge)

  1. Enable USB Debugging in Settings โ†’ About Phone โ†’ MIUI version (click 7 times, then go back to Additional Settings โ†’ For Developers).
  2. Connect your phone to your PC and execute the command: adb pull /data/data/com.android.providers.contacts/databases/contacts2.db

Method 2: Through MIUI backup

  • ๐Ÿ“ฑ Go to Settings. โ†’ The phone. โ†’ Backup.
  • ๐Ÿ”„ Select Local Backup and Mark Contacts.
  • ๐Ÿ’พ The backup file will be saved to /MIUI/backup/AllBackup/ in.mbk format (can be unpacked through the MIUI Backup Extractor).

Method 3: Through Third Party Applications

Apps like Contacts Backup & Restore or Super Backup can export contacts to.vcf or.xml without root, but they donโ€™t directly access contacts2.db, they only convert data into a user-friendly format.

๐Ÿ’ก

The most reliable way to save contacts without root is to regularly export them to a.vcf file through Xiaomiโ€™s standard menu, which can be opened on any device, even an iPhone.

6 What to do if contacts disappear: recovery and diagnosis

If your contacts suddenly disappear, don't panic, 80 percent of them can be restored.

Step 1: Check the synchronization

  • โ˜๏ธ Make sure that in the settings โ†’ Accounts enabled sync with Google or Mi Account.
  • ๐Ÿ”„ Try to manually update data: open Google Contacts in your browser and click More โ†’ Cancel changes (if contacts have recently been deleted).

Step 2: Restore from backup

  • ๐Ÿ“ฑ If you were doing a backup through MIUI Backup, go to Settings โ†’ The phone. โ†’ Backup โ†’ Restore.
  • ๐Ÿ’พ If you have a.vcf or.mbk file, import it through Contacts. โ†’ Management โ†’ Imports.

Step 3: Use specialized tools

If contacts are deleted without a backup, try data recovery software, such as:

  • ๐Ÿ› ๏ธ Dr.Fone (restores contacts from internal memory).
  • ๐Ÿ› ๏ธ EaseUS MobiSaver (works even without root, but with limitations).

โš ๏ธ Warning: Do not write new data to your phone after deleting contacts (do not install apps, do not take photos). The fewer recording operations, the better the chances of recovery.

7. Features of storing contacts on different models Xiaomi

While the principle of keeping contacts on all Xiaomi is the same, there are nuances that depend on the model and version of MIUI:

Model/SeriesFeatures of storageRecommendations
Redmi Note 8/9/10On older versions of MIUI 11-12, contacts could be duplicated when synchronized with Mi Account.Before upgrading to MIUI 13+, export to.vcf.
Xiaomi 11/12/13Google Contacts Sync Adapter support is improved, but sometimes manual inclusion is required in Settings โ†’ Sync.Check your sync settings after major updates.
POCO F3/F4/F5POCO with lightweight firmware may not have MIUI Backup โ€“ use Google Contacts.Install Contacts Backup from Google Play for automatic backup.

On devices with MIUI 14+, the Mi Cloud Cloud Contact Cloud Backup feature automatically saves changes every 24 hours to enable:

  1. Go to Settings. โ†’ Mi Account โ†’ Mi Cloud.
  2. Select Device Backup โ†’ Contacts.
  3. Activate the option Automatic backup.

Frequently asked questions

Can I transfer contacts from Xiaomi to iPhone?
Export contacts to a.vcf file on Xiaomi, then send it to your iPhone (e.g. via AirDrop or mail) and import through the Contacts app.
Why did the phone reset the contacts themselves?
You probably had Mi Account or Google sync enabled, and when you first log in after a reset, the system automatically downloads your contacts from the cloud, and local contacts (without sync) are lost.
Where do you keep contacts? SIM-map?
Contacts SIM-The cards are stored on the SIM, You can view them in the Contacts app by selecting the tab. SIM. They are not synced to the cloud and are limited in size (usually up to 250 records).
How to remove duplicate contacts on Xiaomi?
Open the Contacts app, click โ‹ฎ โ†’ Contact management โ†’ You can combine duplicates. You can automatically find and suggest that you combine the duplicates. You can also use applications like Duplicate Contacts.
Can I edit contacts2.db manually?
Technically, yes, but it's risky. contacts2.db It has a complex structure with many linked tables. You need a SQLite editor to edit, DB Browser for SQLite and Knowledge SQL. Error can lead to loss of all contacts.