[Whatsapp] Copy working DB=Crash. Why? - General Questions and Answers

I do copy msgstore.db(even from fresh whatsapp install) and when use new file (premissions and owner are correct) whatsapp is starting crash.
Any idea why so?
(when starting to use original file whatsapp is starting fine)

WhatsApp is trashware, ditch before it gives you a good dose of malware.
I won't allow it on any of my devices, it is trouble. Keep all social media apps off the device, they are a multiple vector security risk.
If the social media site isn't fully usable through the browser don't use it. Even then... watch your six.

not sure why u liked to answer so to tech question....

The copied db is corrupted. So easy.

xXx yYy said:
The copied db is corrupted. So easy.
Click to expand...
Click to collapse
Files are exactly same after copy, i even used diff command to be sure... i have several working renamed msgstore.db files(if i rename them to msgstore.db then ok). But when i do copy them to msgstore.db then crash is happening.

Then do a LOGCAT to get the very reason why WA crashes when loading db in question.

Related

[Q] Download Files From Google Drive

Hi ,
I uploaded some pictures on my Gmail Drive yesterday via Laptop.
When I use the Android Google Drive Client on my Gingerbread , I have options of viewing it or making it offline.
Is there any way of downloading the pictures to my SD card ?
Making it offline doesn't help because once I remove the Google Drive App from my Droid , I will no longer be able to view that picture.
I want a permanent download so that my downloaded pictures appear in my gallery even after un-installation of Google Drive.
EDIT: [SOLVED]
Disable encryption via settings, and the files are accessible in the below folder. Thank the man
Click to expand...
Click to collapse
The files seem to be in the google docs application folder, which on my system is found in /mnt/sdcard/Android/Data/com.google.android.apps.docs/files/pinned_docs_Files_do_not_edit/*CRAZY FOLDER NUMBER*
However, viewing the files does not work. It seems that this is a feature they have not included (for whatever reason).
Dropbox lets you export files.
You could also try another service called "Box".
KeePassDroid with Google Drive
I was going to create a new thread but in searching found this one. I'll use this one as maybe it applies with certain features not yet being implemented? Or am I overlooking or doing something wrong? I'll keep this simple. I use KeePass V1.x and KeepassDroid to keep my passwords in sync. It works great with DropBox. I have my database stored in the cloud and whenever I make a revision, it syncs across all my devices. Being the Google Whore I am, I was excited to try it with Google Drive. NO GO!
I can access the file and open the database with KeePassDroid without any issues. If I make a change and try to save it I get the following error. /data/data.com.google.android.apps.docs/cache/filecache2/123456789/databasename.kdb.tmp: open failed: EACESS (permissions denied). It won't let me write back to the database like DropBox will.
When I made the file available off-line, it would let me save the file, but it would not save that file back to the cloud. Do you think it's a permission issue on my side, or a limitation right now with Google Drive? Quick side note: I'm using a ported version of ICS but not really having any other issues. But if others are able to write back with a 3rd party app, then maybe it is something to do with the port....just a thought? If anybody has any ideas....Thanks!
RikkKeith said:
I was going to create a new thread but in searching found this one. I'll use this one as maybe it applies with certain features not yet being implemented? Or am I overlooking or doing something wrong? I'll keep this simple. I use KeePass V1.x and KeepassDroid to keep my passwords in sync. It works great with DropBox. I have my database stored in the cloud and whenever I make a revision, it syncs across all my devices. Being the Google Whore I am, I was excited to try it with Google Drive. NO GO!
I can access the file and open the database with KeePassDroid without any issues. If I make a change and try to save it I get the following error. /data/data.com.google.android.apps.docs/cache/filecache2/123456789/databasename.kdb.tmp: open failed: EACESS (permissions denied). It won't let me write back to the database like DropBox will.
When I made the file available off-line, it would let me save the file, but it would not save that file back to the cloud. Do you think it's a permission issue on my side, or a limitation right now with Google Drive? Quick side note: I'm using a ported version of ICS but not really having any other issues. But if others are able to write back with a 3rd party app, then maybe it is something to do with the port....just a thought? If anybody has any ideas....Thanks!
Click to expand...
Click to collapse
It *seems* to me like a limitation with their software. The fact that you can't even use the files outside of google drive/docs despite them being there indicates that either the files are encrypted, or in some other non-standard format. Uploading probably doesn't work because the file you put there are in the wrong format for the software to use them.
I switched back to Dropbox (which I never REALLY left) because of this. As a way to move files to your phone (like .zips to flash), Google drive falls short.
BK553 said:
I switched back to Dropbox (which I never REALLY left) because of this. As a way to move files to your phone (like .zips to flash), Google drive falls short.
Click to expand...
Click to collapse
Send them clear, direct feedback. Maybe they'll change it. After all, the product was just launched
Same here. I suspect G will change over time .
BK553 said:
I switched back to Dropbox (which I never REALLY left) because of this. As a way to move files to your phone (like .zips to flash), Google drive falls short.
Click to expand...
Click to collapse
Glad to see this thread. First thing I did was try to copy a file to my SD Card from Gdrive. Just keeps trying to open them. Only option I had was send to Dropbox from Gdrive and export from there. Kind of a waste of time.
Just wait and see what features they add on. Its still very early.
Is your phone rooted? Using ES file explorer, and having the "up to root" toggle enabled, if I went to the root directory /mnt/sdcard/download directory all of the 4 files I synced with google drive were able to be copied using ES file explorer without any problem at all.
It's a bit annoying, but for now it works for me!
Cirkustanz said:
Is your phone rooted? Using ES file explorer, and having the "up to root" toggle enabled, if I went to the root directory /mnt/sdcard/download directory all of the 4 files I synced with google drive were able to be copied using ES file explorer without any problem at all.
It's a bit annoying, but for now it works for me!
Click to expand...
Click to collapse
I could copy them no problem. The problem is, copied or not, they're unviewable.
Are you sure you are looking in the folder I mentioned, or are you looking in the folder that does not require root access? There is a link to those files in the directory that doesn't require root but even the thumbnail doesn't appear there.
Shrug, I pulled photos and a pc executable from that folder and copied it onto my SD card using the move option in ES file explorer which allowed me to email them to a friend.
How to enable Google Driver on my phone ?, i have download from Google Play but it's display not available in my country, hmm
When I went to the drive.google site after I installed the PC application it gave me a url to download the mobile app. I made sure "install non-market applications" was selected in my phone settings, opened up that site in my phone's browser, and installed it.
So I seem to have managed to get files from google drive onto my phone and tablet. I use an app called officesuite pro. I've got it on my prim and sgs2. It is a paid app but it connects to remote servers, google docs(drive), dropbox etc. If you access your files through there, you can copy the file, doc, zip whatever is on your google drive, and paste it to a local drive. All intact and usable.
This is crazy. As soon as my Drive was ready I transferred all my DB files to it thinking I'm all Google, so lets use it! Yeah, I can't access any of my files. With DB I could just long press a name, and download. Guess it's back to DB until Drive can do it too. Nice otherwise.
Cirkustanz said:
Are you sure you are looking in the folder I mentioned, or are you looking in the folder that does not require root access? There is a link to those files in the directory that doesn't require root but even the thumbnail doesn't appear there.
Shrug, I pulled photos and a pc executable from that folder and copied it onto my SD card using the move option in ES file explorer which allowed me to email them to a friend.
Click to expand...
Click to collapse
The folder you said was:
/mnt/sdcard/download , right?
I have the folder ( with a capital "D" though), except there are none of the files I made offline with drive in it.
stevemacer said:
So I seem to have managed to get files from google drive onto my phone and tablet. I use an app called officesuite pro. I've got it on my prim and sgs2. It is a paid app but it connects to remote servers, google docs(drive), dropbox etc. If you access your files through there, you can copy the file, doc, zip whatever is on your google drive, and paste it to a local drive. All intact and usable.
Click to expand...
Click to collapse
Thanks for the tip. Still, might shame to have to jump through such hoops. The other question is: does it work with non-doc files?
BK553 said:
I switched back to Dropbox (which I never REALLY left) because of this. As a way to move files to your phone (like .zips to flash), Google drive falls short.
Click to expand...
Click to collapse
same here. disappointing. but i hope they will change it in the future.
Yeah, it works with any type of file, I used it to download a zip. You can do it with jpegs too but you have to make it show unsupported files. Also, another way, probably easier is to log into google drive through your browser, you can download direct from there i've noticed. Just click on the file and it should give you the option to dl. Shame they haven't put this in the app.
stevemacer said:
Yeah, it works with any type of file, I used it to download a zip. You can do it with jpegs too but you have to make it show unsupported files. Also, another way, probably easier is to log into google drive through your browser, you can download direct from there i've noticed. Just click on the file and it should give you the option to dl. Shame they haven't put this in the app.
Click to expand...
Click to collapse
Funny I was just trying this. It does work, but it renames the file to some long weird label. Have you found a way to keep it the same name?
To be honest, i've not really tried it through the browser but when I download it through officesuite pro, it retains the original file name.

WhatsApp Orphan/Unreferenced Media Cleanup

Hello All,
Can anyone help me with one problem, please? This is regarding WhatsApp media history. It is growing too large and consuming space with unnecessary media files.
I did "Clear chat" activity for some threads I believed were obsolete. But surprisingly, although chats were cleared, media files themselves were left untouched in the file system!
As a result I now have lots of orphan media files, which are not referenced in any WhatsApp chat. I cannot simply delete WhatsApp Media folder from the file system, as I have useful media there.
So my question: is there any way to scan the WhatsApp Media folder and delete orphaned/unreferenced media files?
I'm using Galaxy S8.
Thank you!
I have exactly the same problem, also looking for a solution here.
If anyone have a clue on this, please share.
Thank you !
I'm on same page in 2019.
Whatsapp backup on android seems to do a differencial backup on all files of whatsapp folder and is always larger than whats being listed on Storage option.
My ratings are so bad: Storage says 17gb and backup says 60gb ;/
If I use file manager apps to delete dupes, some chats will not present the media.
It would be awesome to have an app to defrag whatsapp chats and media files.
Hi. I have this problem too! Storage says 19GB but actually its taking up 38GB!
Count me in as well. 2.6GB vs 3.16GB. It may not seem much but it's on a Note 5 with just 32GB of storage and I'm trying to squeeze every available byte.
Just leaving my ward.
I managed to solve this manually. Kinda. It was hell. Still a lot of orphan files.
Hope someone has an answer.
RonAshman said:
Just leaving my ward.
I managed to solve this manually. Kinda. It was hell. Still a lot of orphan files.
Click to expand...
Click to collapse
How did you manage to (partially) clean up manually?
Any update on this issue ? Its driving me nuts having close to 20 gigs of unreferenced media in my phone.....I'm pretty sure Whatsapp can easily introduce a "cleanup" feature based on the same algorithm that generates the "storage" figure.
Once its done cleaning the Drive backup is as easy as deleting the old backup and creating a new one.
Question is what's the best way to submit this "feature request" which is in fact more like a bug report?
schaggo said:
How did you manage to (partially) clean up manually?
Click to expand...
Click to collapse
I downloaded everything to my pc and looked for duplicates martching crc.
Then for like a week I went over pictures deleting the ones I was sure I didn't need, and also used the file name to divide them by year/month.
Not really the best option.
I'm in 2022 and with the same issue for years. Love to know who to code for Android/IOS and have Whatsapp integration options so I could search for each media file agains each group or direct channel to do :
- remove duplicated/triplicated media content by replace the file reference in groups/conversations ;
- than process all orphaned files that are not located in group/conversations discussion.

Whatsapp reencryption of crypt12 backup for use on different whatsapp account/number

Goal: pass a whatsapp chat history backup (.crypt12) from one device to another with different telephone (whatsapp account) numbers.
Update: I succeeded with ultimate goal to move the chat history to a different device with a different phone number, but I failed with the re-encryption.
Encryption
First, I believed that the /data/data/com.whatsapp/files/key file might have been a leftover from an old version of Whatsapp on the old device, because I could not find the file. It turned out that it was generated later on the new device, after I finished my experiments. I’m not sure what triggers its creation.
Furthermore I was not able to decipher header and footer of the crypt12 backup file. I believe that a message authentication code (MAC) is part of it and something related to the Whatsapp account number (telephone number), because the app was quick in determining if a backup file is a restore candidate without decrypting, I’ld say.
How I managed to transfer the chat history:
Short version: get root on both devices and move /data/data/com.whatsapp/databases/msgstore.db over to the new device.
Long version: root on the new device will be less problematic, I guess. For the old device I used the fishy Kingroot app. It looks very professional and seems to download exploit code from a huge database for many devices. I got instant root access without flashing anything, but to be honest I don’t trust it regarding what else it might be doing...
Kill both Whatsapp apps before reading the msgstore.db file from the old and writing to the new device. I also removed the msgstore.db-* files on the new device. Sqlite might detect itself that the new database does not fit those helper files, but if they are not even there, they will be recreated correctly without any doubt.
Also set the permissions and ownership of that file to what it would be on the new device (not the old). My biggest oversight were the SELinux security attributes stored in the extended file attributes (XA). It made me believe that Whatsapp is verifying the database content and rejects it, but in reality it eats it just fine, as long as it gets proper access to it.
The XA tools I had available on the phones apparently show all the extended file attributes with “getfattr -d filename”, while e.g. on a standard Linux you need “getfattr -dm- filename” to get them all, not just the user.* domain. „ls -Z” shows the SELinux security context, which is a specific part of the extended file attributes, and in this case the only part I had set.
As with the file ownership, check which context is usually set on the database file on the new device and set it accordingly (“setfattr”). My old device did not even have SELinux and no extended file attributes were set there.
Other findings:
As the restore kicks only in during initial whatsapp setup, I’ve cleared data on whatsapp a lot. Constant reactivating the same phone number will trigger a hold-off on the whatsapp servers, delaying activation-SMS or -call.
But a seemingly corrupt or missing msgstore.db file trigger a restore as well, so it is possible to feed backups to Whatsapp without constant reactivation. Whatsapp failed with the restore if the SELinux context was wrong on the to-be-replaced database file, I believe. During my trials I just deleted the database (if I recall correctly) and the artificially triggered restored worked out.
Below this line is stuff I tried before:
At the moment I try to plant the old backup on whatsapp for decryption. To get to the point of restore, I force close whatsapp, clear app data, open whatsapp, give it no permissions and activate a number. At this point it asks for permissions to find restore files: I deny “contacts”, but allow for “media/files”. Here it consistently finds the most recent _local_ backup from the _same_ whatsapp account. At this point I force close the app and clear the app cache.
Restarting whatsapp brings it to the backup screen where it finds the local backup for the _same_ device.
At the moment I’m investigating which backups it picks up. For this I use backups from the same device/account as well (known to be working).
/data/data/com.whatsapp/files/key
This file is non-existent on the new device. If I drop a key file from a different account, it seems to get ignored. Whatsapp still finds the native backup (not one matching the key), and it successfully restores it.
/data/data/com.whatsapp/shared_prefs/keystore.xml
This file already exists, but only with “client_static_keypair”. If I replace that entry with the one from the old device, whatsapp will still find the native backup, but it will fail to restore it. The restore has to be skipped and whatsapp triggers a reactivation of the phone number, but if you enter the same new number again, whatsapp accepts it without SMS/call.
→this seems to be the encryption key to be used by whatsapp.
I can confirm the following crypt12 decryption code to be working:
https://gist.github.com/nlitsme/b079f351eb1bf9c3d356ce988bb6afdc
https://github.com/EliteAndroidApps/WhatsApp-Crypt12-Decrypter
They both require the backup file and the “key” file. The latter has a check where it compares a component from the key file with the backup 1:1. In the code this is called “t1” and “t2” which should match. So far I have backups with three different t1/t2. The original backup, with a matching key; the backups from the new account on the new devices, without a key; and the backups from the new device/account, where I mixed the string from the keystore.xml file in.
The “key” file is not generated by the latest Whatsapp anymore, as it seems. Maybe the encryption/decryption key is generated on-the-fly from the keystore.xml data. If this is true, then a new activation of my new telephone number would make these backups unreadable.
Created by author: 2018-04-19
Last edit by author: 2018-05-01
siemer said:
Goal: pass a whatsapp chat history backup (.crypt12) from one device to another with different telephone (whatsapp account) numbers.
Update: I succeeded with ultimate goal to move the chat history to a different device with a different phone number, but I failed with the re-encryption.
Encryption
First, I believed that the /data/data/com.whatsapp/files/key file might have been a leftover from an old version of Whatsapp on the old device, because I could not find the file. It turned out that it was generated later on the new device, after I finished my experiments. I’m not sure what triggers its creation.
Furthermore I was not able to decipher header and footer of the crypt12 backup file. I believe that a message authentication code (MAC) is part of it and something related to the Whatsapp account number (telephone number), because the app was quick in determining if a backup file is a restore candidate without decrypting, I’ld say.
How I managed to transfer the chat history:
Short version: get root on both devices and move /data/data/com.whatsapp/databases/msgstore.db over to the new device.
Long version: root on the new device will be less problematic, I guess. For the old device I used the fishy Kingroot app. It looks very professional and seems to download exploit code from a huge database for many devices. I got instant root access without flashing anything, but to be honest I don’t trust it regarding what else it might be doing...
Kill both Whatsapp apps before reading the msgstore.db file from the old and writing to the new device. I also removed the msgstore.db-* files on the new device. Sqlite might detect itself that the new database does not fit those helper files, but if they are not even there, they will be recreated correctly without any doubt.
Also set the permissions and ownership of that file to what it would be on the new device (not the old). My biggest oversight were the SELinux security attributes stored in the extended file attributes (XA). It made me believe that Whatsapp is verifying the database content and rejects it, but in reality it eats it just fine, as long as it gets proper access to it.
The XA tools I had available on the phones apparently show all the extended file attributes with “getfattr -d filename”, while e.g. on a standard Linux you need “getfattr -dm- filename” to get them all, not just the user.* domain. „ls -Z” shows the SELinux security context, which is a specific part of the extended file attributes, and in this case the only part I had set.
As with the file ownership, check which context is usually set on the database file on the new device and set it accordingly (“setfattr”). My old device did not even have SELinux and no extended file attributes were set there.
Other findings:
As the restore kicks only in during initial whatsapp setup, I’ve cleared data on whatsapp a lot. Constant reactivating the same phone number will trigger a hold-off on the whatsapp servers, delaying activation-SMS or -call.
But a seemingly corrupt or missing msgstore.db file trigger a restore as well, so it is possible to feed backups to Whatsapp without constant reactivation. Whatsapp failed with the restore if the SELinux context was wrong on the to-be-replaced database file, I believe. During my trials I just deleted the database (if I recall correctly) and the artificially triggered restored worked out.
Below this line is stuff I tried before:
At the moment I try to plant the old backup on whatsapp for decryption. To get to the point of restore, I force close whatsapp, clear app data, open whatsapp, give it no permissions and activate a number. At this point it asks for permissions to find restore files: I deny “contacts”, but allow for “media/files”. Here it consistently finds the most recent _local_ backup from the _same_ whatsapp account. At this point I force close the app and clear the app cache.
Restarting whatsapp brings it to the backup screen where it finds the local backup for the _same_ device.
At the moment I’m investigating which backups it picks up. For this I use backups from the same device/account as well (known to be working).
/data/data/com.whatsapp/files/key
This file is non-existent on the new device. If I drop a key file from a different account, it seems to get ignored. Whatsapp still finds the native backup (not one matching the key), and it successfully restores it.
/data/data/com.whatsapp/shared_prefs/keystore.xml
This file already exists, but only with “client_static_keypair”. If I replace that entry with the one from the old device, whatsapp will still find the native backup, but it will fail to restore it. The restore has to be skipped and whatsapp triggers a reactivation of the phone number, but if you enter the same new number again, whatsapp accepts it without SMS/call.
→this seems to be the encryption key to be used by whatsapp.
I can confirm the following crypt12 decryption code to be working:
https://gist.github.com/nlitsme/b079f351eb1bf9c3d356ce988bb6afdc
https://github.com/EliteAndroidApps/WhatsApp-Crypt12-Decrypter
They both require the backup file and the “key” file. The latter has a check where it compares a component from the key file with the backup 1:1. In the code this is called “t1” and “t2” which should match. So far I have backups with three different t1/t2. The original backup, with a matching key; the backups from the new account on the new devices, without a key; and the backups from the new device/account, where I mixed the string from the keystore.xml file in.
The “key” file is not generated by the latest Whatsapp anymore, as it seems. Maybe the encryption/decryption key is generated on-the-fly from the keystore.xml data. If this is true, then a new activation of my new telephone number would make these backups unreadable.
Created by author: 2018-04-19
Last edit by author: 2018-05-01
Click to expand...
Click to collapse
I'm trying to do the same thing as you; it is going mostly smooth with permissions and user/group, but I'm having some issues changing the SELinux extended security attributes. I must change mine from
Code:
u:object_r:app_data_file:s0
to
Code:
u:object_r:app_data_file:s0:c512,c768
but I can't really find enough guidance online... If you could help, I'd be really grateful
Hi
My whatsapp backup was corrupted, I extracted it from Google Drive
Then .dump into a sql file, fixed the errors
Recompile into a repair db, which works because it can be viewed on the WhatsappViewer.exe
Since the db is not encrypted, how do I restore it in my own phone?
Can msgstore.db be placed inside /data/data/com.whatsapp/databases/ of my own phone? Will it work without the msgstore.db being crypted with crypt12?
Nite.Achilles said:
Hi
My whatsapp backup was corrupted, I extracted it from Google Drive
Then .dump into a sql file, fixed the errors
Recompile into a repair db, which works because it can be viewed on the WhatsappViewer.exe
Since the db is not encrypted, how do I restore it in my own phone?
Can msgstore.db be placed inside /data/data/com.whatsapp/databases/ of my own phone? Will it work without the msgstore.db being crypted with crypt12?
Click to expand...
Click to collapse
Hi, bro. Would you mind telling me how you fixed errors in the sql file? I have one corrupted database and Im not able to see it in WA Viewer. Thanks in advance.
IvanN8458 said:
Hi, bro. Would you mind telling me how you fixed errors in the sql file? I have one corrupted database and Im not able to see it in WA Viewer. Thanks in advance.
Click to expand...
Click to collapse
Hi I used this
reference from here https://andreas-mausch.de/whatsapp-viewer/
echo .dump | sqlite3 msgstore.db > temp.sql
echo .quit | sqlite3 -init temp.sql repaired.db
Nite.Achilles said:
Hi I used this
reference from here https://andreas-mausch.de/whatsapp-viewer/
echo .dump | sqlite3 msgstore.db > temp.sql
echo .quit | sqlite3 -init temp.sql repaired.db
Click to expand...
Click to collapse
Thank you very much, bro. I'll try that and hope it can fix it. Have a nice one.
Hi,
had any of you success with the restored db, to get it reintegrated into WhatsApp?
siemer said:
Goal: pass a whatsapp chat history backup (.crypt12) from one device to another with different telephone (whatsapp account) numbers.
Update: I succeeded with ultimate goal to move the chat history to a different device with a different phone number, but I failed with the re-encryption.
Encryption
First, I believed that the /data/data/com.whatsapp/files/key file might have been a leftover from an old version of Whatsapp on the old device, because I could not find the file. It turned out that it was generated later on the new device, after I finished my experiments. I’m not sure what triggers its creation.
Furthermore I was not able to decipher header and footer of the crypt12 backup file. I believe that a message authentication code (MAC) is part of it and something related to the Whatsapp account number (telephone number), because the app was quick in determining if a backup file is a restore candidate without decrypting, I’ld say.
How I managed to transfer the chat history:
Short version: get root on both devices and move /data/data/com.whatsapp/databases/msgstore.db over to the new device.
Long version: root on the new device will be less problematic, I guess. For the old device I used the fishy Kingroot app. It looks very professional and seems to download exploit code from a huge database for many devices. I got instant root access without flashing anything, but to be honest I don’t trust it regarding what else it might be doing...
Kill both Whatsapp apps before reading the msgstore.db file from the old and writing to the new device. I also removed the msgstore.db-* files on the new device. Sqlite might detect itself that the new database does not fit those helper files, but if they are not even there, they will be recreated correctly without any doubt.
Also set the permissions and ownership of that file to what it would be on the new device (not the old). My biggest oversight were the SELinux security attributes stored in the extended file attributes (XA). It made me believe that Whatsapp is verifying the database content and rejects it, but in reality it eats it just fine, as long as it gets proper access to it.
The XA tools I had available on the phones apparently show all the extended file attributes with “getfattr -d filename”, while e.g. on a standard Linux you need “getfattr -dm- filename” to get them all, not just the user.* domain. „ls -Z” shows the SELinux security context, which is a specific part of the extended file attributes, and in this case the only part I had set.
As with the file ownership, check which context is usually set on the database file on the new device and set it accordingly (“setfattr”). My old device did not even have SELinux and no extended file attributes were set there.
Other findings:
As the restore kicks only in during initial whatsapp setup, I’ve cleared data on whatsapp a lot. Constant reactivating the same phone number will trigger a hold-off on the whatsapp servers, delaying activation-SMS or -call.
But a seemingly corrupt or missing msgstore.db file trigger a restore as well, so it is possible to feed backups to Whatsapp without constant reactivation. Whatsapp failed with the restore if the SELinux context was wrong on the to-be-replaced database file, I believe. During my trials I just deleted the database (if I recall correctly) and the artificially triggered restored worked out.
Below this line is stuff I tried before:
At the moment I try to plant the old backup on whatsapp for decryption. To get to the point of restore, I force close whatsapp, clear app data, open whatsapp, give it no permissions and activate a number. At this point it asks for permissions to find restore files: I deny “contacts”, but allow for “media/files”. Here it consistently finds the most recent _local_ backup from the _same_ whatsapp account. At this point I force close the app and clear the app cache.
Restarting whatsapp brings it to the backup screen where it finds the local backup for the _same_ device.
At the moment I’m investigating which backups it picks up. For this I use backups from the same device/account as well (known to be working).
/data/data/com.whatsapp/files/key
This file is non-existent on the new device. If I drop a key file from a different account, it seems to get ignored. Whatsapp still finds the native backup (not one matching the key), and it successfully restores it.
/data/data/com.whatsapp/shared_prefs/keystore.xml
This file already exists, but only with “client_static_keypair”. If I replace that entry with the one from the old device, whatsapp will still find the native backup, but it will fail to restore it. The restore has to be skipped and whatsapp triggers a reactivation of the phone number, but if you enter the same new number again, whatsapp accepts it without SMS/call.
→this seems to be the encryption key to be used by whatsapp.
I can confirm the following crypt12 decryption code to be working:
https://gist.github.com/nlitsme/b079f351eb1bf9c3d356ce988bb6afdc
https://github.com/EliteAndroidApps/WhatsApp-Crypt12-Decrypter
They both require the backup file and the “key” file. The latter has a check where it compares a component from the key file with the backup 1:1. In the code this is called “t1” and “t2” which should match. So far I have backups with three different t1/t2. The original backup, with a matching key; the backups from the new account on the new devices, without a key; and the backups from the new device/account, where I mixed the string from the keystore.xml file in.
The “key” file is not generated by the latest Whatsapp anymore, as it seems. Maybe the encryption/decryption key is generated on-the-fly from the keystore.xml data. If this is true, then a new activation of my new telephone number would make these backups unreadable.
Created by author: 2018-04-19
Last edit by author: 2018-05-01
Click to expand...
Click to collapse
Those extended attributes ... I would never have suspected that if it weren't for you, thank you so much !
so, does it work ?
Nite.Achilles said:
Hi
My whatsapp backup was corrupted, I extracted it from Google Drive
Then .dump into a sql file, fixed the errors
Recompile into a repair db, which works because it can be viewed on the WhatsappViewer.exe
Since the db is not encrypted, how do I restore it in my own phone?
Can msgstore.db be placed inside /data/data/com.whatsapp/databases/ of my own phone? Will it work without the msgstore.db being crypted with crypt12?
Click to expand...
Click to collapse
Hi,
So how you fix it ultimately?
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 mentioned here :
/data/data/com.whatsapp/databases/msgstore.db
Can anyone guide me pls?
XMatrix2099 said:
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 mentioned here :
/data/data/com.whatsapp/databases/msgstore.db
Can anyone guide me pls?
Click to expand...
Click to collapse
Hello, since you rooted your phone it wiped out all data.
So you msgstore.db is actually crypt12 and crypt14 data.
Don't root unless you have all your items.
It wipes the key as well.
I do think key don't exist anymore and login happens in keystore.xml with static client

Where are the WhatsApp files on Android 11?

I can no longer find the media files that used to be in /storage/emulated/0/WhatsApp until Android 10. I've searched the following locations with no luck:
/storage/emulated/0/Android/data/com.whatsapp
/storage/0BD9-A981/Android/data/com.whatsapp
/data/data/com.whatsapp
/data/user/0/com.whatsapp
/data/user_de/0/com.whatsapp
Any help is welcome. Thank you!
KaMyKaSii said:
I can no longer find the media files that used to be in /storage/emulated/0/WhatsApp until Android 10. I've searched the following locations with no luck:
/storage/emulated/0/Android/data/com.whatsapp
/storage/0BD9-A981/Android/data/com.whatsapp
/data/data/com.whatsapp
/data/user/0/com.whatsapp
/data/user_de/0/com.whatsapp
Any help is welcome. Thank you!
Click to expand...
Click to collapse
Try to locate the folder using the command:
Code:
ls /data/data/com.whatsapp*
VD171 said:
Try to locate the folder using the command:
Code:
ls /data/data/com.whatsapp*
Click to expand...
Click to collapse
I just found the folder. But thanks anyway. Here's the location for those who also need it:
/storage/emulated/0/Android/media/com.whatsapp/WhatsApp
Hi.. In Android 10, Whatsapp folder used to be in root folder (emulated/0), but in Android 11, it has moved to Android/media folder. The big problem it has is - everytime you wipe data to install a ROM, Whatsapp along with media needs to be backed up. Does someone know a workaround here so that WhatsApp has its folder in the root directory? Thanks.
I wouldn't call /sdcard (/storage/emulated/0) the root directory, but ok. Whether the whatsapp folder is placed directly in /sdcard or in /sdcard/Android/media doesn't make a difference as to whether you have to back it up, as it will be on the userdata partition in both cases.
how about my case, im using samsung android 11, and i clone whatsapp with the built-in app = dualapp, but the problem is i can't received a media file from other people like document, images, videos, etc. and cannot sending any files too from my device, i've checked the dualapp\android\media and there is no com.whatsapp folder inside. anyone can help me with this case?
thanks before.
maleforwork said:
how about my case, im using samsung android 11, and i clone whatsapp with the built-in app = dualapp, but the problem is i can't received a media file from other people like document, images, videos, etc. and cannot sending any files too from my device, i've checked the dualapp\android\media and there is no com.whatsapp folder inside. anyone can help me with this case?
thanks before.
Click to expand...
Click to collapse
I am in the same boat. I can no longer find the dual WhatsApp files, and that version is like a redhead stepchild, cannot add stickers, doesn't recognize file types, etc. All since Android 11 moved the dual app files "somewhere".
maleforwork said:
how about my case, im using samsung android 11, and i clone whatsapp with the built-in app = dualapp, but the problem is i can't received a media file from other people like document, images, videos, etc. and cannot sending any files too from my device, i've checked the dualapp\android\media and there is no com.whatsapp folder inside. anyone can help me with this case?
thanks before.
Click to expand...
Click to collapse
Same here, it happened this morning. I am having my exams and because of this I can't access my pdf notes anymore. All of this is so frustrating :/
Someone also got trouble with loading the "WhatsApp Images" Folder over a File Explorer?
When i wanna access it from several Apps like File Explorer or Backup Apps, it will load like endless, some minutes at least.
Have mor than 10 000 Pictures in it but before it loaded always immediately.
If i am in TWRP i can access the Folder but don't scroll down with the bar, just around 1/3 of the Page. Only if i scroll over the Display every File it will show me someting, otherwise it shows just Empty over some Files, like there would be a File Limitation?
Chrypsisilon said:
Someone also got trouble with loading the "WhatsApp Images" Folder over a File Explorer?
When i wanna access it from several Apps like File Explorer or Backup Apps, it will load like endless, some minutes at least.
Have mor than 10 000 Pictures in it but before it loaded always immediately.
If i am in TWRP i can access the Folder but don't scroll down with the bar, just around 1/3 of the Page. Only if i scroll over the Display every File it will show me someting, otherwise it shows just Empty over some Files, like there would be a File Limitation?
Click to expand...
Click to collapse
Exactly the same here. Switched to Samsung android 11 3 weeks ago and since a few days Whatapp app backup (80mb) took an hour instead of less than 2 minutes. Quickly found out that WA folder had been moved and that it now takes 10-60 seconds to open WA images folder (9400 pics) instead of < 1sec at previous location. Yesterday I reinstalled WA and everything was placed back in the original folder (0/WhatsApp) and everything was fast again. But tonight (00:00) everything has been moved to Android/media/com.whatsapp and the backup of whatapp is already running for 50 minutes now. The status for a very long time is: "Prepairing google drive backup".
This is very frustrating and I don't understand how they can ruin this for so many people (see google store reviews).
I don't understand why one location is so much slower than another directory. Is exactly the same storage. Does it have to do with indexes? Who is going to offer a solution for this, Samsung or Whatsapp?
Google or WhatsApp have had to get a solution, but if the wan't?
Because i am using OnePlus, so we know that it shouldn't be a Mobile Phone Manufacturer issue.
Crazy that even the built in Backup won't work because i just use other ways like "FolderSync" or "Synology DS Cloud" Backup.
Even Built in File Explorer or such as "X-Plore" and whatever, won't load the Folder until there are gone some Minutes.
Can also just guess why, but Indexing should be done if it is.
Did also some other trys with a Folder which has just 5130 Pictures (copy of some Pictures).
Used "X-plore" to easy Move the Folder around.
- Move Picture Folder in "Android" Folder will work well but every of the 3 subfolder "data", "media", "obb" will get in trouble.
- Move Picture Folder into "data", it will take a longer Time, also "obb" Folder which is a kind faster.
- Move Picture into "media", it will moved immeaditly like usual at the Phone.
Access Picture Folder just under "Android" Folder it will work fine, but if you wanna Access this Folder under "data", "media" or "obb" you have to wait and enjoy the running circle symbol.
So is the question, what is different with all the subfolder under "Android", like they would have a Speed limit or additional encryption?
First you need to do a whole backup of your chat so that you can migrate the chat information from respectable whatsapp to Fouad Whatsapp.
I am also facing this problem yesterday when I upgrade my smartphone from android 10 to android 11. But after some research, I found the solution. Here are the complete details:
Whatsapp folder in android 11
For images
Android\media\com.whatsapp\WhatsApp\Media\WhatsApp Images
Guys, I'm using Samsung phone too and my WhatsApp media files is in a mess too since the location change a couple of months ago. Now I have media stores in these 2 folders, just like you guys:
1) Whatsapp/Media
2) Android/media/com.whatsapp/Whatsapp/Media (new location)
Now my issue is, I have photos back from year 2016. I can view it in Whatsapp chat (some of them can't locate anymore) but i can't find it in both the directories mentioned above. When I select 'view in gallery', and then i use MiXplorer to check the image location, it says: (refer to attached screenshots)
Path: content://com.whatsapp.provider.media/item (which i guess it is in obb folder)
How is this even possible? The image is not lost but it is not accessible by me anymore and I cant back it up. Due to this mess, I really want to tidy up my media files and move them into single location, presumably the new location but the missing files stop me from doing it. It's bugging me for a few months now
maleforwork said:
how about my case, im using samsung android 11, and i clone whatsapp with the built-in app = dualapp, but the problem is i can't received a media file from other people like document, images, videos, etc. and cannot sending any files too from my device, i've checked the dualapp\android\media and there is no com.whatsapp folder inside. anyone can help me with this case?
thanks before.
Click to expand...
Click to collapse
I had installed beta APK and it has some bugs. Today I've decided tou reinstall the sable APK when i uninstalled the beta App the whole folder form android/media also deletd and I've lost everything thing. I had backed up to google drive a few days ago now i could not found the backup. The backup i got is of Dec 2020.
Guys, try this path: <SD-CARD>/Android/media/com.whatsapp/WhatsApp
I found all my whatsapp media there since android 11 upgrade (Samsung M31)
All my files keep on /sdcard/WhatsApp/Media even on Android 11.
Some solution here about the Access Time from the Images Folder?
When i Access (does not matter which File Explorer or Backup Tool) then i have to wait over 10 Minutes and most of them still won't show any pictures. Of Coursee i have over 10'000 Files in it but at the old Location it took me just a few seconds.
Chrypsisilon said:
Some solution here about the Access Time from the Images Folder?
When i Access (does not matter which File Explorer or Backup Tool) then i have to wait over 10 Minutes and most of them still won't show any pictures. Of Coursee i have over 10'000 Files in it but at the old Location it took me just a few seconds.
Click to expand...
Click to collapse
Any OS has problems to deal with folders that contains millions of files.
Certainly, you need to clean the folder.

Need an efficient method to extract all of my memos.

I have an old Samsung A3 using Android 7 and over the years I've journaled on the default Memo app, now that I have a new phone I want to extract all of these memos and have them saved somewhere on my PC before I factory reset. The issue is that you can only share one memo at a time and I have over 1100 entries. This would take forever. Is there a way to extract all of them in a convenient way that wouldn't involve tediously sharing each and every one of them to my drive?? Are they all located somewhere in a folder?
Youb could try using SmartSwitch for just that.
Android 11 will likely puke all over it though unless there's an updated version of that app.
It probably won't work as R doesn't like to share databases... you feeling secure?
Be careful you don't lose all of it...
It's stored in it's own folder or in the Android folder in the data folder. It may be encoded for just that app... if so danger Will Robinson, danger!
Sometimes the only way is the hard way
I use ColorNote, it automatically backs up to my SD card. For the cardless victim users it offers cloud backup.
blackhawk said:
Youb could try using SmartSwitch for just that.
Android 11 will likely puke all over it though unless there's an updated version of that app.
It probably won't work as R doesn't like to share databases... you feeling secure?
Be careful you don't lose all of it...
It's stored in it's own folder or in the Android folder in the data folder. It may be encoded for just that app... if so danger Will Robinson, danger!
Sometimes the only way is the hard way
I use ColorNote, it automatically backs up to my SD card. For the cardless victim users it offers cloud backup.
Click to expand...
Click to collapse
I downloaded SmartSwitch and backed up memos and this was what I got.
I'm assuming it's encrypted. Is there a way to decrypt this so I'm able to have all of them in a readable format. I feel like I should theoretically have 1100 files but it's just one?
That's a great question and I have no clue.
I see 2 options.
If you can load that app on your new phone then inject that folder data into it's new folder you may get lucky.
Or you have a day or two of work ahead...
With ColorNote you can use hyperlinks that open directly from the "note" in the browser. No cut and paste needed. I use it for bookmarks too.
I also use an old free copy of WPS to create word documents to avoid this kind of fubar.
I doubt that app copy would even load on R however it did install on Q.
Android has screwed up their platform so badly with R that I will be running on Q for at least 2 more years. I simply won't tolerate R trashing my trusted apps... and I have other better options.
@eu7tFeTyT7vfPy
Rename the file memo.nmmm to memo.zip and then extract the ZIP-file.
You'll get a file named memo.bk wherein all the memos are stored. Take not that this file may be encrpyted unless you opted for "No encryption" in Smart Switch app's settings.
jwoegerbauer said:
@eu7tFeTyT7vfPy
Rename the file memo.nmmm to memo.zip and then extract the ZIP-file.
You'll get a file named memo.bk wherein all the memos are stored. Take not that this file may be encrpyted unless you opted for "No encryption" in Smart Switch app's settings.
Click to expand...
Click to collapse
I have it in .bk but how would I read it?
IIRC then the contents of memo.bk is a SQlite (version 3) database, filename is mmssms.db.
Use this to read db: DB Browser for SQLite 3.12.0
jwoegerbauer said:
IIRC then the contents of memo.bk is a SQlite (version 3) database, filename is mmssms.db.
Use this to read db: DB Browser for SQLite 3.12.0
Click to expand...
Click to collapse
I'm not familiar with this type of stuff but I've downloaded it and tried "open new database" and then selecting memo.bk which tells me isn't a database. Am I doing something wrong?

Categories

Resources