Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Where Are Text Messages Stored on Android?

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Text messages on Android are stored in an encrypted SQLite database inside the app's private data folder, typically at /data/data/com.android.providers.telephony/databases/mmssms.db. You cannot access this directly without root permissions, but you can view, back up, or export your messages through built-in tools or official apps. This guide explains exactly where the files live, how to access them safely, and what to do if you can't find them.

What You'll Need

  • An Android phone (any version, though menu labels vary slightly by manufacturer and Android version)
  • Optional: A USB cable and a computer if you want to back up via ADB
  • Optional: A third-party SMS backup app from the Google Play Store (official only)

Step-by-Step

  1. Understand where messages physically live. On all Android devices, SMS and MMS are stored in a database file named mmssms.db (or mmssms.db-wal and mmssms.db-shm for the write-ahead log). The full path is /data/data/com.android.providers.telephony/databases/. This folder is part of the system's protected storage, so you cannot browse to it with the default file manager.
  2. Check if you have a file manager that can see system folders. Some file managers (like Solid Explorer or FX) can access /data only if your device is rooted. If you are not rooted, skip to step 3. If you are rooted, open the file manager, grant root access, and navigate to /data/data/com.android.providers.telephony/databases/. You'll see the database files there, but they are encrypted and not human-readable.
  3. Use the Messages app's built-in export (if available). Open the default Messages app, tap the three-dot menu, and look for "Settings" or "Chat features." Some manufacturers (like Samsung) offer a "Back up messages" option that saves to your Samsung account or Google Drive. This is the safest way to keep a copy without touching system files.
  4. Back up with Google One (Android 12 and newer). Go to Settings > Google > Backup. Ensure "Back up by Google One" is turned on. Your SMS and MMS will be included in the backup if the toggle for "Messages" is enabled. This backup is stored in your Google account, not as a visible file on your phone.
  5. Use ADB to pull the database (no root needed). On your computer, install Android Platform Tools (official from Google). On your phone, enable Developer Options by going to Settings > About phone and tapping "Build number" seven times. Then go to Settings > System > Developer options and enable "USB debugging." Connect your phone to the computer, accept the debugging prompt, and run adb backup -f backup.ab com.android.providers.telephony. This creates a backup file on your computer. To extract it, you'll need a tool like Android Backup Extractor (open source, official). Note: On Android 12+, this method may fail due to backup restrictions; if so, use a Play Store backup app instead.
  6. Export messages with a third-party app. Install a reputable SMS backup app from the Google Play Store (e.g., SMS Backup & Restore). Open the app, grant permission to read SMS, and tap "Back up." Choose a location like Google Drive or local storage. The app will create an XML file containing all your messages in a readable format.
  7. View messages on a computer (if needed). After exporting, open the XML file in any text editor or use the app's "View" feature. You can also import the XML into a spreadsheet or a dedicated viewer.

Common Mistakes

  • Assuming you can see the database with a regular file manager. The /data folder is hidden and protected by Android's sandbox. Without root, you'll never see it, and that's normal.
  • Clearing the Messages app's data to "free space." This deletes all your texts permanently. Never clear app data for the Messages app unless you have a backup.
  • Using an unofficial APK to "extract" messages. These apps often require root or contain malware. Stick to Play Store apps or ADB.
  • Thinking the messages are stored as individual files. They are all in one database, not as separate .txt or .xml files.

Tips

  • Back up regularly. Set a weekly automatic backup using a Play Store app to avoid losing important conversations.
  • Use Google Drive for backup. If you use Google One, your messages are included in the cloud backup automatically when you charge your phone overnight.
  • For forensic or legal needs, use ADB. The ADB backup method creates a full snapshot of the messaging database, which is more complete than XML exports.
  • Know that encrypted backups are not readable directly. If you use ADB, the .ab file is encrypted unless you set a password. Use a password you remember, or you won't be able to restore it.

Troubleshooting

If you can't find the database at all: You're not rooted, so the path is invisible. Use the ADB method or a backup app instead. Do not attempt to root just for this—it voids warranty and can brick your phone.

If ADB backup fails with "backup failed" or "encryption unsupported": On Android 12 and later, Google restricted ADB backups for security. Use a Play Store backup app that uses the official SMS permissions (like SMS Backup & Restore) instead.

If the backup app doesn't show all messages: Some apps only back up SMS, not MMS (pictures/videos). Check the app's settings to enable MMS backup. Also ensure you've granted the app permission to read SMS and phone storage.

If the database is corrupted: If you're rooted and the file is unreadable, you might have a corrupted database. Do not delete it manually—use the Messages app's "Clear storage" option in Settings > Apps > Messages > Storage, but note this deletes all messages. Only do this if you have a backup.

Frequently Asked Questions

Can I read the mmssms.db file directly?

No. It's in a binary SQLite format and encrypted on most devices. You need to export or back up through official methods to view messages in a readable format.

Do text messages count against my phone storage?

Yes, but very little. Each SMS is about 0.1 KB, so even thousands of texts use less than 1 MB. MMS (photos/videos) can be larger, but they're still small compared to apps and media.

Will factory reset delete my text messages?

Yes. A factory reset wipes the entire data partition, including the telephony database. Always back up before resetting.

Can I recover deleted text messages?

If you have a backup (Google One, manufacturer backup, or third-party app), yes. Without a backup, recovery is nearly impossible on modern Android due to encryption and wear-leveling.

Are text messages stored on the SIM card?

No. SIM cards can store a limited number of SMS (usually 20–50), but Android stores all messages on the phone's internal storage by default. You'd have to manually move messages to SIM, which is rarely supported on modern phones.

Do third-party SMS apps store messages differently?

No. All SMS apps (like Textra or Pulse) use the same system database. They don't create separate storage; they just read and write to the same mmssms.db file.