What’s this about?
WhatsApp was driving me nuts the other day! Why? Because it would not restore my message backup without a reason.
When I take the time and read the following will it help me?
Well, maybe. That depends on what you did. I wanted to restore my WhatsApp encrypted backup file (FILE! not Google backup) and it worked out.
When will the following maybe help me?
you have a WhatsApp backup file (encrypted, e.g. crypt12 -> msgstore.db.crypt12)
you wiped your phone’s data
you have a backup of your phone (TWRP or similar) or already have the WhatsApp key
What happened to you?
I changed from stock ROM to custom ROM (CyanogeMod in my case). Because I did a clean flash I made some preparations in advance. I backed up my WhatsApp messages and copied the whole folder to my SD card. I wiped my phone using TWRP (system, data, cache...). After the custom ROM flash I installed WhatsApp and wanted to restore my messages. Didn’t worked out.
What happened?
I did a little bit of research and little did I know the message file was encrypted. Because WhatsApp is super smart it stores the key for the decryption not in the WhatsApp folder (okay, this would really be stupid). As soon as you wipe your data the key will be erased. Good bye key! So, I am not an expert and it could be that there is a way easier method to restore you messages but I didn’t found one. I just want to share my experience so hopefully someone can save a lot of time. I would have been happy if I found something like this earlier or if I would have at least known about the key. Now I know.
NOTE
Without a backup of your phone, to be more specific, of your phone’s data or the WhatsApp key the following will be useless!
NOTE
Your phone can get broken! I am not responsible for that. Everything you do is on your own risk! Also, I’ll try to help but I am not a 24/7 support technician.
NOTE
Read everything first before you start! Maybe I messed something up. So, take a look first!
So, what to do?
1) Retrieve the key from your phone’s data backup.
a) Because we are all smart we do a full backup before we flash crazy stuff on our phone, right?! I did that with TWRP. Any other backup might work as well. You’ll have to find out on your own. The TWRP backup file is something like “data.ext3.win000”, “data.ext3.win001”. Copy it to your computer. Add the extension .tar or .tar.gz (“data.ext3.win000.tar”, “data.ext3.win001.tar”). In my case both worked. If you can already browse your backup file continue with e).
b) Download and Install 7-Zip.
c) With the 7-Zip file manager you can open and search inside the renamed TWRP files.
d) 7-Zip doesn’t recognize if your data is stored in more than one file. I guess if you pick the right file extensions it would. But, like I said, I am not an expert. So, in this case the win000-file has other files in it than the win001-file. If you don’t find the key in the first one, open up the next one.
e) Open the first file. There will be some kind of blank folder. Open it and you’ll see your phones data. Navigate to \data\data\com.whatsapp\files\.
f) There you should see a file named key. If so, start yell “hurray!”. In my case I saw two key files. I don’t know why but every file was doubled (maybe someone can explain that to me).
g) One of the files was about 158 Bytes. That should be it. To be sure extract the first key file. Open it with the windows editor. If there are letters in it that you can read it’s the wrong file.
h) Extract the other one and open it, too. You see some gibberish? Congratulations, this should be your key! Copy the file to your phones SD card or something similar.
2) Restore your backup
a) Install WhatsApp if not already happened. If you already activated the app go to settings, apps, select WhatsApp and erase all data (NOTE! Your own risk! All data will be gone!). This is necessary because WhatsApp will only ask once after the activation if the backup should be restored. Maybe there is another way but I don’t know it.
b) Copy the whole WhatsApp folder to your phone (the backed up one from the SD, see above). Or just put the backup file into \WhatsApp\Databases\. If you have an older backup file like msgstore.db-2016-01-01.crypt12 rename it into msgstore.db.crypt12. As far as I know only the last named file will be restored.
c) Start WhatsApp and activate it.
d) STOP! WhatsApp will ask you if it should restore the backup. Don’t do it! If you did it and it failed start again from a). Just leave the screen like that, don’t do anything. Turn off your phone! Yep, you heard right. WhatsApp will remember the state it’s in.
e) Boot into TWRP. If you have a file manager that can access your phones data you could use that one, too. I think root will be required for that. I just had the limited stock file manager. The latest TWRP has a file manager integrated without restrictions (check for yourself first!). I used that one (complicated maybe, I know!).
f) Open the file manager (Advanced - File Manager) and navigate to your key-file. Tap on it and select copy.
g) Navigate to \data\data\com.whatsapp\files and copy the key-file into this folder (just tap the blue folder at the right bottom of the screen).
h) Reboot you phone. Start WhatsApp. It should open up and directly ask you if you want to restore your backup. Try to restore it. If you’re lucky it’ll work. For me it did! Congratulations.
Endnote
I didn’t know about the key when I erased my phone’s data. Next time that one will be backed up, too. So I can save a lot of time.
This whole thing here might be very complicated and I guess there is a lot better way to do it. But I didn’t found it. So, I just want to at least share my experience. Maybe someone will profit.
Another thing you need to know here;
The file named key should have a UID WhatsApp for user and group permissions.
You can set these using TotalCommander via Properties
and you should set these while whatsapp is killed/down and while the key is already in the /data/data/../files/ dir.
I also had a case where in the last stage, so before the final boot to restore the database, I had to do a Wipe Cache and Dalvik cache. If I did not do that, whatsapp would skip the restore question and continue activation as if it was a new one, and then *overwrite* the key file I had put there, no matter what I tried!
You don't have to do any of this if you haven't changed your cell number!
1) Copy your latest crypt 12 file to /sdcard/WhatsApp/Databases/
2) Install / Activate WhatsApp
3) WhatsApp will retrieve the key from their server and restore your backup.
This only works if you haven't changed numbers, but it's easy as 1, 2, 3!
I tried this but it didn't work out for me. Thats the reason I wrote this. So far couldn't find another way to restore the backup. Maybe in newer WhatsApp versions this works?!
TripCode said:
You don't have to do any of this if you haven't changed your cell number!
1) Copy your latest crypt 12 file to /sdcard/WhatsApp/Databases/
2) Install / Activate WhatsApp
3) WhatsApp will retrieve the key from their server and restore your backup.
This only works if you haven't changed numbers, but it's easy as 1, 2, 3!
Click to expand...
Click to collapse
That's actually not true. I followed their instructions to the letter, but they failed. I did not get a Restore prompt, and it actually erased the entire whatsapp cryptxx file.
The official way probably fails when you upgrade from LL to MM, but I'm not so sure about even that, because it also failed a long time ago on my htc desire just changing from rom to rom (with a clean /data/data dir).
jult said:
That's actually not true. I followed their instructions to the letter, but they failed. I did not get a Restore prompt, and it actually erased the entire whatsapp cryptxx file.
The official way probably fails when you upgrade from LL to MM, but I'm not so sure about even that, because it also failed a long time ago on my htc desire just changing from rom to rom (with a clean /data/data dir).
Click to expand...
Click to collapse
Sounds like you have had a bad experience. I do a lot of dev work with WhatsApp. I have swapped between several devices as low as API7 to API24. I have never had an issue restoring WhatsApp via the official 3 step method. My devices use a selection of stock / custom roms. As long as you got it working that's the main thing, but I would advise people to try the official restoration procedure before they venture into anything more technical as the official procedure will work most of the time.
Hi, I googled and came to this page.
I hope someone can help in restoring either local .crypt12 backup file or from google drive backup.
It started when my phone got no space and WhatsApp crashed.
For the first time, I clicked restore but it couldn't restore as got no space and WhatsApp closed the app itself.
I was carelessly when starting WhatsApp again and didn't click "restore from previous database" on the 2nd time.
I searched online for the WhatsApp help and deleted some apps to free up space.
Then, I uninstalled WhatsApp and reinstalled again. However, the problem came when after re-installation and needed to authenticate my old WhatsApp number by SMS.
As I just kept using the old WhatsApp number that was originally from a prepaid SIM card which I bought years ago and I didn't top up the stored value for a few years back, so I couldn't receive voice and SMS from that old WhatsApp number as it was properly become a dormant mobile number .
Is that a way I can restore from, for I made a copy of the crypt12 database before uninstalling WhatsApp (I didn't copy the key before uninstalling & reinstalling, and I am not sure if I had a copy of the key before, that I tried to backup using windows explorer to copy to my computer long ago.
Many thanks.
TripCode said:
Sounds like you have had a bad experience. I do a lot of dev work with WhatsApp. I have swapped between several devices as low as API7 to API24. I have never had an issue restoring WhatsApp via the official 3 step method. My devices use a selection of stock / custom roms. As long as you got it working that's the main thing, but I would advise people to try the official restoration procedure before they venture into anything more technical as the official procedure will work most of the time.
Click to expand...
Click to collapse
hi i used yowhatsapp and try to use the original whatsapp app i get messages back but cant see old pictures and cant here old voice messages they were imported somehow to the new package named com.yowhatsapp istead.
could someone point me in the right direction on how i can restore whatsapp with mediafiles`? my mediafiles are all there but just working with yowhatsapp
lycca said:
Hi, I googled and came to this page.
I hope someone can help in restoring either local .crypt12 backup file or from google drive backup.
It started when my phone got no space and WhatsApp crashed.
For the first time, I clicked restore but it couldn't restore as got no space and WhatsApp closed the app itself.
I was carelessly when starting WhatsApp again and didn't click "restore from previous database" on the 2nd time.
I searched online for the WhatsApp help and deleted some apps to free up space.
Then, I uninstalled WhatsApp and reinstalled again. However, the problem came when after re-installation and needed to authenticate my old WhatsApp number by SMS.
As I just kept using the old WhatsApp number that was originally from a prepaid SIM card which I bought years ago and I didn't top up the stored value for a few years back, so I couldn't receive voice and SMS from that old WhatsApp number as it was properly become a dormant mobile number .
Is that a way I can restore from, for I made a copy of the crypt12 database before uninstalling WhatsApp (I didn't copy the key before uninstalling & reinstalling, and I am not sure if I had a copy of the key before, that I tried to backup using windows explorer to copy to my computer long ago.
Many thanks.
Click to expand...
Click to collapse
Did this yesterday but this will only work if your number has not changed, first uninstall whatsapp, if you have a copy of your latest. msgstore.db .crypt12 file, (found on your Whatsapp folder in your SD card under Databases) copy it from there to your internal memory Whatsapp Database folder. Please note that any existing msgstore.db .crypt12 file must first be deleted. Go to your SD card whatsapp folder named backup and copy the backup crypt file as well to the internal memory whatsapp folder only after deleting the existing folder. Install whatsapp and authenticate the install , do not accept the backup prompt. Once installed go to Chats and run a backup to google drive. Your key is in the DB files and will be uploaded to google drive along with all backuped data. Uninstall Whatsapp and reinstall, this time accept the backup prompt. Verify that the two files that you copied still exist in both the SD and internal memory, allow a normal backup to occur at 4am and check in the morning. All files should be recovered and the old key should be reinstalled.
Thank you very much for your guide. I upgraded a phone to a custom rom and even though I made a recent in-app backup and never used another phone number/sim card, Whatsapp was not able to restore the data.
Glad I made a complete NAND backup just to be safe....
@sexler (what a name )
THX a lot for your guide!
I changed from Android 7 (LineageOS) to Android 8.1 (CarbonRom) without using Google-Apps anymore. So no Backup from the cloud would be possible.
Only the "c) Start WhatsApp and activate it." was not possible with my Whatsapp. But I just did the activation later and after that he noticed that there where a backup.
Your guide helped out of my 7 days quest
THX THX THX!
Greetings by Idijt
@I_did_it_just_tmrrow
You're welcome!
It’s very nice to know that almost three years later the instructions can help someone. Thank you for your feedback.
Have a nice weekend.
Is the method still working?
timenewroman said:
Is the method still working?
Click to expand...
Click to collapse
Why not, the crypt is the same and there are some tools on versioning sites like github/gitlab who offer de-crypter.
Should work. Give it a try and tell us.
I'm trying to use this method to restore old 2015-16 WhatsApp chats to a BlueStacks virtual Android machine. I haven't had much luck.
NB though I did copy over both the key file and the msgstore.db to the com.whatsapp folder (as well as having the crypt12 file available)- I'm gonna try now while just copying over the key, once Whatsapp decides I'm not a robot and sends me verification again
EDIT: tried again, with msgstore.db.crypt12 and key only. Followed the procedure closely, and used BSTweaker to copy over the key file at the appropriate stage into BlueStacks. No luck. Failed to restore. I noticed that the permissions on the key file are different (RW for Owner, Group and Others).
Can anyone help me figure this out? Do I need to change the permissions or something? Any help would be appreciated!
EDIT2: SOLVED!!!!! Praise God! I managed to transfer my old conversations, profile pictures and media using this method: https://forum.xda-developers.com/android/general/whatsapp-reencryption-crypt12-backup-t3779487
TL;DR - I copied over, from one Bluestacks Android VM (v0.8 - ancient, from 2015), to antother Bluestacks Android VM (v4.180.0.1005 - latest as of writing) the following files/folders:
/data/data/com.whatsapp/databases/msgstore.db << (unencrypted database - requires ROOT)
/data/data/com.whatsapp/files/Avatars/[a couple of files that were obviously un-named jpg profile pictures] << (profile pics - requires ROOT)
/storage/emulated/0/Whatsapp/ << (Whatsapp media folder)
I didn't need my encryption key or crypt12 database at all; all the methods I'd tried to restore using these failed miserably (including the one in the Original Post here). Whatsapp "detected a problem" on reloading the app, and restored my old conversations from years ago - so happy!
i wanna share my experience when Whatsapp refused to restore using .crypt12 file. There's like 10 of the .crypt file in my phone, but all seems corrupted. So restoring using CRYPT12 file is out of question here.
all this happen when i'm trying to move my Whatsapp from old OP3T to new OP5. I thought it wont take more that 1 hour to complete. I was wayyyyyy wrong.
Please note that I'm using custom ROM based on Android 10 (Q).
I already have some Titanium Backup of my Whatsapp. So what I do is extract msgstore.db from the Titanium Backup .tar file (data/data/com.whatsapp/databases). What important is the SELINUX permission/setting on that msgstore.db file. Use any file manager that allows SELINUX context changes, such as Root Explorer.
The key file from /data/data/com.whatsapp/files also important, because I have 2 of it (one from my old OP3T, the other from OP5). The key from OP3T can be used to restore msgstore.db on my OP5.
Its really painful lesson to me, as I can't use Whatsapp from May 1st until today (May 10). That's 10 freaking day without Whatsapp!!
I could just continue using Whatsapp fresh like new, but the old chat messages is really valuable to me.
To those who having any kind of issue, don't stop trying. Never quit! There's always solution, sooner or later.
This is also a useful link for understanding how whatsapp
files function
Hi, I am having the same problem as with restoring my Whatsapp history and wondered if any kind soul can help me to restore my Whatsapp history?
What I had done :
I had my S8 rooted. The whole phone was wipe when it was rooted. I hope this step is correct.
My encrypted backup (crypt12 and crypt14) was saved already before I rooted and I also need a backup of my phone (just not the application data because the Dr Fone software mentioned that my S8 needed to be rooted before I can backup my application data)
But I couldnt find the folders you mentioned here :
/data/data/com.whatsapp/databases/msgstore.db << (unencrypted database - requires ROOT)
/data/data/com.whatsapp/files/Avatars/[a couple of files that were obviously un-named jpg profile pictures] << (profile pics - requires ROOT)
/storage/emulated/0/Whatsapp/ << (Whatsapp media folder)
Can anyone guide me pls?
Hey guys need your help actually i mistakenly deleted a chat for that i thought I would delete my WhatsApp and reinstall it and use the backup of last night and restore it..
But it turned out while installing it asked for Google drive but i haved created any backup file on my Google drive and only had it on my internal storage but WhatsApp didn't got the local file and said no backup found after that all my chat was deleted.
It rewrite all my WhatsApp folder and now it is showing just one encrypt file and all other data and backup got deleted.
I also checked com.whatsapp file in Android > media > com.whatsApp but it is deleted from there as well.
Those msgs were really important any help would be appreciated.
Thank you
Hello guys, about this subject.
I've tried a few stuff but i can't restore it like in the pass.
My s10e, it's clean, no custom rom, only default. When i did (like in the past without knowing about the key stuff) was to copy manually all my media photos/stickers/etc., and the conversations, all those crypt files. So now i have 2 clean crypt file with my last conversations. I really want to recover all of it.
Please tell me there's a way without rooting , i've read and see so many videos but i can't find a good way to restore it.
I was thinking maybe using an old phone, put the crypt files on the sd card, change the chip, try to restore it with and old whatsapp version(?).
I really need my conversations back. It's really important. Any ideas?
Hello all,
I've been searching this topic for a few weeks, and have yet to find a viable solution. I want to grab some files out of the app caches on the data partition of my Pixel 2. I don't necessarily want to root it, because I have no desire to modify anything, just want to view some stuff.
I've tried several backup apps - which have either failed because they need root, or "backup disallowed". I've also tried adb using pull, backup, cp, shell, etc. It seems a bit backwards to unlock the bootloader, wiping the device of the very data I'm trying to extract. It's been frustrating to not be able to access one's own personal data ?
Any ideas? Thank you.
+1 I'd love to have this answer as well. All my passwords are in Twik (Play store app). I don't think Google is backing up app data (or are they?). If I ever decide to flash the Pixel 2, I'll have to re-type all my websites, plus the private key. Twik is one of the few apps I rely on that isn't cloud based. I suspect the answer is there's no way on an unrooted android device.
Speaking of Google backing up app data, Google android says it can restore app and app data, but in my experience, unless the app uses cloud based data, it ain't happening. So why do they claim to backup app data? I suppose they are refering to Google apps, as of coarse, Google does keep your Google app cloud data anyway, so you'll have it restored when you log back into your android device.
You could try using Helium for backing up data. Even without root, if you follow the instructions (download the file to a Windows box and connect the phone to it) Helium should work.
Rukbat said:
You could try using Helium for backing up data. Even without root, if you follow the instructions (download the file to a Windows box and connect the phone to it) Helium should work.
Click to expand...
Click to collapse
I think I tried that once. But without root, it skips anything that has it's backup flag set to "false". Unless you know a way to trick it ?
Recently, I have permanently deleted files from my Android device after factory reset and I didn't take any backup. Is there have any possibility to recover my important data without having any backup?
Try EaseUS MobiSaver app.
You can definitely check the local backup of your phone if you have take backup regularly then, you have enabled to restore data from mobile. Sometimes, files have an automatic backup on Google account. So, you can check your Google backup. In case, if you didn't get back lost after the factory reset then, you may also try the Android data recovery tool. There is no guarantee for data recovery by using any program. But if it will possible to recover files then, it will show the preview of deleted data during the free trial edition.
To be honest, the chances of it would entirely depend on how long you have performed the factory reset. If it has not been so long, then you can actually get your data back. Pick a recovery tool that supports your device, it will let you preview the data and restore them.
Sorry for the delayed reply. For the ones who have the same problem, usually it's difficult to recover them back. You can ask for help from pro shop. Pro shop like Dr.fone, EaseUS MobiSaver, Coolmuster Lab.Fone for Android, etc. I am not sure they can work well or not. Before that, you need to stop using your phone. Cause data can not be recovered if they are overwritten by new data. And do remember to take backup of your phone usually. It's easy and safe.
I'm in the same seat and I also managed to flash an original rom on a Galaxy S8 on top of that.
Tried trial versions of all the mentioned and some others but they aren't able to detect anything relevant.
At the moment I'm wondering whether to take the loss or hand it in to a professional.
Can they do anything more that the different recovery softwares can't?
(I thought my phone was synced through a cloud app but it turns out it wasn't.)
I have used an app Named "DiskDigger" it worked perfect for me for recovering Pictures.
Have NonRoot-Method and Root Methood
dashti.95 said:
I have used an app Named "DiskDigger" it worked perfect for me for recovering Pictures.
Have NonRoot-Method and Root Methood
Click to expand...
Click to collapse
how do i do it?
Sahurley78 said:
how do i do it?
Click to expand...
Click to collapse
its easy just download diskdigger on your android device and it have a button to start recovery
I just found this thread on google, I would like to know if anyone knows a way to recover a deleted application data folder inside the "Android/data" folder in the internal storage, either by adb, usb debugging or with some software since they are important data and I have not gotten any solution .
Thanks in advance.
[Samsung Galaxy A5 (2017) Android OS 8.0]
Hi, I backed up my phone to both Samsung backup and to Google Drive. I did a factory reset but it never restored. I was about to leave on a cruise and was kind of SOL.
The Samsung backup seems to be toast. Unless it keeps old backups and there's a way to access then, that way won't work as it's overwritten the backup with the newly reset phone.
I also backed up to Google Drive. I can even look at the files in the drive and there are 2 files that start with "takeout" and if you open them you see android files inside.
I just don't know how to restore from these. The file has the date on it, which is 2022, which is before my cruise. (Why am I so late asking? Caught covy and then got long haul..)
All I really care about is my text messages. My contacts would be great too, but I may have that on my PC. If the Google Drive backup doesn't work out I did save a bunch of my phones data to my PC manually. I know much of the OS folders show 0 files, but in some cases if I dug through some of the folders I would find files. I just have no idea if one of them would be my text messages.
I don't really understand what it is that I'm not getting. The instructions say to just go to the backup and click on it to restore it. Uhh no, that isn't working. :/
Thanks, I really hope I'm not SOL here.
A Factory Reset ( AKA Hard Reset ) only affects user data ( included apps ) , means all those added to phone since its 1st startup gets deleted / removed. That always works well on all Android phones.
Wondering why you want to play back the bad backups made?
I really only need the text messages and the contacts if I don't actually have a csv (sp?) file of them.
For the backup, I told it not to save the photos or programs. I have a list of the apps I didn't uninstall, and the photos on my PC. I think the reset, plus no apps saved will fix things.
Can I just restore the texts? Or, is it possible that one of the files I saved has them?
Thanks
jwoegerbauer said:
A Factory Reset ( AKA Hard Reset ) only affects user data ( included apps ) , means all those added to phone since its 1st startup gets deleted / removed. That always works well on all Android phones.
Wondering why you want to play back the bad backups made?
Click to expand...
Click to collapse
Do you know I would be able to do what I mentioned in the post above this one? Still stuck.
Thanks
Hi, sorry to post again but I'm hoping the forum tells you that I'm replying to your message as I can't DM you.
[Added info] As I said above, I didn't backup the apps, just the texts and such, so a reset and restore should help. Even if it doesn't at least I can save the texts and contact list.
I still haven't found a solution to this. The Google app shows a restore that's also after the reset, BUT, I also have what is clearly a restore from before the reset. I don't care what jankcraft magic I have to do. How can I restore to that restore point? I have a copy on my PC. Can I tell the phone that I'm transferring data from a different phone on to this phone? Same phone of course.
The file on Google Drive starts with the word takeout and then has the date and time and is in a zip.
Nobody is posting any response to this but you, and someone else who pointed me to this section of XDA.
[Minor Edit] The files are "takeout1" and takeout2" with the date and times after them. The "takeout2" is the one from after the reset. Takeout1 is from before. If I delete "takeout2" will Google Restore see "takeout1?"
I'm dying here.
Thanks
DM