[Tool] WhatsApp Key/DB Extractor | CRYPT6-12 | NON-ROOT | UPDATED OCTOBER 2016

Search This thread

Ubtohts

New member
Dec 18, 2020
1
0
The bat file automatically checks for the presence of java.exe on your system. If it's not found then it starts the install. It would appear that for some reason it's not finding Java and hence why you're stuck in this loop. Please find attached a bat file without the Java check. Just put it in the same folder as the original and run this one instead. Let me know how you get on. Java also needs to be callable from the command line. To check this is working you should click on Run... within Windows, type cmd, click OK and type "java -version" (without quotes) and press Enter. This will confirm java is in the command path and print out your JRE build number. I have also updated the release in the OP and removed the Java check, as I have had a couple of similar reports of the loop issue.

Thanks again.


can you update this .bat file its cant find key of whatsapp...
 

ol326

New member
Dec 31, 2020
2
0
The bat file automatically checks that the package: com.whatsapp is installed. If not then it will reply with that message. If the package really is installed then you can easily edit out the package check in the bat file and re-run it. Please be cautious, I have never had a report where it says WhatsApp is not installed when it is. Not unless the package has been renamed to something else (unauthorized clients).

With regards to your other question. You can easily decrypt the message backups providing you have extracted the cipher key. Click the link in my sig and download WhatCrypt for Android. This app is specifically designed for that purpose.

Hey,

I am having the same problem where I get this message: "WhatsApp is not installed on the target device". Whatsapp is installed and I can access the Whatsapp files with the Android File Transfer app (I am on a mac), but I am looking to retrieve the Whatsapp key to decipher the messages. It is a pretty old device (Motorola Moto G 1st Generation XT1033). I am not well-versed with programming, so I did not really understand what you meant with "you can easily edit out the package check in the bat file and re-run it". I would be eternally grateful if you could give me further instructions on how to proceed.

Thanks so much in advance
 

Ronny81

New member
Jan 7, 2021
2
1
Hello at all,
ich have a problem to read out the key from Whatsapp 2.20.108 from xiaomi red note 3. I try and try but it dont work. i put in the password and all run okay but i can read some error so i put the logfile here and hope someone can help me. Thanks so much and have a nice day :)


=========================================================================
= This script will extract the WhatsApp Key file and DB on Android 4.0+ =
= You DO NOT need root for this to work but you DO need Java installed. =
= If your WhatsApp version is greater than 2.11.431 (most likely), then =
= a legacy version will be installed temporarily in order to get backup =
= permissions. You will NOT lose ANY data and your current version will =
= be restored at the end of the extraction process so try not to panic. =
= Script by: TripCode (Greets to all who visit: XDA Developers Forums). =
= Thanks to: dragomerlin for ABE and to Abinash Bishoyi for being cool. =
= ### Version: v4.7 (12/10/2016) ### =
=========================================================================

Please connect your Android device with USB Debugging enabled:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *

WhatsApp 2.20.108 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.20.108
5971 KB/s (27950737 bytes in 4.570s)
Backup complete

Installing legacy WhatsApp 2.11.431
245 KB/s (251 bytes in 0.000s)
pkg: /data/local/tmp/LegacyWhatsApp.apk
Failure [INSTALL_CANCELED_BY_USER]
Install complete

Now unlock your device and confirm the backup operation.

Please enter your backup password (leave blank for none) and press Enter: 12345

bin\tar.exe: Record size = 2 blocks
bin\tar.exe: apps/com.whatsapp/f/key: Not found in archive
bin\tar.exe: Error exit delayed from previous errors
bin\tar.exe: Record size = 2 blocks
bin\tar.exe: apps/com.whatsapp/db/msgstore.db: Not found in archive
bin\tar.exe: Error exit delayed from previous errors
bin\tar.exe: Record size = 2 blocks
bin\tar.exe: apps/com.whatsapp/db/wa.db: Not found in archive
bin\tar.exe: Error exit delayed from previous errors
bin\tar.exe: Record size = 2 blocks
bin\tar.exe: apps/com.whatsapp/db/axolotl.db: Not found in archive
bin\tar.exe: Error exit delayed from previous errors
bin\tar.exe: Record size = 2 blocks
bin\tar.exe: apps/com.whatsapp/db/chatsettings.db: Not found in archive
bin\tar.exe: Error exit delayed from previous errors

Cleaning up temporary files ...

Datei wurde gelöscht - C:\Users\Leitwarte\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab
Datei wurde gelöscht - C:\Users\Leitwarte\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.tar
Datei wurde gelöscht - C:\Users\Leitwarte\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt
Datei wurde gelöscht - C:\Users\Leitwarte\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt
Datei wurde gelöscht - C:\Users\Leitwarte\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt
Datei wurde gelöscht - C:\Users\Leitwarte\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt
Datei wurde gelöscht - C:\Users\Leitwarte\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.20.108
4637 KB/s (27950737 bytes in 5.886s)
pkg: /data/local/tmp/base.apk
Success

Restore complete

Removing WhatsApp 2.20.108 temporary apk
Datei wurde gelöscht - C:\Users\Leitwarte\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\base.apk

Operation complete

Drücken Sie eine beliebige Taste . . .
 

Ronny81

New member
Jan 7, 2021
2
1
I download "WhatsApp-2.11.431.apk" now and put it in "tmp" folder and git it the name "LegacyWhatsApp.apk" is it the right way? Can i run it now again? I realy hope someone can help me here. Thanks so much.
 
  • Like
Reactions: murry9787_

handysmog

New member
Jan 10, 2021
1
1
Which url?

http://whatcrypt.com/WhatsApp-2.11.431.apk is still available!?

Yes http://www.cdn.whatsapp.net/android/2.11.431/WhatsApp.apk is not anymore, but the script proceeds to download the link above then.
Detailed Instructions

Thanks to everybody in this post, I finally made it in life, well, I mean... I managed to de-crypt the WA database as of today (29/02/2020, so it still works yey!!) after just a few hours of "playing" (not a funny game tho).
Because I'm quite bored this morning, I feel the need to give a thorough list of instructions for the newcomers (a kind summary because many have already been given in this post):


First, the "foreplay" steps, if you know what I mean ;) :
  1. Enable "USB Debugging" in your phone
  2. Verify you have the latest version of Java and the Android Debug Bridge Drivers in your PC
  3. Download the .zip from this post
  4. Extract it without changing the overall structure of the folder
  5. Download WA 2.11.431 (like from android-apk.org)
  6. Put it in the tmp folder replacing LegacyWhatsApp.apk

Second, the feel like a hacker from Mr. Robot steps:
  1. Launch WhatsAppKeyDBExtract.bat file
  2. Input Y to reboot the device
  3. Once rebooted, unlock it (you should not find your WA app anymore) and press any key in CW
  4. Wait until the streamed install is done
  5. Unlock again your phone
  6. Prompted "WA has been updated" should be prompted in your phone, press continue
  7. Search for WA in your phone and open it
  8. (A new prompt in your phone will say it's an outdated version of WA press ok, if it doesnt appear don't worry)
  9. Press the adjust date and you will be sent to a Date & Time page, keep it open
  10. Press any key in CW
  11. Select the option you prefer at the command window
  12. Select fullback up in your phone (without entering any password)
  13. Restore WA press any key
  14. You MADE IT as well :highfive:

Finally you should download the Whatsapp Viewer and use it to open the msgstor.db file
I hope it helps and sorry for the bad jokes :p

N.B.: For the Steve Jobs lovers I'm sorry I have a Win PC altough I'm not against a fundraise to buy me one, I would love to replace my potato with an apple :D
WA = Whatsapp
CW = Command Window
FINALLY!!!! THIS UP HERE IS ALL YOU NEED TO HAVE/FOLLOW SO TO BACKUP WhatsApp FILES WITH LAST 2020 ANDROID ON A WINDOWS BASED SYSTEM!!!!!!

  1. Download WhatsApp Key/DB Extractor posted by p4r4d0x86
  2. Download whatsapp-2.11.431.apk file from link posted by lopra (if it doesn't work, just googe that exact version)
  3. Strictly follow instructions written by fabiml

EVERYTHING DID WORK AT FIRST TRY!!!!!

Thank you guys. I really love ya!!! :D

Hello you guys and girls are as awesome as someone can be!!! I just made an account to say this solution is still totaly possible on Android 9 at the 10th January of 2021.
My only problem occured, because my phone was in charge only mode and not in data transfer mode.

Did I tell you you are awesome?
Have a nice day
handysmog(maybe i am just a one time user) :D
 
  • Like
Reactions: Zotho

robined

Member
Jan 13, 2021
5
1
OK On a Xiomi 9T Pro it took me some time but what finally worked for me was

v4.7-E1.0

You need to download WhatsApp-2.11.431.apk and abe-all.jar
Then rename WhatsApp-2.11.431.apk to LegacyWhatsApp.apk and copy it to the tmp/ directory
Rename abe-all.jar to abe.jar and copy it to the bin/ directory

Run the script.

Make sure you enable File transfer mode on the phone after you connect it

Also, I needed to open the old version of WhatsApp before making the backup in the script - fortunately the script waits here for a password! First it wants you to update: don't! I got a phone date is inaccurate error. Just wait on this screen and then continue on with the script. The script goes silent here for quite some time.

The best instructions are to be found here by PIRATA! but miss the above few steps.


Good luck!
 
Jan 11, 2017
14
4
Hey everyone, I have created a similar tool in python which extract database by creating whatsapp.ab using adb. It works. But I am skeptical about making it public on github. I have contacted whatsapp support regarding the same but they are not giving one line answer. Should I make it public? What are possible complication if I do so?
 

bdforbes

New member
Jan 24, 2021
1
1
I can confirm that this method still works as of 2021-01-24 using the latest version of WhatsApp Android on a Pixel 3. However, I had some issues with the whatsapp.ab file being transferred across as a tiny 47 B file, so it clearly wasn't working properly. In the end I manually stepped through the batch file, pasting the most important commands one at a time into a command prompt. The part where the adb backup command is run seems to be the critical part; when I ran that command manually, confirmed the backup on the phone and just waited, it then completed successfully, whereas running it via the batch file and pressing ENTER to use no backup password always caused the issue with the tiny whatsapp.ab file.

Hope that helps someone!

EDIT: Oh and make sure your WhatsApp is backed up to Google Drive before doing this method! I found that I had to clear WhatsApp storage and restore from backup after this, otherwise the app would refuse to open.
 
  • Like
Reactions: aIecxs

shnks

New member
Jan 31, 2021
3
0
I replaced the 2 files, but still can't run it.
I have the problem to downgrade:

Installing legacy WhatsApp 2.11.431
2682 KB/s (18329558 bytes in 6.671s)
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
Install complete

Changing the date of may phone (Galaxy Note 8) didn't help.
Any ideas?
 

RomDafrog

New member
Apr 8, 2019
1
0
I can confirm that this method still works as of 2021-01-24 using the latest version of WhatsApp Android on a Pixel 3. However, I had some issues with the whatsapp.ab file being transferred across as a tiny 47 B file, so it clearly wasn't working properly. In the end I manually stepped through the batch file, pasting the most important commands one at a time into a command prompt. The part where the adb backup command is run seems to be the critical part; when I ran that command manually, confirmed the backup on the phone and just waited, it then completed successfully, whereas running it via the batch file and pressing ENTER to use no backup password always caused the issue with the tiny whatsapp.ab file.

Hope that helps someone!

EDIT: Oh and make sure your WhatsApp is backed up to Google Drive before doing this method! I found that I had to clear WhatsApp storage and restore from backup after this, otherwise the app would refuse to open.

Hi there,
The instructions for PC did not help; and I see that 47b whatsapp.ab file transferred on my Mac.
It did the same when I used only adb backup -f tmp/whatsapp.ab com.whatsapp command.

Is this file the unencrypted key ?
 
Jan 11, 2017
14
4
I can confirm that this method still works as of 2021-01-24 using the latest version of WhatsApp Android on a Pixel 3. However, I had some issues with the whatsapp.ab file being transferred across as a tiny 47 B file, so it clearly wasn't working properly. In the end I manually stepped through the batch file, pasting the most important commands one at a time into a command prompt. The part where the adb backup command is run seems to be the critical part; when I ran that command manually, confirmed the backup on the phone and just waited, it then completed successfully, whereas running it via the batch file and pressing ENTER to use no backup password always caused the issue with the tiny whatsapp.ab file.

Hope that helps someone!

EDIT: Oh and make sure your WhatsApp is backed up to Google Drive before doing this method! I found that I had to clear WhatsApp storage and restore from backup after this, otherwise the app would refuse to open.

I was away for sometime. It's public on github : https://github.com/yuvrajraghuvanshis/WhatsApp-Key-Database-Extractor
However, on some devices issue of 41/46/47/549 bytes backup file still persists and I'm still finding out why. I have tried adb version 1.0.31 with no luck
How did you manage to overcome this issue?
 
Jan 11, 2017
14
4
I replaced the 2 files, but still can't run it.
I have the problem to downgrade:

Installing legacy WhatsApp 2.11.431
2682 KB/s (18329558 bytes in 6.671s)
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
Install complete

Changing the date of may phone (Galaxy Note 8) didn't help.
Any ideas?

This happens because of data structure changes between old and new version or something like that. Quick fix is to allow device to reboot before installing legacy whatsapp. I have added that in my project with `--allow-reboot` flag.
Python:
wa_kdbe.py --allow-reboot
 
  • Like
Reactions: shnks
Jan 11, 2017
14
4
Hi there,
The instructions for PC did not help; and I see that 47b whatsapp.ab file transferred on my Mac.
It did the same when I used only adb backup -f tmp/whatsapp.ab com.whatsapp command.

Is this file the unencrypted key ?
Nope you've been 47byte'd, right now there's no fix that I can think of. However you can try tools like whatsdump
 

MB03

New member
Feb 6, 2021
1
0
Hello!

I have read through this forum, seen the posts where it says some things need to be updated and still feeling very lost!

I would very much like to decrypt some message on my whatsapp however I am VERY green when it comes to these things. I had used whatcrypt and downloaded the key extractor and like many others ran into issues where it would not extract anything. Also, when I look in my phone in whatsapp files I don't see anything called KEY. Could this be a problem also?

Here are some details that I am unsure are relevant:

-phone is a S10 plus
-using Windows 10
-javw updated and downloaded Java
-in my extractor file I don't have any file that ends in bat, however I can still run the correct one. But it doesn't work and has errors saying it couldn't get the key.

Now I'm not horrible with technology. Maybe someone will feel kind enough to provide a quite detailed step by step on what will work for me. In lamens terms? I just want to make this work!

Eternally grateful.
 

shnks

New member
Jan 31, 2021
3
0
This happens because of data structure changes between old and new version or something like that. Quick fix is to allow device to reboot before installing legacy whatsapp. I have added that in my project with `--allow-reboot` flag.
Python:
wa_kdbe.py --allow-reboot
Thanks for your help! Where did you add this? Did you change the code or did u use it as a command using python?
 

ol326

New member
Dec 31, 2020
2
0
Hey,

I am having the same problem where I get this message: "WhatsApp is not installed on the target device". Whatsapp is installed and I can access the Whatsapp files with the Android File Transfer app (I am on a mac), but I am looking to retrieve the Whatsapp key to decipher the messages. It is a pretty old device (Motorola Moto G 1st Generation XT1033). I am not well-versed with programming, so I did not really understand what you meant with "you can easily edit out the package check in the bat file and re-run it". I would be eternally grateful if you could give me further instructions on how to proceed.

Thanks so much in advance

Hey guys,

I would like to update you on my progress. In my special case, I had installed Whatsapp with SIM card number 1, used it for a while, and then took out the SIM card and inserted a new one, SIM card number 2. For whatever reason, Whatsapp kept working but with the old number, that of SIM card number 1. I actually wanted to do a back up using a back up application from the internet, but when I connected the phone to my computer and ran the application it deleted Whatsapp. This is, I was told, because the application installs a different version of Whatsapp on the phone. But I suppose it could not reinstall it and connect it to the previous Whatsapp account because I have a different SIM card in the phone. So Whatsapp disappeared from my phone, and when I restarted it it appeared again, but it showed the screen where it asks you to register with a new number. This is probably why it showed the error that Whatsapp is not installed on this phone.

When I access the phone with Android File Transfer on mac, it shows me that the encrypted message databases are still saved on the phone. Which leads me to believe that the previous Whatsapp key is also still saved on the phone.

Because of these complications, I believe that my only option now is to make a back up of the phone and then put that back up on a rooted phone, from which I can access the Whatsapp key. But I am not sure if the Whatsapp key will be saved when I do a back up – Does anyone know if that is the case? If someone could assist me in this process I'd be happy to pay a fair price for it.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    The key extractor works well if you put 2 "pause" commands into "WhatsAppKeyDBExtract.bat":
    1) After "Removal complete". At this pause you need to reboot your smartphone to avoid Android error about downgrade during an old WhatsApp version installation.
    2) After "Install complete". At this pause you need to run WhatsApp on your smartphone. The run will fail but this makes possible WhatsApp backup creation on further steps of "WhatsAppKeyDBExtract.bat".
  • 47
    ** Version 4.7 Updated October 2016 - Supports Android 4.0-7.0 **

    SUMMARY:
    Allows WhatsApp users to extract their cipher key and databases on non-rooted Android devices.
    UPDATE: This tool was last updated on October 12th 2016. and confirmed working on Android 4.0-7.0 using WhatsApp version v2.16.304 (latest available).
    IMPORTANT: If you wish to extract media files or WhatsApp databases from Google Drive backups then you need: WhatsApp Google Drive Extractor instead.

    TUTORIAL:

    BRANCH UPDATES:
    v4.0 - Fixed issues with Android API 14-17 (4.0-4.2 Jelly Bean).
    v4.1 - Added support for Android API 23 (6.0-6.0.1 Marshmallow).
    v4.2 - Added support for specifying adb backup passwords.
    v4.3 - Added PowerShell version as optional alternative to bat version.
    v4.4 - Changed primary mirror for legacy apk.
    v4.5 - Fixed issue pushing cipher key to emulated storage.
    v4.6 - Updated primary mirror for legacy apk (again).
    v4.7 - Added new sanity checks and support for Android API 24 (7.0 Nougat).

    PREREQUISITES:

    1. O/S: Windows Vista, Windows 7, Windows 8, Windows 10, Mac OS X or Linux
    2. Java - If not installed: Download Java
    3. ADB (Android Debug Bridge) Drivers
    4. USB Debugging* must be enabled on the target device. Settings -> Developer Options -> (Debugging) USB debugging
    5. Android device with Android 4.0 or higher. I.E. Ice Cream Sandwich, Jelly Bean, KitKat, Lollipop, Marshmallow or Nougat.
    *= If you cannot find Developer Options then please go to: Settings -> About phone/device and tap the Build number multiple times.

    INSTRUCTIONS:

    1. Extract WhatsApp-Key-DB-Extractor-master.zip maintaining the directory structure.
    2. Click on WhatsAppKeyDBExtract.bat (Windows) or WhatsAppKeyDBExtract.sh (Mac OS X / Linux).
    3. Connect your device via USB, unlock your screen and wait for Full backup to appear.
    4. Enter your backup password or leave blank (if none set) and tap on Back up my data.
    5. Confirm backup password in your command console and then check the "extracted" folder.

    TROUBLESHOOTING:

    1. If you have never used USB Debugging before, you may also need to verify the fingerprint.
    2. If you have set a default backup password in your Android settings, then this MUST be the
      backup password that you provide when prompted to backup your data. Else it WILL fail!
    3. Linux and Mac OS X users may need to set the script permissions as executable. Depending on the
      adb permissions, you may also need to sudo ./WhatsAppKeyDBExtract.sh from your command console.
    4. If you're having issues with WhatsAppKeyDBExtract.bat then right click WhatsAppKeyDBExtract.ps1
      and select Run with PowerShell. You may have to enter "y" at first run for script execution policy.
    5. If you get an error saying "AES encryption not allowed" then you need to update your Oracle Java
      Cryptography Extension (JCE) to Unlimited Strength Jurisdiction Policy Files.

    DOWNLOAD: WhatsApp-Key-DB-Extractor-master.zip


    AUTHOR: TripCode
    THANKS: dragomerlin for Android Backup Extractor and Abinash Bishoyi for being cool.
    3
    I will try this evening/night (ADT - Atlantic Daylight Time / ADST Atlantic Daylight Saving Time ... or currently UTC-3) :p

    Here it is:
    https://github.com/p4r4d0x86/WhatsApp-Key-DB-Extractor/archive/v4.7-E1.0.zip

    And the new UNTESTED merjapp.jar is here:
    https://github.com/p4r4d0x86/merjapp/releases/download/v190508/merjapp.jar
    2
    Yes, this is a normal backup method. There are automatic tools that do the same without using PC, just on device side.

    Apart from normal ADB method, you could use ECLIPSE for that, using the memory module, you could transfer files from and in.

    If you have physical access to the device, there are many solutions.

    regards.

    The only way to access private application files (such as a WhatsApp's cipher key) without root is the ADB method. You can backup some files on the device without a PC (APK's etc...), but there is currently no way to access private files and folders. All the "My Big Fat Backup" style apps and tools will either require root or ADB. Eclipse also utilizes ADB. Basically, device side backups of application data require root. There are no other alternatives to this. If there was, then Android would be too infeasible and insecure as a viable operating system. Physical access translates into only two solutions. 1.) The ability to root and 2.) The ability to utilize ADB (Eclipse, Bats, Exe's doing nothing more than calling a simple command line). Of course if you are aware of a 3rd method (disregarding the user interface) and is not based on root or ADB then please feel free to share. :)
    2
    Just extracted WhatsApp data from:
    - Lenovo P2 under Android 7.0
    - Galaxy S8 under Android 9.0

    I spent 4 hours on the script to apply fixes and improve it.
    I will "publish" it soon.

    Few tips before publishing (they will be in the script):
    - If you get an error during the downgrade, reboot your phone before installing the downgrade
    - I kept the "adb backup" command but before executing it, you have to LAUNCH the downgraded application! (Tested multiple times, without this launch, the backup was empty or corrupted)
    - Update "adb.exe" (and libs) and "abe.jar" (thanks @progman321 for the tips)
    2
    The key extractor works well if you put 2 "pause" commands into "WhatsAppKeyDBExtract.bat":
    1) After "Removal complete". At this pause you need to reboot your smartphone to avoid Android error about downgrade during an old WhatsApp version installation.
    2) After "Install complete". At this pause you need to run WhatsApp on your smartphone. The run will fail but this makes possible WhatsApp backup creation on further steps of "WhatsAppKeyDBExtract.bat".