If you’ve ever wondered what msgstore is and what is it for, we are going to answer these questions. It is possible that on some occasion you have come across this name, either because you have read something or seen it on your Android phone. In any case, we are going to tell you everything you need to know about this concept and its importance.
Let’s start by mentioning that files in msgstore format are WhatsApp files, something that some may know. You may have met one on occasion. For this reason, we are going to tell you more so that you know more about them and the reasons why we find these types of files on our Android phone.
what is msgstore
The msgstore files are data files in which WhatsApp chat transcripts are stored. WhatsApp encrypts messages end-to-end, so that no one who can access those messages along the way will be able to decrypt them (at least not quickly, but it will take a long time). These msgstore files store the chats of WhatsApp conversations, but not in plain text, where the literal conversation is read, but everything is encrypted in them.
The idea behind them is that if someone accesses our device without our permission, or hacks us, this person you will not be able to access the content of those files with a simple text editor. The name msgstore is normally accompanied by the words db (data base) together with the year, month and day in which each one of them was created, in addition to being accompanied by the word crypt and two numbers. This is the format that they normally have and that we can see if we find any.
Also, there is end of each file we can see there are two numbers. These two numbers represent the encryption method that WhatsApp uses at any given time. So it is something that also gives us information in this regard.
What is msgstore for?
The mgstore.db.cryptXX file is the file where the they store all the chats we have had in the application at that moment, while the rest of the files are just a backup. The date included in the file name tells us when it was created. So far, WhatsApp has created a total of five encryption versions of its encryption code, which is the same as what is available in Signal. They are the following:
- mgstore.db.crypt5
- mgstore.db.crypt7
- mgstore.db.crypt8
- mgstore.db.crypt12
- mgstore.db.crypt14
These are all file types that we can find inside the WhatsApp database folder. So if we open it, we can see that they belong to one of them. It is rare that we find one that does not comply with this, only those who have a really old phone and where the WhatsApp app is no longer updated could see one in a somewhat different format. Most users will have one of these versions, especially the latest one.
How to open msgstore files
One of the doubts of many users is the way in which they can open this type of file on their devices. As we have already mentioned a couple of times, the msgstore files are encrypted, so we will not be able to open this type of file with any text editor. This means that we are going to need to use an application that knows the encryption used in them to be able to access their content, otherwise it will be impossible.
The problem is that no application is actually aware of WhatsApp’s encryption, since the platform uses a different key for each device. The key used to encrypt this copy of WhatsApp chats is something that is stored inside the device in question. To be specific, it is something that we will be able to find in the data/data/com.whatsapp/files/key folder.
Being information that is stored in the root of the device, no third-party application will be able to access it, unless you have root permissions, something that not all Android users grant. Although this also means that it is necessary to have root or root the device to be able to access said key. Otherwise, any app on the network could be used and in this way you would have access to that key that allows you to decrypt WhatsApp data, like the rest of the keys that are also used by other applications to protect access to WhatsApp. information they manage.
Decrypt WhatsApp chats
This is something that only users who have root on their Android phone are going to do. If this is the case, if you have root, then you will be able to do it. So here are the steps to follow to be able to access and open msgsotre files. It is important to know that it can only be done if you have root. You may read on the Internet about apps or web pages that promise to have access to these files, but it is a lie. They do not work in any case and in fact can be dangerous. Therefore, it is better that you do not use them.
To decrypt these files, it is necessary to have access to the key that we have mentioned. A key found in the terminal. If we do not have the terminal at hand, it is as if I did not have root. So using a third-party app is not going to help us in this regard. To do this process we are going to use an app called WhatsApp Viewer, which is an open source application and available at GitHub. This is the app that will allow us to open msgstore files that is in our mobile, using the key that is stored in it.
At the time of publication of this article, this application supports the following file types:
- mgstore.db.crypt5
- mgstore.db.crypt7
- mgstore.db.crypt8
- mgstore.db.crypt12
- mgstore.db.crypt14
Steps
Once we have installed the application on our phone, we are ready to start. Therefore, we open the app on the mobile for the first time and click on File > Decrypt.cryptXX where XX is the number of the file used by our version of WhatsApp. Next, we need to select the source of the file and the location where the key is located. After doing this, the app will have to load a few seconds and then the application will show us, in flat format, the chats organized by the phone number that appears on the right.
By clicking on each chat that there is, on the left side of the application, you will be able to see the conversations that we have had with each phone number on WhatsApp. In addition, from this same application, we will be able to export the chats to other formats to store us on our computer, work with them, share them or whatever we want to do with them. So this gives us a lot of options if there is something we want to see in the chats. The formats offered by the application when exporting WhatsApp chats are: txt, html and json. So surely there is one that works well for us.
export chat
This is the method with which to access to said WhatsApp chats stored in msgstore. As you can see, it is a fairly complex process and it depends on whether we have root on our phone. So many users in the operating system will not be able to use it. It is not the only way in which you can have those chats in a text format, in case we want to have all our chats in a document.
WhatsApp has the function of exporting chats. Thanks to it we can have all the chats that we have in the app in a text file, as in txt format. So this is a good way to have them grouped, in case this is what we are looking for. We avoid resorting to something as complex as the previous method, also reserved for few users. If you want to use the function of exporting chats in the app, the steps to follow are the following:
- Open WhatsApp on your Android phone.
- Once inside the app, click on the three points located in the upper right corner of the application and click on Settings.
- Within Settingsclick on the option chat.
- In the next window, click on chat history and then in the option that says export chat.
- Finally, we select the chat we want to save and we store it on our device, we share it with other applications, we send by mail…
- You can repeat the process with others if you want.
So you can always have some of your app chats in text format, which is very convenient if you have to work with it, for example. If there are chats you want to do this with, you can choose as many as you want to export from the Android app.