Mobile technology users are often faced with the need to find the physical location of their correspondence in the file system. The question of which folder on Android SMS messages are stored in arises when trying to recover deleted data, transfer history to a new device, or simply out of curiosity about the architecture of the operating system. However, the answer is not as obvious as searching for photos in the gallery, since they are part of the system database, and not ordinary files. data-i="35">, text messages are protected by the system kernel security level. By default, they are located in a private section, which cannot be accessed without special rights ( SMS messages are part of the system database and not ordinary files.
Unlike media files, which are located in open directories like DCIM or Downloads, text messages are protected by the system kernel security layer. By default, they are located in a closed section, access to which without special rights (root) or the use of debugging tools. Understanding this structure is critical for those who plan to do backup manually or use third-party software for data migration.
There are several places where traces of your correspondence may be located, depending on the version Android, smartphone model and installed applications messengers. We will analyze in detail system paths, the location of backup files and methods of working with them so that you can effectively manage your message history.
System SMS database in a secure section
The main storage of all incoming and outgoing text messages in the Android operating system is an SQLite database. It is located deep in the system directory, which is hidden from the regular user and the file manager. The standard path to this file looks like /data/data/com.android.providers.telephony/databases/mmssms.db. This is where phone numbers, message texts, sending dates and delivery statuses are stored in table form.
An attempt to open this folder through a standard file explorer will result in an access error or a blank screen. This was done by the developers Google intentionally to protect user privacy. If an attacker or malicious application gains access to this file, it will be able to read all your private communications without your knowledge. Therefore, the system strictly delineates access rights between user space and the system kernel.
In order to access a file mmssms.db, you must have root access on the device. Without them, no file manager, even the most advanced one, will allow you to copy or view the contents of this database. Some custom recovery (for example TWRP) allows you to access this partition in recovery mode, but this requires technical training and an unlocked bootloader.
โ ๏ธ Attention: Directly editing the database file
mmssms.dbmay lead to complete inoperability of the Messages application. The system may stop accepting new SMS or display old ones. Always create a copy of the file before any manipulation.
If you do not have superuser rights, the only legal way to interact with this database is to use the debugging protocol ADB (Android Debug Bridge). It allows you to dump databases to your computer, bypassing some file system restrictions, but requires enabling USB debugging mode in the developer settings.
Backup folders and XML exports
Since direct access to the system database is difficult, most users and applications resort to creating backup copies in XML format. These files are already in a readable part of the memory - in the internal storage or on the memory card. Backup applications, such as SMS Backup & Restore, create files with the extension .xml or .zip, which contain downloading of all your correspondence in readable form.
Usually such files are saved in the root directory of the internal drive or in a specially created folder. The most common paths where you can find these archives:
- ๐
/sdcard/SMSBackupRestore/โa standard folder for a popular backup application. - ๐
/sdcard/Backup/โa general folder where some system utilities store data. - ๐
/sdcard/Android/data/[package_name]/files/โhidden folders of specific messenger applications.
Files in These directories can be freely copied to a computer, sent by mail or uploaded to cloud storage. The structure of the XML file is human-readable: each message is wrapped in a tag with address, date and type (incoming/outgoing) attributes. This is an ideal format for data migration between different phone models, even if they run on different versions of Android.
When restoring from an XML backup, make sure that the application that will read the file has permission to access the storage. In new versions of Android (11 and higher), access to the Android/data folder is limited, so it is better to save backups to the root of the internal memory.
It is important to note that the presence of these folders is not guaranteed by default. If you have never installed backup applications or manually exported them through your phone settings, there will be no such files on your device. The Android system does not automatically create XML copies of SMS in public memory without user intervention or third-party software.
Accessing data via computer and ADB
For advanced users who do not want to root but need to extract the database, there is a method to use ADB. This tool is part of the Android SDK Platform Tools and allows you to execute commands on your smartphone via your computer. With its help, you can make a copy of the sms system database without violating the integrity of the phone's file system.
The process is as follows: first you need to connect the phone to the PC with a cable and enable USB debugging. Then, through the command line on the computer, a command is executed to create a backup of a specific application. In this case, we are interested in the telephony provider. The command may look complicated for a beginner, but it is the standard for retrieving data:
adb backup -f sms_backup.ab -noapk com.android.providers.telephony
After executing this command, a confirmation request for creating a backup will appear on the smartphone screen. After confirmation, the file sms_backup.abwill appear on the computer. This file is in the proprietary Android Backup format and cannot be opened with regular text editors. To convert it into a readable TAR or XML, additional utilities will be required, such as Android Backup Extractor.
Why does the .ab format not open immediately?
The .ab file is encrypted and compressed with a specific algorithm to prevent unauthorized access to the data if the device is lost. Decryption requires the presence of a key that is generated when creating a backup, or the use of tools that can bypass this protection on unencrypted backups.
This method is the safest way to obtain a full copy of the database mmssms.db without the risk of damaging the system. It works on most devices with debugging enabled, regardless of root access. However, it is worth remembering that some manufacturers (for example Huawei or Xiaomi in some firmware) can block the command adb backup at the system level.
Storage features on different versions of Android
The data storage structure in Android is constantly changing with the release of new versions operating system. What worked on Android 6.0 may not be available or changed on Android 13 or 14. Google is tightening its security policies by introducing the concept of limited storage, which isolates app data from each other. Scoped Storage (limited storage), which isolates application data from each other.
The table below shows the main differences in access to SMS data depending on the software version:
| Android version | Access to /data/data | Backup type | Restrictions |
|---|---|---|---|
| Android 5.0 - 7.0 | Only with Root | Full system backup | Minimum restrictions |
| Android 8.0 - 9.0 | Only with Root | ADB Backup (partially) | Banning some backups applications |
| Android 10 - 11 | Closed | Google Cloud backup | Implementation of Scoped Storage |
| Android 12 - 14+ | Closed | Local XML/Cloud | Strict isolation of data folders |
Starting with Android 10, access to the folder Android/data for third-party file managers was significantly limited. Now you can't just go into that folder and see backup files created by other apps without granting special permissions through the system menu. This protects data from spyware, but makes life more difficult for ordinary users.
On modern devices, the emphasis shifts to cloud storage. Local files become less of a priority, as the system encourages synchronization with your account Google One. However, local copies are still created by many applications for reliability, itโs just that the paths to them become more confusing.
Third-party applications and cloud services
Given the complexity of manually searching for files, many users rely on specialized software. Applications like SMS Backup & Restore, Super Backup or built-in tools from manufacturers (Samsung Smart Switch, Xiaomi Mi Mover) automate the process. They themselves find the database, export it to an understandable format and save it in a directory specified by the user.
These applications often use their own compression and encryption algorithms. The backup file can be called not just sms.xml, but have a unique name with date and time, for example sms-20231025-143000.xml. They are usually stored in the root of the internal memory for ease of access when connected to a PC via USB.
In addition to local storage, cloud services play an important role. You can enable SMS synchronization in your Google account settings. In this case, your messages are physically stored on Google servers in encrypted form. It is impossible to find a specific folder on the server, since this is an abstract cloud storage that can only be accessed through authorization on the device during initial setup.
โ ๏ธ Attention: The conditions for synchronizing and storing data in the cloud may vary depending on Google's privacy policy and the laws of your country. Always check your account settings to understand exactly where your data is going.
Using third-party applications also carries risks. Low-quality software can save a backup in an unprotected folder that other applications have access to. Always check the permissions that your backup app asks for, and try to use open source solutions or from well-known vendors.
Recovering messages from found files
If you have successfully found the folder with SMS files, the next step is usually to restore them. You cannot simply copy the XML file back to the system folder - the system will not see the changes, since the database is loaded into RAM at startup and cached. For correct recovery, you need to use an importer application. /data/data/... it is impossible - the system will not see the changes, since the database is loaded into RAM at startup and cached. To restore correctly, you need to use an importer application.
The recovery process usually looks like this: you install the application that created the backup (or similar), specify it the path to the file .xml or .zip, and the app itself writes messages to the database via the system API. This is the only legal way to โreturnโ messages to a phone without root access.
โ๏ธ Preparing to recover SMS
If you have root access, you can replace the file mmssms.db manually. To do this, you need to copy your database file to the folder /data/data/com.android.providers.telephony/databases/, overwrite the existing file and be sure to change the permissions to the file, setting them to the value rw-rw---- (660). The owner and group must be radio or system. Failure to comply with access rights will lead to the crash of the messages application.
Manual replacement of the database is possible only if you have root access and requires strict adherence to file access rights (permissions), otherwise the system will block reading messages.
Remember that restoring messages from an old database to a new version of Android may cause format conflicts. Old fields in the database may not fit the new table structure. Therefore, the method with XML import through the app is considered more reliable and compatible across different Android versions.
Frequently asked questions (FAQ)
Can I read the mmssms.db file on a computer without a phone?
Yes, the file mmssms.db is a standard SQLite database. You can open it on your computer using apps like DB Browser for SQLite. However, if the file was encrypted by the system (starting from Android 7+, disk encryption is used), you will not be able to open it without a decryption key; you will only see a set of unreadable characters.
Where are SMS from instant messengers (WhatsApp, Telegram) stored?
Messages from Internet instant messengers are not stored in the SMS system database (mmssms.db). Each application has its own database, usually located in the /data/data/[application_package_name]/databases/folder. For example, WhatsApp stores data in msgstore.db, which is also protected and requires root or specific backup methods.
I deleted the sms.xml file, can I restore the correspondence?
If you deleted the backup file from the internal memory, you can only restore it using Data Recovery tools on the drive itself, which is not always successful. If the file was synchronized with the cloud (Google Drive), try restoring your phone settings from a Google backup when resetting to factory settings.
Why are SMS duplicated after recovery?
Duplication occurs if you import a backup over existing messages without first clearing the database. Some apps have a checkbox to โReplace current messagesโ or โDo not import duplicates.โ Always check your import settings before starting the process.
Does the number of SMS messages affect the speed of your phone?
Storing tens of thousands of messages in one database can slightly slow down the Messages app when scrolling through history or searching. However, this has virtually no effect on the overall speed of the Android system, since the database is optimized for working with large volumes of records.