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.
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.dbIn 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?
Alternative methods: backups and the cloud
If direct access to files is not possible (for example, on a locked phone), use alternative sources:
| Method | Where data is stored | Conditions required |
|---|---|---|
| Mi Cloud | Xiaomi 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 Contacts | Google Account (contacts.google.com) | Blocks are synced with Google (rarely working on the Internet) MIUI) |
| Titanium Backup | folder /TitaniumBackup/ on SD-map | Ruth-Right. + fixed-end |
For recovery from Mi Cloud:
- Go to Settings โ Xiaomi Account โ Mi Cloud.
- Select Restore and specify the backup date where the current locks were.
- 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 version | The path to lockdown | Features |
|---|---|---|
| MIUI 14 | /data/data/com.android.providers.contacts/databases/contacts2.db | Table blocked_numbers It contains the number and timestamp fields |
| MIUI 12/13 | /data/data/com.miui.contacts/databases/contacts.db | In 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.db | The 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:
- Open the phone. โ โฎ โ Settings โ Number locking.
- Press on. โฎ In the upper right corner and select Export.
- 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=+12345678903.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
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:
- Check out Mi Cloud: Signing in to your Xiaomi account can automatically restore locks.
- 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).
- 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.