The sudden disappearance of important correspondence in WhatsApp on Android after accidentally pressing the delete button, application crash or reinstallation of the messenger without an up-to-date copy in Google Drive causes a natural concern, especially if critical documents or unfinished agreements remain in the dialogue, however, the system architecture allows you to return this data, since it is not erased from the physical media instantly.
Many mistakenly believe that the absence synchronization with cloud storage puts an end to the ability to return information. However, the system local backupbuilt into the application by default creates copies of the database daily in hidden folders in the internal memory. Even if you haven't set up automatic cloud uploads, these files continue to be created and stored for a certain period, usually seven days. Understanding how this hidden system works is the key to successful recovery.
In this article, we will detail the technical aspects of the messenger file system and provide step-by-step guide for manual data extraction. You won't need complex hacking apps or paid services, which often turn out to be fraudulent. We will focus on legal and secure methods of working with files with the extension .crypt14 or .crypt15that contain the encrypted history of your messages. Get ready to work with the file manager and carefully follow the instructions.
Principles of local message storage
Messenger WhatsApp uses its own data storage structure, which differs from standard SQL databases that are understandable to the average user. All messages, media files and settings are stored in a special database file that is constantly updated in real time. However, to protect against failures, the application automatically creates snapshots of this file at a certain time of day, most often at 2 a.m. local device time.
These snapshots are saved to the internal memory of the smartphone in encrypted form. The encryption format is constantly updated by the developers: if previously it was used .crypt12, then modern versions use .crypt14 or .crypt15. The decryption key is tied to your device's unique ID and phone number, making it impossible to read these files on another smartphone without a special recovery procedure. It is this binding that provides a high level of confidentiality data.
It is important to understand that local copies are stored cyclically. Typically, no more than 7 recent backup copies remain in the device memory. When a new copy is created for the current day, the oldest one for the week is automatically deleted. This means that if you notice messages are missing after two weeks, the chances of recovery through standard methods are close to zero. Timely detection of the problem is critical.
โ ๏ธ Warning: Backup files take up a significant amount of memory, especially if there are a lot of media files in chats. Do not clear the application cache through the Android settings if you plan to restore, as this may affect service directories.
Check the presence of the WhatsApp folder in the file manager immediately after detecting the loss. The less you use your phone, the higher the chance that old files will not be overwritten by new system data.
The location of these files has changed with the release of new versions of the operating system Android. On older devices (before version 10-11), the path was simple and lay in the root of the internal memory. On modern smartphones with enhanced security, access to system folders is limited, and files are moved deeper into the directory structure. Knowing the exact path for your OS version is the first step to success.
Searching and identifying database files
To begin the recovery procedure, you will need any advanced file manager that can display hidden files and have access to system directories. Standard explorers preinstalled by the smartphone manufacturer sometimes hide the folder Android or restrict access to it. It is recommended to use proven solutions, such as Total Commander, FX File Explorer or Files by Google with issued permissions.
You need to find files with names like msgstore-YYYY-MM-DD.1.db.cryptXX, where XX is the encryption version, and YYYY-MM-DD โ date the copy was created. There will also be a file msgstore.db.cryptXX without a date in the name - this is the current active database, which most likely no longer contains deleted messages or contains an empty structure after reinstallation.
- ๐ Open the file manager and go to the root of the internal memory.
- ๐ Find the folder
Android, thenmedia, furthercom.whatsappandWhatsApp(path for Android 11+). - ๐ For older versions of Android, look for the folder
WhatsAppimmediately in the root and inside it directoryDatabases. - ๐ Make sure that the folder
Databaseshas files with dates preceding the moment the chat was deleted.
If you do not see the folder Databases, backup may have been disabled in the settings of the application itself before the data was lost. In this case, go to Settings โ Chats โ Chat backup and check the date it was last saved. If it says "Never" or the date is older than the time of deletion, local files may be missing. However, sometimes files remain in the system cache even when the setting is disabled, so itโs worth checking the file managerโs recycle bin if such a function exists.
Pay special attention to file extensions. If you see files with the extension .db without a prefix .crypt, this may mean that encryption is disabled (which is rare for modern versions) or you have corrupted data. A normal working file is always encrypted. Having several files with different dates gives you the opportunity to select a recovery point that is as close as possible to the moment when the messages still existed.
Manual recovery by renaming files
The most effective method of recovery without the cloud is to replace the current database with a saved copy. To do this, you must follow a strict sequence of actions, since violating the order can lead to complete loss of access to chat history. Before starting the operation, it is strongly recommended to copy the entire folder Databases to a safe place, for example, on a computer or in a cloud storage, in order to be able to rollback.
First you need to delete or rename the current database file so that the application does not try to load it at startup. Find the file msgstore.db.cryptXX (no date in the name) and change its name by adding the word .oldto the end. Now the application will not see this file as an active database. Next, select the backup file with the desired date, for example, msgstore-2023-10-25.1.db.crypt14.
Before: msgstore-2023-10-25.1.db.crypt14
Now: msgstore.db.crypt14
Rename the selected file by removing the date and version numbers before the extension from its name, leaving only msgstore.db.cryptXX. It is important to keep the extension exactly the same as that used in the rest of the files in this folder. After renaming, make sure that there is only one file left in the folder with the name msgstore.db.cryptXX โthe one you just renamed from the backup.
| Action | Source file name | Target file name | Status |
|---|---|---|---|
| Archiving the current database | msgstore.db.crypt14 | msgstore.db.crypt14.old | Hidden from WhatsApp |
| Selecting a backup | msgstore-2023-10-20.1.db.crypt14 | (no changes) | Candidate for restoration |
| Activate a copy | msgstore-2023-10-20.1.db.crypt14 | msgstore.db.crypt14 | Ready to download |
| Launch the application | - | - | Automatic detection |
After performing these manipulations, you must completely close the application WhatsApp. Go to your smartphone settings, find the โApplicationsโ section, select the messenger and force stop it. It is also recommended to clear the application cache, but not the data. Only after this can you launch the messenger. At startup, the system will detect the file msgstore.db.cryptXX and offer to restore the history from a local copy.
โ๏ธ Checklist before recovery
Recovery via computer and ADB
If working with a file manager on a smartphone screen seems inconvenient to you or access rights are limited, you can use a computer. This method requires you to enable USB debugging mode (USB Debugging) in the developer options on your smartphone. Connect the device to the PC and use the utility ADB (Android Debug Bridge) for direct access to the file system.
Using the command adb pull you can copy the entire database folder to your computer, where it is more convenient to rename files and analyze their sizes. The size of the file indirectly indicates the amount of information it contains: an empty database will weigh several kilobytes, while the complete correspondence history for a week can occupy tens of megabytes. This will help you select the correct copy to restore.
After preparing the file on your computer, use the command adb push to download the renamed file msgstore.db.cryptXX back to the directory /sdcard/Android/media/com.whatsapp/WhatsApp/Databases/. Make sure the file permissions are correct. This method is more reliable, as it eliminates accidental errors when touching the screen and allows you to work with files in the familiar Windows or macOS environment.
โ ๏ธ Attention: USB debugging mode provides full access to the device. Do not enable it on other people's computers and do not approve access requests from unknown devices. After completing the work, disable debugging in the settings.
It is worth noting that on some smartphone models with MIUI or EMUI shells, access via ADB to the folder Android/media may be limited without providing special permissions through the developer menu. In this case, you may need to temporarily grant rights through the command adb shell appops set com.android.providers.media mode default, however, the syntax of the commands may vary depending on the version of Android.
What to do if ADB does not see the device?
Make sure that the ADB drivers for your phone model are installed. Try a different USB cable or port. When connecting, a window should appear on the phone screen asking for permission to debug - click "Allow".
Limitations and possible problems during recovery
Even if all technical manipulations are successfully completed, there are a number of limitations that the user should be aware of in advance. The main one is the impossibility of partial restoration. You can't pull just one specific message or conversation with one contact from the backup. Restoration always occurs completely, replacing the current chat history with the one that was at the time the copy was created.
This means that all messages received between the date of the backup and the current moment will be irretrievably lost. If you restore a copy from yesterday, all of today's new messages will disappear. Therefore, before the procedure, it is worth assessing the importance of old data compared to new ones. Sometimes it is more advisable to leave everything as is, if the lost messages are not critical.
- โ Messages sent after the backup date will be deleted.
- โ Media files (photos, videos) that were uploaded to the chat, but not saved to the gallery, may not be restored if they were not part of the database on moment of backup.
- โ Privacy settings and chat options will return to the state on the backup date.
Another common problem is incompatibility of encryption versions. If you updated the application WhatsApp to a new version, and the backup was created by an old version, the encryption keys may not work. In most cases, the application can work with different versions .crypt, but if there is a significant gap between versions (for example, several years), recovery may fail with the error โInvalid decryption key.โ
Restoring from a local copy is replacing the entire current history with the old one. New messages received after the backup date will disappear forever. Weigh the risks before you begin.
Preventing data loss in the future
In order to no longer face the need for complex manipulations to restore data, it is worth setting up an automatic backup system. The most reliable option is to use Google Drive. Go to your chat settings and enable daily backups. Make sure that you select to copy not only text, but also video files, if space in the cloud allows.
In addition to cloud solutions, make it a rule to manually copy a folder once a month Databases to a computer or external drive. This will create a long-term archive that will not be overwritten by cyclical deletion of old files on the phone. Storing correspondence history outside the device is the only guarantee of data safety if the smartphone breaks down or is lost.
It is also recommended to periodically check the integrity of backup copies. Try restoring your data to a spare device or emulator to ensure that the files are not corrupted and that the encryption keys are working correctly. Regular checking takes a few minutes, but saves hours of nerves in a critical situation.
Can I restore a chat if I change my phone number?
No, the encryption keys are tied to the phone number. If you change your number, the old database will not match the new account. You must first change the number within the application (the "Change number" function in the settings) to transfer the history, and only then make backup copies.
Will third-party data recovery apps help?
Most apps that promise recovery without root access is fraudulent. They cannot decrypt files .crypt without the key stored in a secure area of โโthe system. The only working method is the official procedure for restoring from a backup file.
What to do if the msgstore.db.crypt file is damaged?
If the file is damaged, recovery is not possible. Try another copy with an earlier date. If all the files in a folder are damaged, the data is lost forever. In the future, set up duplicate copies on your computer.
Will WhatsApp be deleted from the phone when restored?
No, you do not need to delete the application. Just clear the cache and rename the files. Deleting the application is only required if you want to reset all settings and start from scratch, but for restoring from a local file this is an unnecessary step.
Where are the decryption keys stored?
The keys are stored in a secure section of Android memory (/data/data/com.whatsapp/files/key). Access to this section is possible only with superuser rights (Root). That is why you cannot simply copy the database to another phone and read it.