yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] TripCode:
Please DO NOT install ANY patched WhatsApp APK's. Install the latest WhatsApp APK from the Google Play Store or from the Official WhatsApp Website.

Then download and run: WhatsApp Key/DB Extractor (the one attached to the first post in this thread).

Yes, the paths are correct! I am referencing the relative paths from the ADB Backup and NOT the absolute paths on your device (which you are referencing).
[Android Apps and Games] danbar10:
Great project... some help needed

Hi great project but I've some issues. Attached is the result that i got. Thanks for your help

Testing on a Moto G 1st gen. Android 4.4.4

Win 8 32bit
[Android Apps and Games] maikwars:
I told you so, that I have with the latest original WhatsApp this error message how okunova!

Edit:

It works with your attached version 1.6! Why failed 1.9 its a riddle!

P.S. Its possible to run the script without an internet connection? I already have the legacy whatsapp.apk in tmn folder ;) The tool breaks off without an internet connection !
[Android Apps and Games] TripCode:
I have not released a 1.9 version (see the change log in my original post). You are probably referring to the fork on GitHub by Abinash Bishoyi? I do not maintain this unofficial fork, so you would have to go to Abinash for support on his version. I believe his version 1.9 is based on my 1.1 release.

As for running offline. It needs to be online to download the legacy WhatsApp version, which it will save to: tmp\LegacyWhatsApp.apk (relative from the bat file directory). Once it has been downloaded then it will function offline, if you remove the line of code that uploads the crypt key to whatcrypt first.
[Android Apps and Games] maikwars:
Right it was Abinash's version :D

So for running offline...it breaks off after bin\curl.exe. To remove the codelines against uploading keyfile isnt successfull!
[Android Apps and Games] TripCode:
Try the attached bat file in the same directory as the original, making sure that LegacyWhatsApp.apk exists in tmp/.
[Android Apps and Games] maikwars:
Thank you for edit our script. I almost removed the right code lines :D

But now it contains an bug.

Make a Backup :svetius:

install legacy apk from tmp :svetius:

Start backup (confirm it on my device)....starts and then crashs my Whatsapp-App at my device. Script doesnt run anymore. I pressed Ctrl+C, the script abort this step and make the restore to current whatsapp version (2.12.56), WhatsApp is still crashing, a device reboot solved this problem.
[Android Apps and Games] TripCode:
No worries. That most likely occurred due to WhatsApp being open on the device at the time, or perhaps even adb being oh so random. Just run the bat again or like you say, just reboot the device. The bat file is pretty harmless when it fails (for whatever reason).
[Android Apps and Games] kenil89:
Great method..will try today nly :):):)
[Android Apps and Games] JordTam:
I've successfully done all the processes BUT I can find the Whatsapp key anywhere. It's not appearing in the extract folder. Any ideas where it could be or why I can find it?
[Android Apps and Games] TripCode:
It should be located in the "extracted" directory, relative from the WhatsAppKeyExtract.bat file. If the key and databases are not there, then the process failed, in which case you should re-run. If it still fails you should take a screenshot of the cmd window and post it here so I or someone else can advise you further.
[Android Apps and Games] snufflez:
Hey TripCode

The app works fine for version 2.12.5 (playstore version). However, the key doesn't work on version 2.12.67 (new theme not released on playstore yet) which i downloaded it on the Whatsapp website itself.

I am able to extract the key but unable to use the key to decrypt my existing backups in my Databases folder (using Whatsapp Viewer). Do you have any idea what could have went wrong?

Thanks
[Android Apps and Games] reking:
Can't get this to work. The 'extracted' folder just stays empty throughout this.

EDIT: this seems to be my problem:

cannot stat 'tmp\apps\com.whatsapp\f\key': No such file or directory

Why would that happen?

EDIT2 remember to have the ****ing java path system variable set correctly folks. im stupid
[Android Apps and Games] Reinforcementshavearrived:
Hi, I stumbled on this thread and I tried your program but it seems to stop on installing the legacy version of Whatsapp.

Cmd prompt attached. It gives me a "Error: Unknown option: -d" then the same kind of stuff repeats with everything else.

I have the Java Path set up correctly and Java is updated to the last version.

I'm running a HTC Desire X with Android 4.1 stock unrooted.

Edit: Could it be that S-ON is the cause of the problem?
[Android Apps and Games] ttilt:
I'm testing on a samsung galaxy note 1 and even after enabling usb debugging, having java installed and having installed the ADB, Fastboot and drivers, when I execute the bat script it stops at the 2nd line ("daemon started successfully"). Plugging in the phone before or after the script is run has no effect and it gets stuck at that line.

Whatsapp version 2.12.5.

Tks
[Android Apps and Games] TripCode:
The key extraction is working fine, your particular issue is related to the iv being removed from the key. See my post here: Decrypting WhatsApp crypt8 >= v2.12.38

:) :good:

Option d allows forced downgrades of apps. Update your ADB drivers. Also, if you have an old version of the Android SDK platform tools installed then there could be an adb conflict. Upgrading your Android SDK should remedy the issue.

What happens if you run "adb devices" in your terminal? The error you are getting usually means the device is not recognized or usb debugging has not been enabled properly (did you get the prompt to verify the digital fingerprint?).
[Android Apps and Games] Bactu:
It worked but the key file is not recognized by WhatCrypt!

Any ideas?
[Android Apps and Games] smokey1888:
I am using the latest version of your whatsappkey/dbextractor but a get this message saying install_failed_invalid_apk when it tries to apply the legacy apk. amongst other errors. It also then says STRONG AES ENCRYPTION NOT ALLOWED. I am using a Samsung Galaxy S4.

What am I doing wrong?
[Android Apps and Games] Jaxx89:
I know this must have been said a dozen times over here, but I would not be saying it unless it wasn't absolutely necessary.

I have the crypt8 files but not the key file and cannot retrieve it either.

I should not be saying this here but can't wait anymore.

My gf has been on drugs since a while, got her phone yesterday and retrieved some of the data.

I just want to get her off the drugs and need to find out who the culprit is.

Spoken to her mom and will try to get the phone again.

But hey, you don't have to take my word for it.

I'll send over the crypt8 files and all other data and you can have a look yourself.

Please guys help me out.

Sorry for posting about my personal problem here.
[Android Apps and Games] adamaris820:
reliable WhatsApp message extractor

It's the WhatsApp message extractor from TENORSHARE that helped me extract WhatsApp messages from iPhone backup to my computer. Overall steps for using is easy. You could check their website tenorshare.com
[Android Apps and Games] mani_jeenu:
need some help guys. I was able to extract a key and a msgstore.db file but dont understand how to use it exactly

whatcrypt site asks for the original msgstore.crypt8 file whereas when I tried whatsapp viewer it was also asking for crypt8 file and cipher key

when I tried pointing it to a copy of msgstore.crypt8 from my phone along with the key file, it gave error

---------------------------

Error

---------------------------

Decryption failed. Error during unzipping (inflate).

---------------------------

OK

---------------------------

any pointers ?

EDIT: Never mind I figured it out. Thanks for the tool.
[Android Apps and Games] MrsXidus:
I'm stuck on this.

i.imgur.com/9vzcLBk.png

I've set the java path system variable correctly, updated the java to the latest version and tried it with "WhatsAppKeyExtractNoJavaCheck" version too. Didn't work still. Please help.
[Android Apps and Games] zangieff7:
hey, excellent tool. I wonder if it will be possible to make this script run on a recovery mode (adb on philz's cwm)? Please say yes! Thanks!
[Android Apps and Games] traveler23:
Problem

Hello im trying to get the key but i have some problems if someone can help me please, i cant get the files and the folder called extracted
[Android Apps and Games] soohyung:
Hey thanks for the great work and keeping it up to date, keep it up. Unfortunately I've been running into some issues, the batch script closes right after outputting a line saying something about a Syntax error. I've been able to narrow it down to pretty much this line of the script:

for /F "tokens=1" %%k in ("%version%") do

What's wrong? What can I do to resolve the issue?
[Android Apps and Games] JackClarke:
I'm getting this back: 'cp: apps/com.whatsapp/f/key: No such file or directory'

Running the shell script on my mac.

My WhatsApp won't open, it crashes immediately. Might this have something to do with it?
[Android Apps and Games] Link212:
The script doesnt work actually. It says it has something to do with the permission with the Call/Voice over ip stuff that has come with the new whatsapp version.

So the patched whatsapp.apk cant be installed!
[Android Apps and Games] kaboomzaboo:
No files in the "extracted" folder

Hello /TripCode!

I was just playing around with your tool to get the key/db files. I have followed all steps of the instructions you have posted, but the "extracted" folder on my computer is empty after the script ends. Here's a snapshot of the cmd window

[IMG="CMD WIndow"]https://i.imgur.com/wApFiSK.png[/IMG]

Any idea what can i do to fix this?
[Android Apps and Games] duduscoke:
Hi, I've used this tool and it worked perfectly.

Now I want to merge two wa databases together with SQL lite. After this, I'd like to put the new database file back into the .tar file, pack it back into an .ab file and the restore it to my phone.

I'm already practicing to replace the .db file in the .tar archive, but I'm not sure how to do this. Can anyone help me with this?
[Android Apps and Games] duduscoke:
So I figured out how to update the file. I just extracted all files from the backup in a windows folder, replaced the database file (in which I altered a message) and then created a new tar file. From this tar file I created an .ab file with java. Then I used adb -restore to restore the backup (while installed a legacy wa version).

It seemed that I succefully restored the file, however when I install a recent wa version and open it, I can't see my changes...

Will try some more later, but maybe someone can point me in the right direction.

Cheers
[Android Apps and Games] duduscoke:
Ok, for whom it may concern: I figured it out.

When you install Whatsapp from scratch, it looks in your database backup folder. If it finds a msgstore.db.crypt8 file, it'll prompt you if you'd like to restore those messages. I just tried to simply place the un-encoded database msgstore.db with my alterations into that folder as only file. I freshly installed Whatsapp and got the question to restore the messages! It just restored from the .db file. And why not :D
[Android Apps and Games] anewbieuser:
not working on S6 Edge

Hi, first of all, thanks for developing this program to help us, who need to decrpyt Whatsapp's db.

I was trying to decrypt the database on my S6 edge, but when I ran the extractor, after I selected ok on the phone for debugging, the program exited by itself in Windows 8.1. I managed to take a screen shot of it before the Window disappeared, please see attachement.

Anyone can shine me some light on this?

Also, when I used this on my GNex, it also said there is no such directory when copying to: "sdcard/WhatsApp/Databases/.nomedia" Anyone experienced that before? I am wondering if this is because I am actually not logged into Whatsapp on this phone. This is the reason why I need to use the wahtsapp key/DB extractor, I upgraded to a S6 Edge before backing up my wahtsapp and now I want to merge my old histories on GNex with my new history on S6 Edge. I cannot log into Whatsapp anymore with my old Gnex because S6 Edge uses a micro SIM so my old SIM doesn't work on GNex anymore and so I cannot receive SMS to log into Whatsapp on GNex. Although the .nomedia was not copied, but I still got the decrypted db file in the extracted folder in Windows and was able to open it with SQLite Database Browser.
[Android Apps and Games] xda dado:
Operation Failed message!!

Plz guys, I need help! Im not facing a problem with java on my PC but the attached error is still showing!

In addition Im facing an APK error during backup, but it's not clear!
[Android Apps and Games] xda dado:
Facing the same problem!

Hey man, Im facing the same problem! did you find any solution??
[Android Apps and Games] sepulcrio:
please an help...

My device is Nexus 6 - last lollipop version. It's impossible to do a backup cause cryptographic backup system active and impossibilty to change option. there's a way to have key file without root or flash or what else ..?

thanks
[Android Apps and Games] Ice Zodiac:
got the key and everythings but whatsapp viewer cannot see my key.

is there something wrong?
[Android Apps and Games] terraquian:
HOWTO for ENCRYPTED PHONES

HOWTO for ENCRYPTED PHONES

You need:

Modify WhatsAppKeyExtract.bat

- Change at bottom to avoid exit from cmd.exe when testing

"exit" by "exit /b"​

- Add "%1" at line 68 to pass the phone password encryption to java "abe.jar"

java -jar bin\abe.jar unpack tmp\whatsapp.ab tmp\whatsapp.tar %1​

Download and install Java Cryptography Extension (JCE).

Search in google jce-7-download or jce8-download according to your version of java

- To install in my Windows (8) I had to copy the two files to the following path (admin rights needed)

C:\Program Files (x86)\Java\jre1.8.0_31\lib\security​

Execute WhatsAppKeyExtract.bat with new parm (password of your encrypted phone)

for example "WhatsAppKeyExtract.bat pepe1234"​

Before installing JCE, when you executed WhatsAppKeyExtrack.bat, you saw:

[...]
Now unlock your device and confirm the backup operation.

Strong AES [B]encryption not allowed[/B]
Magic:
Version:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
[...]

Now, with JCE instaled, you see it's allowed:

[...]
Now unlock your device and confirm the backup operation.

Strong AES [B]encryption allowed[/B]
Magic: ANDROID BACKUP
Version: 3
Compressed: 1
Algorithm: AES-256
IV: 9577CF220A106147248DC79AF963E8AA
MK: 4AA76815BAC4A173356D273658918F675FA72DC3D9ACB8744F40DF00FBD108FF
MK checksum: BDE40F6552F08AC7537E0E49A27DBE5909AF91E0E0E2CFE1D67D8D4C77D7A314
[...]

By the by, in my Samsung phone, the button to proceed with the full backup is not seen:

(in the picture you can see something, but on the screen not could see anything)

i.imgur.com/mxFN4Jt.png (I can't post images)
[Android Apps and Games] helperman:
This is for all with the Syntax problem.

There seems to be a problem with the version check, I just removed it and then everything worked perfectly.

Replace the contents of your WhatsAppKeyExtract.bat with this

pastebin.com/trNC3Ahh

Good luck :) :good:

Edit:; Huh... because I don't have 10 posts, I can't put a link to the file. Just copy the pastebin link to a fresh tab.
[Android Apps and Games] cranig:
Error: Unknown option: -d

I have the same problem as Reinforcementshavearrived - “Installing legacy Whatsapp 2.11.431...Error: Unknown option: -d” – ultimately resulting in error messages often reported by other users, such as “bin\tar: apps/com.whatsapp/f/key: Not found in archive” and “Extracting whatsapp.key ...The system cannot find the path specified.”

As recommended by TripCode on 18-05-2015, I updated the SDK packages (I originally had “adb-setup-1.3” installed): I installed the android studio bundle (141.2178183) and several packages, amongst others the latest Android SDK- (Rev. 24.3.4), Platform- (Rev. 23) and Build- (Rev. 23) Tools on top of “Android 4.1.2”. However, the message remains “Error: Unknown option: -d”.

Any ideas how I can get this to work? Thanks!

fyi: Unrooted Galaxy S2 with Android 4.1.2, Whatsapp Version 2.12.250, USB Debugging enabled, Windows 10, java version 1.8.0_60, path variables are set

Edit: Is it possible that the "-d" option is not understood by Android 4.1.2 (API 16) and earlier versions? At least the below website suggests this is the case. If this is correct, is there any chance I can still get this to work?

The link with this info: bugzilla.mozilla.org/show_bug.cgi?id=851224

Edit 2: Solved it, still some error messages, but at least I now find files in the "extracted" folder! I simply removed the command "- d" in the ".bat" file "WhatsAppKeyExtract" as suggested here stackoverflow.com/questions/13400499/is-there-any-way-to-ignore-install-failed-version-downgrade-on-application-insta
[Android Apps and Games] hugoscorreia:
Hello!

I did a backup of my Nexus 6 before gaining root access, but when I proceeded to restore from the backup after gaining root, I'm having a few issues. When I try to restore through ADB, the process seems to go well, but when it's done, there are no modifications on the phone. I then tried extracting files from the backup with this tool this is the message I get:

"Hugos-MBP:android-backup-extractor-20140630-bin hugocorreia$ java -jar abe.jar unpack /Users/hugocorreia/Android/backup.ab /Users/hugocorreia/Android/backup.tar 4689

Strong AES encryption allowed

Magic: ANDROID BACKUP

Version: 3

Compressed: 1

Algorithm: AES-256

Exception in thread "main" java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)

Caused by: java.lang.RuntimeException: javax.crypto.BadPaddingException: Given final block not properly padded

at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:351)

at org.nick.abe.Main.main(Main.java:64)

... 5 more

Caused by: javax.crypto.BadPaddingException: Given final block not properly padded

at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)

at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)

at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)

at javax.crypto.Cipher.doFinal(Cipher.java:2087)

at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:268)

... 6 more

"

Terminal displays this message and nothing else, and .ab backup is not converted to .tar.

Does any one have any clue of what it may be?

Thank you all!
[Android Apps and Games] rayman3:
New method do not work for me, but good job!

Hi folks, hi I´m following this thread a long time and i have to say THX a lot to TripCode!

Very good job!!

I extract the key successful from about 50 Phones (non rootet), beginning nearly 2 Years ago.

In the beginning it was very easy, because there was no need of a key. I always decrypt the database with "WhatsApp Xtract" using ActivePython.

Works very well for me. I never used WhatCrypt or something else.

Then, i think it was Crypt 6, you need a pass to decrypt the database. This was no problem, because the pass was the gmail-adress of the phone.

To ride this i found the prog from DFox, called "Whatsapp_DB_Decrypt". Works very well.

Then there comes the Crypt 7/8 and i need a key to decrypt the database. Works very well with the prog vom DFox, because he updated his prog to Crypt7/8.

To get the key, i use the whatsapp key/DB Extractor from TripCode. Works also very well for me.

But then there comes the update from WA to close the ADB-access in their app. I followed the manual in this post, installing a legacy version of WA and it works.

But then there come 2 problems: First, the legacy versions of wa failed to register online, saying that this version is out of date. Second, the problems with the iv.

My knowledge don´t let me extract the iv from the database. That was 2 much for me. But DFox solved this problem with his V4.6 of his prog! It think his prog takes the iv from the database. It works anyway!

But now it´s the problem with the legacy version of WA. I tried the actually version of the script from Tripcode. It doesn´t work for me. The cmd-shell closes and nothing happens. Tried it many times an with different phones.

So i patch the WA-apk to enable the adb-access, using TripCodes ADB-Patch. Tripcode writes that this method is obsolete. But what should i say: It works fine for me (using a patched V2.12.159). I get the key, drop it with the database into the prog of DFox and decrypt the file.

I would be so glad if there would be a "new method" to get the key without problems. The new script here doesn´t work for me. I also tried the offline version, but no success.

I also tried to change some of the codes in the script like some posts recommend in this thread, but no success. Nothing happens.

Anyway, very very thanks to TripCode for his work! Go on!
[Android Apps and Games] jesse_james_:
Hello,

Thanks for the great tools. Unfortunatelly latest version (from github.com/AbinashBishoyi/WhatsApp-Key-DB-Extractor-UnOfficial) does not work at least with my LG G3. This is because when the script installs WhatsApp_Patched.apk it fails with some VOIP permission issue (duplicate permissions) and the script cannot continue successfully anymore.

Any help on this issue? E.g. is it possible to edit the WhatsApp_Patched.apk manifest somehow to remove those failing permissions? I tried it manually but I cannot open manifest for editing (opens as binary content from apk package).
[Android Apps and Games] CatimbaBR:
Guys! It always worked perfectly! Does anyone know how to do that without unlocking the phone?

Actually I have the key extracted from last year. I think that Whatsapp did not change anything, right? So I guess that the key that I already have will work. The thing I need to do is to transfer Whatsapp folder from the phone to my computer (without unlocking). Is there any way to do that?
[Android Apps and Games] frank3009:
Hi, I followed the procedure but there is no msg like "Back up my data". what to do?? where am i going wrong?
[Android Apps and Games] rayman3:
Are you sure you have installed the right adb-drivers and enabled the developer-mode?

What are the msg of the cmd-box/shell? Does the script find your device and install a legacy version of WA?

If no msg appears on your phone-screen, you have no ADB-Access. Check the version of WA in the app (settings/help). There should be a legacy-version of WA, who gives you ADB-Access.

If you fail you can use the ADB-Patch, to patch your version and get ADB-Access. In this case you have to use the older version of the script from TRipCode.

I know about some probs with HTC-Devices and some cheap clone-products.
[Android Apps and Games] Shirowani:
It's not working

"File not found", "Directory is not found".

What could be wrong?
[Android Apps and Games] CharlesII:
Hi to everybody.

Thank you for making this great tool.

I have a Samsung S6, not rooted, with native Whatsapp installation and it is not possible to uninstall it. In addition to that the db.crypt8 files are not visible in the WhatsApp\Databases folder.

I have succesfully extracted the db and the key using your tool but now I would like to update the whatsapp db with a db (encrypted or not) on my pc. How can I force Whatsapp to update its current database with the db on my pc? Is there a method to do it? E.g using "adb restore" function or something else?