Xiaomi smartphones (including the Redmi line and POCO) store SMS-It's not as easy to find them as normal photos or documents, unlike media files that are in a folder. DCIM Or Downloads, the messages are hidden in Android service directories, which are not available without special permissions. SMS How to view them without root rights, and why standard file managers donโt show these files.
Complicating the problem is that MIUI (Xiaomi firmware) restricts access to system folders even through a Explorer. For example, if you connect your phone to a PC, you wonโt see the SMS database folder in standard mode. However, there are workarounds, from using ADB to specialized backup applications. Weโll look at all the current ways, from the simplest to the most technically complex, and explain why remote SMS can only be restored for a limited time (before data is overwritten with new messages).
Where to store SMS on Xiaomi: The path to the database file
All right. SMS-Android messages (including Xiaomi) are stored in the mmssms.db database, which is located along the way:
/data/data/com.android.providers.telephony/databases/mmssms.dbThis file contains not only the text of messages, but also metadata: sender number, date/time, status (read/unread) and even information about MMS. However, access to the /data/data/ folder is closed by default - it can only be viewed by:
- ๐ Root users (with smartphones with unlocked bootloader and superuser rights).
- ๐ฑ System applications (e.g., Xiaomiโs standard Messages app).
- ๐ป ADB-teams (through debugging of the USB, but with limitations).
On Xiaomi devices with MIUI 12-14, the path remains the same, but the base structure may vary slightly depending on the firmware version. For example, in some MIUI builds for POCO F5 or Redmi Note 12, a file is called telephony.db and stores both SMS and call data.
How to view SMS without root: 3 working ways
If you don't have root rights, you can't access the mmsms.db file directly.
1. Through the "Messages" and Export Application
Xiaomiโs standard Messages app** allows you to export SMS to.xml or.txt:
- Open the Messages app.
- Tap it on three points (โฎ) โ Settings โ Additionally. โ Export of communications.
- Select the dialogs for export and format (XML is recommended for backup).
- The file is saved in the MIUI/Backup/AllBackup folder.
2.Use of ADB (without root)
Using Android Debug Bridge (ADB) you can copy the SMS database to your computer:
adb pull /data/data/com.android.providers.telephony/databases/mmssms.dbHowever, this method only works if:
- โ On the smartphone included debugging on USB (Settings โ The phone. โ Version. MIUI โ 7 times to tap โ Additional settings โ Developer parameters).
- โ You have not unlocked the bootloader (otherwise). ADB require confirmation of rights).
๐ก
If ADB issues a โPermission deniedโ error, try running the adb shell first, then run-as com.android.providers.telephony cat databases/mmssms.db > /sdcard/mmssms.db. The file will appear in the root folder of internal memory.
3. Third-party backup applications
Applications like SMS Backup & Restore or Super Backup can back up SMS without root. They use the Android API to read messages and save them to the cloud or local file.
Install a backup app (e.g. SMS Backup & Restore)
Connect to Google Drive or another cloud service
Make sure your phone has enough free memory.
Turn off battery optimization for backup application-->
How to open the file mmsms.db: programs for viewing
Copying the database of mmssms.db (via ADB or root) will give you a binary file that cannot be opened as normal text.
| Programme | Type | Support for MIUI | Reference |
|---|---|---|---|
| DB Browser for SQLite | Desktop (Windows/macOS/Linux) | Yes (opens mmsms.db) | Official website |
| SQLite Editor | Android app | Partially (root needed) | Google Play |
| SQLiteStudio | Desktop (cross-platform) | Yes (supports all MIUI tables) | Official website |
In the database mmssms.db SMS are stored in the table sms.
- id is a unique identifier of the message.
- Address โ the phone number of the sender/recipient.
- body SMS.
- Timetamp (time in milliseconds since 1970)
- Type - 1 (incoming), 2 (outgoing).
How to convert timestamp from the date field to readable format?
Can I restore remote SMS on Xiaomi?
Deleted SMS does not disappear immediately, they are marked in the database as โdeletedโ and stored until new data takes their place.
- ๐ Time: If more than a week has passed, the probability is close to zero.
- ๐ฑ Phone Activity: The More New SMS The faster it gets, the older ones get rewritten.
- ๐ Optimization MIUI: Some firmware versions automatically clean up โjunkโ data.
For recovery, you can use:
- Root applications like Undelete SMS (scan the database for deleted records).
- ADB-base dump teams (if) SMS Not yet rewritten).
- Backups (if you have previously done a backup through MIUI Backup or third-party utilities).
โ ๏ธ Warning: Do not install recovery apps SMS Many of them require root rights and may contain malicious code. The official Google Play Store blocks these programs, so they are often distributed through the Internet. APK-file.
Where does MIUI store backup SMS copies?
If you have ever used the Local Backup feature in MIUI, then SMS archives can be found along the way:
/MIUI/Backup/AllBackup/Files are.bak and contain not only SMS, but also other data (contacts, notes, settings) to extract messages from them:
- Copy the *.bak file to your computer.
- Rename the extension to.zip and unpack the archive.
- Inside, there will be an SMS folder with a sms.xml or sms.db file.
For POCO and Redmi devices with MIUI 13/14, the path may be different:
/MIUI/Backup/{IMEI_devices}/โ ๏ธ Attention: Backup copies MIUI If you reset your phone to the factory settings and you don't log in to the same account, you can't recover data from the backup.
๐ก
Local MIUI backups store SMS in encrypted form. Without linking to your Xiaomi account, you can not restore them - use third-party backup utilities if you plan to reset your phone.
Frequent errors when working with SMS on Xiaomi
Users often encounter problems when trying to find or copy SMS. Consider typical errors and their solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| The file mmssms.db is not found on the standard path. | In some versions of MIUI, the database is called telephony.db. | Check the folder /data/data/com.android.providers.telephony/databases/ for alternative files |
| ADB issues Permission Denied | Insufficient rights or debugging over USB not enabled | Check the debugging status in Developer Settings and repeat the command with run-as |
| Backup app doesn't see SMS | MIUI blocks access to messages for third-party programs | Assign the application the role of โDefault for SMSโ in the settings |
Another common problem is that the SMS database is damaged, and this happens when you:
- ๐ Unexpected power outage during recording of the message.
- ๐ Critical battery charge level (below 5%).
- ๐ Failed update MIUI.
If the database is damaged, the Messages app may give an error Unfortunately, Messaging has stopped.
- Clean the app cache (Settings โ Applications โ Messages โ Storage โ Clear the cache).
- Delete the application data (will result in the loss of all SMS!).
- Restore from backup (if any).