Have you accidentally erased an important message or suspect that someone has deleted an SMS on your Android smartphone? Many users mistakenly believe that after clicking โ€œDelete,โ€ messages disappear forever. In fact Deleted SMS remain in the device memory - they simply become unavailable for standard viewing. Where exactly they are stored, how long they are stored and whether they can be restored - we will look at this guide.

Android uses SQLite databases to store messages, and even after deletion, the entries are not physically erased from the drive. Instead, the system marks them as "free", allowing new data to overwrite these areas. This means that when quick response the chances of recovery are up to 80% in the first 24 hours - but drop to 10% after a week of active use of the phone. Next, we will analyze where exactly to look for the trace of deleted SMS, what tools will help retrieve them, and why some methods only work on rooted devices.

How SMS storage works in Android: system files and databases

All messages on Android are stored in a single database mmssms.db, which is located in a protected system folder. The path to it depends on the OS version and manufacturer, but most often it looks like this:

/data/data/com.android.providers.telephony/databases/mmssms.db

This database contains several key tables:

  • ๐Ÿ“„ sms โ€” the main table with message texts, sender numbers and time stamps
  • ๐Ÿ”„ pending_msgs โ€” queue of unsent SMS
  • ๐Ÿ—‘๏ธ deleted_sms โ€” temporary storage "deleted" messages (not on all devices)

When you delete an SMS through the standard "Messages" application, the entry in the table sms is not erased, but is marked with a flag deleted=1. Physical deletion occurs later - when the database is optimized or there is not enough space. On devices with MIUI (Xiaomi) and ColorOS (Oppo) an additional layer of encryption may be used, which complicates recovery.

๐Ÿ’ก

On some firmware (for example Flyme from Meizu), deleted SMS are temporarily moved to a folder /data/com.android.providers.telephony/databases/backup. Check it first if messages have disappeared recently.

5 places where deleted SMS can be stored after erasing

Even if the message is not visible in the standard interface, copies of it may remain in different parts of the system. Here's where to look:

Storage source Path/access method Probability of finding
System base mmssms.db /data/data/com.android.providers.telephony/databases/ โญโญโญโญโญ (up to 90% at root)
Google Backups Settings โ†’ Google โ†’ Backup โญโญโญ (if enabled)
Messages app cache /data/data/com.android.mms/cache/ โญโญ (text fragments)
System process logs /data/log/ or logcat โญ (metadata only)
Cloud services (Samsung Cloud, Mi Cloud) Manufacturer's personal account โญโญโญโญ (when synchronized)

On devices Samsung with firmware One UI Additionally, check the folder /dbdata/databases/com.android.providers.telephony/ โ€”duplicates of the database may be stored here. Owners Huawei should pay attention to the service Huawei Cloud, which automatically archives SMS when synchronization is enabled.

๐Ÿ“Š How often do you backup SMS?
Never
Once every month
Only before reset
Automatically via Google

Is it possible to restore SMS without root access? Real methods

Most users do not Root access, but this does not mean that recovery is impossible. Here are working methods without superuser rights:

  1. Google Backup

    If the "SMS" option is enabled, messages are automatically saved in the cloud. You can restore them the first time you launch the Messages app after a reset or on a new device. Settings โ†’ Google โ†’ Backup The โ€œSMSโ€ option is enabled, messages are automatically saved in the cloud. You can restore them the first time you launch the Messages app after a reset or on a new device. Limitation: only the latest copy is stored (usually 24 hours before).

  2. Specialized applications

    Utilities like SMS Backup & Restore or DroidKit scan the internal memory for database remnants mmssms.db. They do not require root, but the effectiveness depends on the phone model. On Samsung Galaxy S22 and newer, the chances are higher thanks to the open API.

  3. Local backups

    Some manufacturers (for example, Xiaomi) create local copies in /MIUI/backup/AllBackup/. These files can be opened via Mi PC Suite even without root. Important: backups are encrypted, so you will need the original password from your Mi account.

Why do applications without root find only part of the SMS?

Without superuser rights, utilities scan only the cache and temporary files, but do not have access to the protected folder. /data/data/. Therefore, they restore only those messages that have not yet been overwritten by new data.

On devices with Android 12+ Google has tightened its security policy, so even popular tools like Dr.Fone often require USB debugging (Settings โ†’ For developers โ†’ USB debugging). Without this, scanning is limited to superficial analysis.

SMS recovery with root access: step-by-step guide

If your device is unlocked rootthe chances of successful recovery increases to 95%. Here's how to proceed:

Install a file manager with root access (for example, Root Explorer)

Download an SQL editor (SQLite Editor)

Disconnect the Internet to avoid overwriting data

Create a backup copy of the folder /data/data/com.android.providers.telephony/

-->

  1. Find the database

    Open Root Explorer and follow the path:

    /data/data/com.android.providers.telephony/databases/mmssms.db

    Copy the file to the SD card or to the cloud.

  2. Open the database in the SQL editor

    Use SQLite Editor or DB Browser for SQLite (on PC). In the table sms find the rows with deleted=1. You can export them to CSV or directly change the flag to deleted=0 for. recovery.

  3. Restore via ADB

    For advanced users: connect the phone to the PC, open the command line and run:

    adb pull /data/data/com.android.providers.telephony/databases/mmssms.db
    

    sqlite3 mmssms.db "UPDATE sms SET deleted=0 WHERE deleted=1;"

On devices with Custom ROM (for example, LineageOS) the path to the database may differ. Also check the folder /data/user_de/0/com.android.providers.telephony/databases/ โ€”duplicates are sometimes stored here.

๐Ÿ’ก

Even with root, it is not always possible to restore SMS if more than 3 days have passed since deletion. The Android system automatically optimizes databases by physically erasing marked entries.

What to do if SMS were deleted a long time ago: alternative methods

If more than a week has passed, standard recovery methods rarely work. In this case, try:

  • ๐Ÿ” Contact your telecom operator

    Rostelecom, MTS and Beeline store SMS logs for 3โ€“6 months (according to the communications law). To obtain a copy, you will need a passport and a written application. The service is paid (from 300 to 1000 rubles).

  • ๐Ÿ’พ Checking the memory card

    If messages were saved to an SD card (on older versions of Android), use PhotoRec or Recuva for scanning. Look for files with the extension .db or .sqlite.

  • ๐Ÿ“ฑ Analysis of synchronized devices

    If the phone was connected to Samsung Smart Switch, Mi PC Suite or similar apps, check the archives on your computer. These utilities often create full backups, including SMS.

On devices with Android 10+ and encrypted storage (File-Based Encryption), recovery through the operator may be the only option. Manufacturers like Google Pixel i OnePlus use hardware encryption that blocks access to deleted data even from root.

๐Ÿ’ก

If the SMS contained important information (for example, verification codes), check the associated accounts. Many services (VKontakte, Telegram) link a phone number to a profile and can store a history of notifications.

How to prevent SMS loss in the future: 4 reliable ways

In order not to search for deleted messages, it is better to set up automatic backup in advance. Here are proven methods:

  • โ˜๏ธ Google Backup

    Enable the "SMS" option in Settings โ†’ Google โ†’ Backup . The data will be synchronized with the cloud and restored when reset. Restriction: does not work on some Chinese firmware (for example, Realme UI).

  • ๐Ÿ“ฒ SMS Backup & Restore

    The application creates local backups in XML format, which can be exported to a PC or Google Drive. Supports encryption and choice of frequency (daily/weekly).

  • ๐Ÿ”— Synchronization with email

    Services like SMS to Email automatically forward incoming messages to the specified address. business correspondence.

  • ๐Ÿ’ผ Corporate solutions

    For business users: Microsoft Intune or VMware Workspace ONE archive SMS within the framework of the MDM (Mobile Device Management) policy.

On devices with Android 13+ Google has introduced the โ€œMessage Archiveโ€ feature, which automatically saves old SMS in a compressed form. To enable it, go to Messages โ†’ Settings โ†’ Archive.

Frequent errors when recovering SMS and how to avoid them

Many users make the situation worse. incorrect actions. Here's what You can't do:

โš ๏ธ Attention: Never install new applications or update existing ones immediately after deleting SMS. This leads to overwriting the memory areas where messages were stored.
  • ๐Ÿšซ Use Junk Cleaner

    Applications like Clean Master or built-in tools (for example, Settings โ†’ Storage โ†’ Cleaning) physically erase temporary files, including the remains of the database mmssms.db.

  • ๐Ÿ”„ Reset settings

    Hard Reset (Settings โ†’ System โ†’ Reset) completely clears the partition /data, where SMS are stored. The chances of recovery after this are close to zero.

  • ๐Ÿ“ฑ Connect the phone to the PC in the โ€œFile Transferโ€ mode

    When connected via USB, the system can automatically optimize the storage, overwriting deleted data. Use the โ€œCharge Onlyโ€ mode.

If you plan to use paid utilities (for example, Tenorshare UltData), first check their compatibility with your phone model. Some tools do not work on Mediatek processors or devices with Dynamic RAM (for example, Samsung Galaxy S23).

โš ๏ธ Attention: On phones with Android 14 and newer Google blocks access to system databases even for root applications. This is part of the policy Scoped Storageso traditional recovery methods may not work.

FAQ: Answers to frequently asked questions about SMS recovery

Is it possible to restore SMS after a factory reset? settings?

The chances are minimal (less than 5%), since the reset clears the section /datawhere the message database is stored. An exception is if you had Google backup enabled or the manufacturer's cloud (Samsung Cloud, Mi Cloud). In this case, SMS will be restored automatically when you first set up the phone.

Will apps like Dr.Fone help if the phone is not rooted?

Yes, but the effectiveness depends on the model. On Samsung i Google Pixel these utilities scan the cache and temporary files, finding up to 30% of deleted SMS on devices with closed messages. firmware (for example Huawei without Google services) the result is usually zero. Always check whether your model is supported on the app website.

Where are SMS stored in phones with two SIM cards?

Messages for each SIM are stored in one database mmssms.db, but have different labels in the field subscription_id (for example, 1 for SIM1 and 2 for SIM2). When restoring, filter entries by this parameter so as not to confuse the correspondence.

Is it possible to recover SMS deleted more than a year ago?

Technically, no, since the data is overwritten many times during this period. The only chance is if the messages were archived by third-party services (for example, via SMS Backup & Restore with export to a PC) or by a telecom operator. In the latter case, a request for logs will cost 500โ€“1500 rubles.

Why are recovered SMS displayed without the contact name?

This happens because the database mmssms.db stores only phone numbers, and the link to contacts is taken from a separate database contacts2.db. If a contact has been deleted or changed, the system cannot match the number to the name. Solution: manually edit the recovered messages in the Contacts application.