Changing a smartphone is always stressful, associated not so much with getting used to a new gadget, but with the need to migrate digital data. Of particular concern to users is the issue of saving the history of correspondence in messengers, because work files, important contacts and personal memories are stored there. Standard Google Drive cloud backups are often unstable or require too much time to download large amounts of data, especially if the Internet speed leaves much to be desired.

That is why using a personal computer as an intermediate link becomes the most reliable and controlled method. Local backup allows you to physically see files, control the process of their movement and be confident in the integrity of the information. Unlike cloud methods, here you do not depend on the stability of Google servers or the speed of your Wi-Fi router at the time of a critical transfer.

In this article we will analyze in detail the mechanics of the file system Android in the context of the messenger WhatsApp. You will learn where exactly the databases are stored, how to correctly extract them, transfer them to a new device, and make the application recognize them as its own. We will go through all the nuances, including working with file paths in new versions of the operating system.

Preparing the workspace and source device

Before you begin manipulating files, you need to ensure a stable connection between your smartphone and computer. Use an original USB cable, as cheap analogues often only support charging and do not transfer data, which can lead to false conclusions about a device malfunction. Connect the old phone to the PC and select the mode File transfer or MTP.

in the menu that appears on the smartphone screen. At this stage, it is important to make sure that the current version of the application is installed on both devices. WhatsApp. Differences in software versions can result in incompatible database formats, especially if you are transferring data from a very old phone to a newer model. Also check that there is enough free space on your computer's hard drive to temporarily store a copy of your chats.

โš ๏ธ Attention: Do not remove the USB cable during the file copying process. Interruption of data transfer can damage the database structure, making it unreadable for the messenger.

For ease of use, it is recommended to display hidden files in Windows Explorer, although in the latest versions Android the folder structure has become more transparent. If you use macOS, you will need an application Android File Transfer or an analogue OpenMTP, since the built-in Finder does not see Android devices without additional software.

โ˜‘๏ธ Ready to transfer

Done: 0 / 4

Search and retrieve local database

The key point of the entire operation is to correctly determine the location of the backup files. In modern versions Android (starting from version 11), Google has changed the file access policy, moving application folders to the system partition. Now the path to your data most often looks like Android/media/com.whatsapp/WhatsApp/Databases.

However, on older devices or depending on the manufacturer's firmware, the files may be located in the classic path WhatsApp/Databases in the root of the internal memory. You need to find a file named msgstore.db.cryptXX, where XX is the encryption version number. It is this file that contains all your correspondence at the moment.

Copy this file to your computer desktop. If you also want to save media files (photos, videos, voice messages), you will need a folder Medialocated in the same directory as Databases. Please note that the volume of the media folder can reach tens of gigabytes, so the copying process will take time.

  • ๐Ÿ“‚ Find the folder Databases inside the directory WhatsApp.
  • ๐Ÿ’พ Copy the file msgstore.db.cryptXX to your computer.
  • ๐Ÿ“ธ If necessary, copy the folder Media to save photos and videos.
  • ๐Ÿ”’ Remember or write down the encryption version number (crypt14, crypt15, etc.).
What does the crypt number mean?

The encryption version number (for example, crypt14 or crypt15) indicates the algorithm with which the database is encoded. WhatsApp automatically updates this algorithm when you update the app. If you try to restore a database with newer encryption on an older version of the application, the restore will fail. However, when transferring the current WhatsApp to a new phone, compatibility is usually maintained automatically.

Setting up a new smartphone and initial installation

After successfully copying the files to your computer, switch your attention to the new smartphone. The initial task is to install the application WhatsApp from the official store Google Play, but do not launch it or register yet. We need to prepare the file structure manually.

Connect the new phone to the computer in file transfer mode. Your goal now is to recreate the exact folder structure you previously extracted data from. If the folder on the new device WhatsApp has not yet been created (since you have not launched the application), create it manually in the root of the internal memory or along the path Android/media/com.whatsapp, following the logic of the new system.

It is important to observe the hierarchy: inside the folder WhatsApp there must be folders Databases i Media. Move the previously saved database file inside the folder Databases on the new phone. Make sure that the file name remains unchanged, otherwise the application will not be able to find it.

Element Old path (Android 10 and below) New path (Android 11 and above)
Root folder /WhatsApp/ /Android/media/com.whatsapp/WhatsApp/
Folder with databases /Databases/ /Databases/
Correspondence file msgstore.db.cryptXX msgstore.db.cryptXX
Media files /Media/ /Media/

Only after the files are placed in the correct directories, you can launch the application. When you first start WhatsApp you will be asked to confirm your phone number. Use the same number that was on the old device, since the account is linked using it.

Recovery process and data verification

When you enter the phone number and go through verification via SMS or call, WhatsApp it will detect the presence of a local backup. The system will ask you to restore chat history from local storage. It is critical to click the "Restore" button at this momentotherwise the application will ignore the files you uploaded and begin synchronizing with the Google Drive cloud, which may be empty.

The restoration process will take some time, depending on the size of the database data. At this point, a progress bar may be displayed on the screen. Do not interrupt the process and do not switch to other heavy applications so as not to load the smartphoneโ€™s processor, although modern devices cope with this task quickly.

After the recovery is complete, you will see your chats. However, media files (photos and videos inside chats) can be loaded gradually in the background. If you moved the folder Media manually, check the gallery and attachments in chats - they should be in place.

โš ๏ธ Attention: The interface and names of menu items may vary slightly depending on the version of Android and the manufacturer's shell (MIUI, OneUI, ColorOS). Always focus on the logic of the folder structure, and not just the visual similarity of the screens.

Solving common problems and conflicts

Often users are faced with a situation where the application does not see the local backup. This may be due to a file name or Google account mismatch. Make sure that the same Google account is added to the settings on the new phone as on the old one, even if you are restoring locally, as the system may check the license binding.

Another common problem is a file format error. If you accidentally renamed a file or copied the wrong version (for example, a file with a date msgstore-2023-10-05.1.db.crypt14 instead of the main one msgstore.db.crypt14), the recovery will not begin. The main file should always be named simply msgstore.db.cryptXX without dates in the name.

In some cases, anti-virus software or built-in protection Android may block application access to manually created folders. If recovery does not work, try giving the application all requested permissions to access files and memory immediately after installation, until recovery.

  • ๐Ÿ” Check whether the encryption version number (crypt) in the file name matches what the application expects.
  • ๐Ÿ“‚ Make sure that the file path is absolutely identical to the required folder structure.
  • ๐Ÿ”„ Reboot your smartphone if the recovery process freezes at any stage.
  • ๐Ÿ“ฑ Check whether there is enough free memory on the new device to unpack the archive.

Final optimization and integrity check

After successful migration, do not rush to delete files from your old phone and computer. Use your new device as normal for a couple of days to make sure all messages arrive correctly and media files open. Local backups on the new phone will now be created automatically at new time intervals.

It is recommended to immediately set up automatic backup to Google Drive on the new device in order to have an additional recovery point in the future. Go to Settings โ†’ Chats โ†’ Chat backup and select the frequency of creating copies. This will create a hybrid data protection system: local and cloud.

Clear the application cache on your new phone if you notice a slowdown in the interface. When migrating large amounts of data, indexing media files may temporarily increase system load. Some time after the transfer, the file structure is optimized by the system itself.

Is it possible to restore correspondence if I have changed my phone number?

Yes, but the procedure becomes more complicated. You need to first use the "Change number" function in the WhatsApp settings on your old phone (if it is still available) to link the history to the new number, and only then make a backup. If the old phone is unavailable, it is directly impossible to restore correspondence linked to the new number without using third-party software for migrating accounts.

What to do if the msgstore.db.cryptXX file weighs 0 bytes?

This means that the backup copy is empty or was damaged at the time of creation. This happens if there was not enough space on the old phone or the backup process was interrupted. You need to go back to your old device, free up space and create a fresh local copy manually through the chat settings menu before copying to PC.

Will this method work when switching from Xiaomi to Samsung?

Yes, the method is universal for all Android devices. The only difference may be the location of the folders due to different versions of Android, but the logic of the paths (Android/media/com.whatsapp or the root folder) remains consistent throughout the ecosystem. The main thing is to correctly determine the current path on the receiving device.

Do you need root access to transfer the database?

No, root access is not required. The described method uses standard functions for accessing user files, which are open by default. Obtaining superuser rights is not only unnecessary, but can also violate the operation of banking applications and the warranty of the device.