Transfer WhatsApp Chats to New Galaxy Note Phone from PC - General Questions and Answers

I had my 2nd Galaxy Note 4 show the eMMC fault and go into endless bootlooping. I thought that I had been backing up whatsapp to google, but I found out otherwise. Here is the situation:
*Note 4 (unrooted) would start up for about 20 seconds before restarting. Not enough time to backup whatsapp to google drive. I was backing up whatsapp locally though. Marshmallow 6.0.1
*I was able to install TWRP. The phone has no problem starting and staying in TWRP recovery mode. Endless bootlooping only occurs when I try to start Android
*I could see all non-root-access folders in TWRP as well as in file explorer in Windows 10 when the phone was in recovery mode and connected to PC
*I copied all whatsapp folders from the phone to PC with Windows 10 file explorer (again, only when the phone is in TWRP recovery mode)
* I realized that these files may not be enough to open the whatsapp db in a new phone due to encryption
*I then used TWRP to install Magisk
*Then I was able to use ADB to pull the whatsapp key file and wa.db file from the phone to PC
*I am able to unencrypt the database and view in WhatsApp viewer
*After 6+ years of the Note 4 (2 separate devices), I purchased the Note20 Ultra yesterday (what an upgrade!!)
Question is, what do I need to do to get the chats from my PC onto my Note 20? Phone-to-phone transfer won't work because the Note 4 won't stay on long enough. BTW, I'm almost a complete noob--I just figured these things out yesterday with the help of some amazing resources from folks like you. So a big thanks to you. I did some whatsapp db merging a few years ago when my first Note 4 died, but I don't think any of that knowledge is still relevant.

...surely it can't be as easy as transferring my media files then dropping only the msgstore.db file into the Note 20, can it?

Ok, it really was that easy.
*I copied all my non-root-access Whatsapp folders over to my unrooted Note 20. These folders included all media and the msgstore.db.crypt12 files but, of course, did not include the key nor the wa.db files as these latter files are only found in the root-access folders.
*I then signed in to a google account so that I could download Whatsapp from the Play Store
*After initial installation and before a full whatsapp setup, I signed out of all google accounts on the Note 20 in order to force a restore from the local backup that I had copied to the phone (actually, I messed up twice and Whatsapp found an old google drive backup; I had to uninstall and reinstall whatsapp twice; finally worked on the 3rd try)
*Most of my chat contents, media, and correct contact names are now on my new phone
I must not have understood the high-level details of the encryption. I thought that the key was device-specific and that moving an encrypted msgstore.db file to a new device meant that I must also move the original key with the db file so that the new device could decrypt the first time. This doesn't seem to be the case. It must be that the key is associated with the whatsapp-registered phone number because I did use the same sim card/phone number in the old and new phones. Does anybody know if that is correct?
Two slight issues that I will try to fix today include 1) some missing contact details and 2) a few missing recent whatsapp chats.
1) Most of my contacts were synced with google, so I pulled most of them to my Note 20 quite easily. I must have also had some local contacts on my old phone that I never synced with google. Can anybody post a link to a good tutorial on how to convert a contacts2.db to vCard or a similar format? It's tantalizing that my old Note 4 will start for about 20 seconds and I have tried to get into my contacts on the phone and export them to the removable SD card. It's so close. The export starts but doesn't quite finish. The result is an unfinished (408kb) vcf file on my sd card that won't open on my new phone.
2) I think that the old phone started up just long enough to download the latest whatsapp chats from the server, but not long enough for me to view them. I'm missing chats from the 3-4 days between when the old phone was wonky and I installed whatsapp on the new phone. I think that they are not downloading from the whatsapp server onto my new phone because they already downloaded to my old phone
Any thoughts on any of this?

If you can't decrypt, key file has changed.

Decrypting is not a problem. I can do it on my pc as long as I have the key file (which I do). The new phone is also able to decrypt--without the key. That is what surprised me

If you make a full backup and then make a full restore, your whatsapp will work perfectly.
You mixed things up a lot.
Msgstore.db and wa.db are never in same folder of msgstore.db.crypt12.
Msgstore.db and all other databases (*.db files) are not encrypted.
You don't need key file to read them.
Only *.crypt12 files are encrypted.
For them, you will never can decrypt them without key file.
About google backups, they are NOT encrypted.
All files backuped to google, are unencrypted.
Taken care.
Your worries are unnecessary.
Keep your backups safe and secure and you will have no one problem.

Ok.
So I did make a complete backup of the rooted Note 4 to my external SD card using twrp. I now have 2 phones: the old Note 4 which won't start and the new Note 20 which I don't want to root at the moment.
How could I make a full restore, so that my whatsapp will work perfectly?

Ok, I think I got this now. I've read up on the various threads related to this and I think I know what to do now

Related

[Q]Phone not responding CD1004

When I'm transferring media files over to my phone it has around 2gbs of space left. However when i transfer anymore media files it gives me an error:
PHONE ISN'T RESPONDING
Your device isn't responding. Please disconnect it,rstart it, then try again.
To see if theres's more information about this error, click Web Help.
Error Code
C00D124D
The only fix for this is to delete some videos in order to sync more which is a b****h seeing how i have 2gb space left. Has anyone also encountered this problem? is there a fix for it?
Bumpppppppppppppppppppppppppppppppppppppppppppp
I haven't seen any other reports of that error.
Did you try clicking Web Help?
Did you try searching for that error code and/or error message?
If that doesn't work, you might need to hard-reset the phone. It sucks, but if something is messed up, that's the easiest way to recover.
The thing is i have games which i want to keep the saved games, and its annoying reinstalling everything.
Is it possible to back it up and hard reset it and afterwards use the backup?
Is that possible? Yes, sure (assuming the phone can be backed up, and your weird error doesn't et in the way).
Will it fix anything? Probably not. If you restore a backup after hard-resetting the phone, it's like you never did the hard reset. That's not going to help if there's a problem to fix!
Is there are way just to backup apps and contacts etc?(I know sms can be backed up)
Contacts should already be stored on your WLID, Google, Hotmail, Exchange, Facebook, etc. accounts ("cloud" services). The phone doesn't actually store them locally, except for a cached copy in case it doesn't have data connectivity at some point.
Your list of purchased apps is already known. You can use the Marketplace website to see your purchased apps and re-install them, free. However, the data for those apps will be gone forever unless you manually back up it. This process is not particularly simple using the software available for Samsung, but it can be done. You need to copy the contents of the IsolatedStore directory for each app that you want to back up to a PC. The IsoStore folder is located at \Applications\Data\<GUID_FOR_THE_APP>\Data\IsolatedStore. There will also be an IsolatedStorageSettings file that should be backed up.
You can use WP7 Root Tools to copy your isostore files to a location that they can be removed from the phone, for example by putting them in the WP7 Root Tools IsoStore folder and then using an Isolated Storage Explorer tool (there are several) or by putting them in the Mango Webserver app's IsoStore and using the Webserver (on the phone) and web browser (on the PC) to download the files. As I said, though, the tools for doing this on Samsung aren't great; WP7 Root Tools isn't designed as a backup app and it is tedious to copy multiple files\folders.

[Q] S Note: Error Occurred. HELP!!

Hey there,
I have a Note 10.1 and use it to take down my lecture notes from university.
Ive had no problems with it all semester until this week when I sit down to do my revision all my S note files are blacked out and when I open them I am greeted with the 'error occurred' message, so basically I have lost a whole semesters worth of work (besides this weeks) thanks to the corruption of this data. I do have a 64 gb SD card mounted but my S note files have never been anywhere but in the S Note folder on the system memory I have already tried to change their extensions on my PC with little success.
So the question after my rant is are there any ways to sort this out so I can do some f'in revision?
Many thanks,
Adam
Adam132 said:
Hey there,
I have a Note 10.1 and use it to take down my lecture notes from university.
Ive had no problems with it all semester until this week when I sit down to do my revision all my S note files are blacked out and when I open them I am greeted with the 'error occurred' message, so basically I have lost a whole semesters worth of work (besides this weeks) thanks to the corruption of this data. I do have a 64 gb SD card mounted but my S note files have never been anywhere but in the S Note folder on the system memory I have already tried to change their extensions on my PC with little success.
So the question after my rant is are there any ways to sort this out so I can do some f'in revision?
Many thanks,
Adam
Click to expand...
Click to collapse
hmmm. upload one of the files. maybe the file is ok, and its just your snote software.
Hope this helps
Adam132 said:
Hey there,
I have a Note 10.1 and use it to take down my lecture notes from university.
Ive had no problems with it all semester until this week when I sit down to do my revision all my S note files are blacked out and when I open them I am greeted with the 'error occurred' message, so basically I have lost a whole semesters worth of work (besides this weeks) thanks to the corruption of this data. I do have a 64 gb SD card mounted but my S note files have never been anywhere but in the S Note folder on the system memory I have already tried to change their extensions on my PC with little success.
So the question after my rant is are there any ways to sort this out so I can do some f'in revision?
Many thanks,
Adam
Click to expand...
Click to collapse
So trying to find how to fix a corrupt snb file is a pain in the butt! I lost my school notes for the semester as well, and we're in finals week now. It's an absolute must I have them, so I feel your pain.
I found out that if you change the file extension from .snb to .zip you can view what is in the file itself. Now a zip should open on any computer, but if it doesn't, it means your snb file is corrupt. The way it became corrupt is your snb was probably open in s-note while you restarted or updated something. Because it didn't close and save properly, it corrupted the file.
Step 0. Move the snb from your device to a pc.
Step 1. Change the file extension from snb to zip.
Step 2. Find a zip repair program THAT WON'T STUFF A BUNCH OF MALWARE into your computer.
Step 3. Run the damaged zip through to repair it.
Step 4. Try to open the repaired file as a zip. If it opens, whatever was corrupting it is now gone.
Step 5. Change back the file extension to snb. (now if it doesn't change back at first, it might be because when you initially changed it to a zip, the file extension became hidden because zips are recognizable to pc's. You'll have to change the viewing options in order to make the file extension visible, and therefore, editable)
Step 6. Put it back into your tab-phone-blet-whichever to test it out.
Step 7. Hope and pray that since it worked for me, it'll work for you.
Good luck!
S-Note Blank Pages
I tried this without success. The snd opened fine as a zip. Everything was still blank though.
This topic came up on another forum, and at least in my case and another's, the problem happened after adding an image to a page.
In my case, it was adding an image on the S-Note Diary template--lost 39 pages.
A previous notebook was saved using the "Note" template without trouble. I even added images, but manually, not into placeholders as with the Diary template.
Seems pretty clear there's a bug in the S-Note app that Samsung needs to fix. Until I hear of a fix, I'm staying away from the templates that include places for images. Too much work wasted... I normally backup regularly, but hadn't yet with this 39 page batch...
Hi, I lost my s note files due to custom binary frp locked and I did a factory data reset when I tried to recover the back up files that I had on my pc thru recuva it doesnt open my s note files it says invalid file format and file might be moved, deleted, or renamed. Is there any chance to open it back?

Photo and Video transfer issues with S6 to Windows 7 & 10

I have used microsoft autoplay for years transferring photos and videos to my PC from my camera and my phone. The phone is working fine with one exception.
1) I'm able using autoplay on my PC to set a destination directory on the PC i.e. C:\Users\Mike\Pictures\2015
2) I can also tag them with event details or simply let them the folder be auto named to the date of transfer.
3) Deleting the source is also optional, saying no, simply lets them remain on the phone.
What I have noted since I got my S6, is the S6 will not simply transfer the videos and photos in the /DCIM/Camera folder, but it will transfer TTS files from the navigation software Waze under the Android/Wave folder and other files from assorted game apps also under the android folder.
So I have two questions:
1) Is there anyway to tell the phone to only share the folders under "DCIM" during sync / transfer?
2) Is there any other way to hide folders on the phone other than "private mode", this does not work as the navigation software does not see it's TTS files and simply transfers them again?
This seems to be a pretty simple issue, yet its stumped me and Samsung was no help either, they suggested their smart switch software, which is more for backup than transferring periodically.
Thanks
Mike

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.

Categories

Resources