Where Xiaomi Stores Locked Numbers: System Files and Hidden Settings

Blocked numbers on Xiaomi, Redmi or smartphones POCO โ€” It's not just a list in the phone app. It's an operating system behind the scenes. MIUI Stores this data in several places, from user databases to system files, access to which requires special rights. Whether you need to restore the lock after resetting, move the list to another phone, or just understand how the lock mechanism works, this article will reveal all the technical nuances.

Unlike standard instructions, here we will examine not only the visual interface, but also the physical location of files in the deviceโ€™s memory, including paths to SQLite databases, application cache, and even backups in the Mi Cloud. MIUI 12/13/14 and Android-based models 10-14, Where the storage structure may be different.

We warn you beforehand: System files require caution, one wrong action can cause data loss or a phone app crash. If your goal is to simply export a list of locked numbers, start with the built-in feature section. MIUI. For advanced users below โ€“ a detailed analysis of the file system.

The official way: where to see the blocked numbers in the MIUI

The easiest way is to use built-in tools. MIUI. The list of blocked contacts is available directly through the Phone app, but the path to it depends on the shell version:

  • ๐Ÿ“ฑ MIUI 14/13: Open the phone. โ†’ โ‹ฎ (three-point) โ†’ Settings โ†’ Number lock. All blocked numbers are displayed here, as well as settings for automatic spam blocking.
  • ๐Ÿ”„ MIUI 12 and older: The path may be different - Phone โ†’ Settings โ†’ Lockdown and identification โ†’ List of blocked.
  • โ˜๏ธ Sync with Mi Cloud: If backup is enabled, the block list is automatically synced to Xiaomi account. โ†’ Xiaomi account โ†’ Mi Cloud โ†’ Synchronization โ†’ Contacts.

Important: In some regional firmware (e.g. Europe or India), the menu item may be called Spam and Block or Call Blocking. If you don't find a section, check the language of the system or update the Phone app via Google Play.

Through this menu, you can not only view the list, but also:

  • ๐Ÿ“ค Export locked numbers to.vcf file (via "Share").
  • ๐Ÿ—‘๏ธ Delete individual records or clear the entire list.
  • โš™๏ธ Set up rules to automatically block unknown or hidden numbers.

โš ๏ธ Note: If you delete the Phone app (for example, via adb or after root rights), all lock settings will be reset and can only be restored from a backup of the Mi Cloud or manually through the file system.

๐Ÿ“Š What version? MIUI You're using it?
MIUI 14
MIUI 13
MIUI 12 or older
I don't know.
Another firmware

File system: where the locked numbers are physically stored

For locking up the rooms in MIUI The answer is com.android.contacts (or com.miui.contacts in older versions) and all data is stored in SQLite, but access is limited:

1. Local contact database

The main file with the blocked numbers is located along the path:

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

In this database, the data is stored in a table blocked_numbers. To view the contents, you will need to:

  • ๐Ÿ”“ Root rights (or adb root on unlocked bootloader).
  • ๐Ÿ› ๏ธ SQLite browser (for example, DB Browser for SQLite on PC).
  • ๐Ÿ“ฑ Supported terminal sqlite3 (You can use Termux).

Example of commands for displaying a list of blocked numbers:

adb shell


su




sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "SELECT * FROM blocked_numbers;"

The cache of the Phone appendix

Temporary lock data can be duplicated in the cache of the com.android.dialer app (or com.miui.contacts).

/data/data/com.android.dialer/cache/


/data/data/com.android.dialer/shared_prefs/

It stores the interface settings and the latest actions, but not the complete lock list. blocked_numbers.xml (if any) backup copies may be provided.

โš ๏ธ Note: Modifying files in /data/data/ If you don't back up, you can crash the Phone app. Before you edit, back up the com.android.providers.contacts folder with the command: adb pull /data/data/com.android.providers.contacts ~/backup_contacts

How to Restore Access to Locks After Resetting MIUI?
If you reset your settings but you synced with Mi Cloud before that, the locked numbers will automatically recover when you first log in. If sync is disabled, try it: 1. Recover data from local backup (folder) /MIUI/backup/AllBackup/ storage). 2. Use it. ADB file-extract contacts2.db from old firmware (if there is a backup) TWRP). 3. Manually add numbers from the call history (if they are saved in the log).

Alternative methods: backups and the cloud

If direct access to files is not possible (for example, on a locked phone), use alternative sources:

MethodWhere data is storedConditions required
Mi CloudXiaomi Cloud Account (Contacts section)Synchronization enabled before data loss
Local backup/MIUI/backup/AllBackup/ or /Backup/Backup is done through Settings โ†’ System system โ†’ Backup
Google ContactsGoogle Account (contacts.google.com)Blocks are synced with Google (rarely working on the Internet) MIUI)
Titanium Backupfolder /TitaniumBackup/ on SD-mapRuth-Right. + fixed-end

For recovery from Mi Cloud:

  1. Go to Settings โ†’ Xiaomi Account โ†’ Mi Cloud.
  2. Select Restore and specify the backup date where the current locks were.
  3. Confirm the restoration of contact data (including blocked numbers).

If backup is done via AllBackup:

  • ๐Ÿ“ Find a file with the.mbk extension in the folder /MIUI/backup/AllBackup/.
  • ๐Ÿ”„ Restore it through Settings. โ†’ System system โ†’ Backup โ†’ Local. โ†’ Restore.
  • โš ๏ธ Please note that this will restore all settings, not just locks.

๐Ÿ’ก

If you block numbers frequently, enable automatic sync with Mi Cloud: Settings โ†’ Xiaomi account โ†’ Mi Cloud โ†’ Synchronization โ†’ Contacts (incl.) This will keep the locks even after the phone is reset.

Differences between MIUI models and versions

Structure of storage of blocked numbers may differ depending on:

  • ๐Ÿ“ฑ Device models: On POCO Redmi with global firmware file path may differ from Chinese versions.
  • ๐Ÿ”ข Versions MIUI: V MIUI 14 uses a new database structure that is incompatible with older versions.
  • ๐Ÿค– Android Versions: On Android 12+ access /data/data/ Restricted even for rooted devices (adb root required).
MIUI versionThe path to lockdownFeatures
MIUI 14/data/data/com.android.providers.contacts/databases/contacts2.dbTable blocked_numbers It contains the number and timestamp fields
MIUI 12/13/data/data/com.miui.contacts/databases/contacts.dbIn some versions, the lock is stored in raw_contacts flag-headed is_blocked=1
MIUI 11 and older/data/data/com.android.contacts/databases/contacts.dbThe format of the database is compatible with AOSP, But there may be no block table.

On Android 10 devices+ and MIUI 12+ Access to system folders is complicated, for example, even root-rights may require:

  • ๐Ÿ”ง Disable SELinux (setenforce 0 command).
  • ๐Ÿ“‚ Mount /data mount-mode -o rw,remount /data).
  • ๐Ÿ›ก๏ธ Use Magisk to mask root rights from apps.

โš ๏ธ Attention: POCO F1/F2/F3 Redmi Note 10/11 With global firmware, the path to the base could be /data/user_de/0/com.android.providers.contacts/databases/contacts2.db. This is due to the specifics of implementation MIUI international market.

How to export blocked numbers without root rights

If you do not have root rights but need to keep a block list, use one of these methods:

1. Through the Phone app

V MIUI 13/14 You can export the list to a.vcf file:

  1. Open the phone. โ†’ โ‹ฎ โ†’ Settings โ†’ Number locking.
  2. Press on. โ‹ฎ In the upper right corner and select Export.
  3. Save the file to a convenient location (such as Downloads).

2. Through ADB (rootless)

With help. ADB You can extract some data even without rooting. Connect the phone to the PC and do it:

adb shell content query --uri content://com.android.contacts/data --where "mimetype_id=(SELECT _id FROM mimetypes WHERE mimetype='vnd.android.cursor.item/blocked_number')" --projection "data1"

This command will display a list of blocked numbers in the format:

Row: 0 data1=+79123456789


Row: 1 data1=+1234567890

3.Titanium Backup (if previously made)

If you have a backup from Titanium Backup, recover the data from com.android.providers.contacts:

  • Install Titanium Backup and provide root rights.
  • Find the contact backups in the contact stories list.
  • Select Recover Data (not the app!).

โ˜‘๏ธ Preparation for export of locks

Done: 0 / 4

What to do if the locks disappear after the update MIUI

After major updates (e.g., with the MIUI 12 on MIUI 14) the list of blocked numbers may be reset:

  • ๐Ÿ”„ Changes in the structure of the database (new versions use different tables).
  • ๐Ÿ“ฆ Cleaning the cache of the "Phone" application during the update.
  • โ˜๏ธ Synchronization conflict between Mi Cloud and local data.

For recovery:

  1. Check out Mi Cloud: Signing in to your Xiaomi account can automatically restore locks.
  2. Update rollback: If the update was recent, try rolling back through Settings โ†’ The phone. โ†’ Updating the system โ†’ โ‹ฎ โ†’ Select the update package (you need an old firmware file).
  3. Manual transfer: If you have a backup of the old version MIUI, extract the file contacts2.db Transfer it to a new system (root required).

V MIUI 14 Android 13-based locks are stored in an encrypted database. Retrieval of them will require an encryption key, which can only be obtained with an unlocked bootloader and root rights.

Security: How to Protect a Lock List from Loss

To avoid losing blocked numbers:

  • โ˜๏ธ Enable synchronization with Mi Cloud: Settings โ†’ Xiaomi account โ†’ Mi Cloud โ†’ Synchronization โ†’ Contacts.
  • ๐Ÿ“ฅ Make local backups regularly: Use Settings โ†’ System system โ†’ Backup or Titanium Backup.
  • ๐Ÿ“„ Export the list manually: Periodically save the locked numbers to the.vcf file via the Phone app".
  • ๐Ÿ”’ Do not clear the Contacts app data: This will remove all locks.

If you frequently change your firmware or experiment with MIUI, Create a script for automatic backup of the contact database:

#!/bin/bash


adb backup -f contacts.ab -apk -obb -shared com.android.providers.contacts




mv contacts.ab ~/storage/downloads/contacts_backup_$(date +%Y%m%d).ab

โš ๏ธ Attention: On devices with Android 11+ and MIUI 12.5+ Backup via adb backup may not include locked numbers due to privacy restrictions.In this case, use Titanium Backup or manual file copying.

๐Ÿ’ก

The most reliable way to save locks is to combine synchronization with Mi Cloud and regular export to.vcf. This will protect data even when you reset your phone or change your firmware.

FAQ: Frequent questions about number locks in Xiaomi

๐Ÿ” Can I restore locked numbers after resetting to factory settings?
Yes, if you have synced with Mi Cloud before reset, when you first log in to your Xiaomi account, the lock will automatically recover after resetting. If sync is disabled, try to restore data from your local backup (/MIUI/backup/AllBackup/) or manually through the file system (root required).
๐Ÿ“ฑ Why After Updating MIUI all the locks are gone?
This is due to the change in the structure of the database in new versions. MIUI. For example, when moving from MIUI 12 on MIUI 14 table blocked_numbers It can be transferred to another location or change the format. Solutions: Restore locks from Mi Cloud. MIUI And export the list manually. Use it. ADB to extract data from the old database (the command above).
๐Ÿ”’ How to block the number so that it does not disappear after the update?
To keep locks alive whenever you change your system: Enable sync with Mi Cloud (Settings) โ†’ Xiaomi account โ†’ Mi Cloud โ†’ Synchronization โ†’ Contacts. Export the list of locked numbers to the.vcf file via the Phone app. Create a backup through Settings. โ†’ System system โ†’ Backup (select Contacts) If you have root rights, backup the file /data/data/com.android.providers.contacts/databases/contacts2.db. You can also use third-party blocking apps (like Truecaller) that store data in their cloud.
๐Ÿ“ Where the blocked numbers are stored POCO X3 Pro?
Nana POCO X3 Pro (and other global firmware devices) path to lock base: /data/data/com.android.providers.contacts/databases/contacts2.db However, due to the peculiarities MIUI for POCO You may need to: Use adb root to access the folder. Disable SELinux with setenforce 0. Restore rights to the chmod folder 755 /data/data/com.android.providers.contacts/. In some versions, the locking is duplicated in /data/user_de/0/com.android.providers.contacts/databases/.
โ˜๏ธ Can I transfer my locked numbers to another Xiaomi phone?
Yes, there are several ways: Through Mi Cloud: Log in to the same Xiaomi account on both phones and enable contact sync. Through export/import: On an old phone, export locks to a.vcf file (via the Phone app) and on a new one import it through Contacts. โ†’ โ‹ฎ โ†’ Imports/Exports, through rut and ADB: Copy the file. contacts2.db From old phone to new phone (root rights required on both devices) via Titanium Backup: Create Contacts Storage backup on an old phone and restore it on a new one. contacts2.db Please note that the versions MIUI Both phones must be compatible (or matched).