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

Search This thread

TripCode

Senior Member
Mar 13, 2014
171
162
** 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.
 
Last edited:

droopyar

Senior Member
Jun 3, 2010
170
25
alternatives

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.
 

TripCode

Senior Member
Mar 13, 2014
171
162
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. :)
 

MiaNet

New member
Jun 5, 2014
3
0
Thanks for this tool!
I've just tried to use it, but it installs the java constantly (while java is properly installed on computer as other applications uses it without any problem :( )
By any chance, do you have any idea how to pass that?
Thanks!!
Mia
PS I got JDK installed and still not working :(
 
Last edited:

TripCode

Senior Member
Mar 13, 2014
171
162
I've just tried to use it, but it installs the java constantly (while java is properly installed on computer as other applications uses it without any problem :( )
By any chance, do you have any idea how to pass that?

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.
 

Attachments

  • WhatsAppKeyExtractNoJavaCheck.zip
    832 bytes · Views: 25,713
Last edited:
  • Like
Reactions: MiaNet

mesho_alaa

New member
Jun 5, 2014
1
0
still showing this message attached

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.

Still showing the attached message
 

Attachments

  • Failed.png
    Failed.png
    13.2 KB · Views: 25,833

TripCode

Senior Member
Mar 13, 2014
171
162
Still showing the attached message

This sounds to me like you need to update your PATH Environment variable with the directory in which java is installed.

Open up a DOS window and type: "where java" (without quotes) to determine possible locations.

If it's located in: "C:\Windows\System32" then the following code should suffice:

Code:
set PATH=%PATH%;C:\Windows\System32

If it's located in: "C:\Program Files\Java\jre7\bin" then:

Code:
set PATH=%PATH%;C:\Program Files\Java\jre7\bin

The above needs to be added to the bat script BEFORE Java is called. You can edit the bat script by opening it with Notepad.

Alternatively, you could permanently update the PATH Environment (probably a better method).

To do this you would: Right click on "Computer" or "My Computer", within Windows Explorer, choose "Properties", click on the "Advanced system settings" and/or the "Advanced" tab, then click on the "Environment Variables" button. Select the "PATH" line, click the "Edit" button, and add the relevant directory to the end of any text that exists for PATH, prefixing the java path with a ";" (semicolon) if this line already contains other string paths. If PATH does not exist then you will need to add it. Sorry this paragraph is a little double-dutch (trying to cater for multiple versions of Windows).
 
  • Like
Reactions: xhacker

MiaNet

New member
Jun 5, 2014
3
0
Many thanks! I'll test when home and let you know.
Just to let know, the path command do not fix the prior version with Java check as I first thought this might be the problem.
Thanks!
Mia
 

McGiver93

Senior Member
Nov 15, 2009
407
58
Villarotta
Could even be use with ADB from phone to phone? without using the pc? Or I must install the app on the phone and do it offline?
 

MiaNet

New member
Jun 5, 2014
3
0
I have find my way! Re-installed Java, manually clicked on java.exe stored in Java folder in Program files (or Program files (x86) ) I've clicked on Javacpl as well and enabled all options, not sure if this is necessary though.
I've then rerun the program without Java check (the Java check one is bugging now) and was able to do the back up.
Thanks!!
Best regards,
Melanie
 

Curwens

New member
Jun 7, 2014
1
0
Cannot tap button

Hi! i've done all the previous steps, but when i unlock the phone, to confirm the backup, i cant tap on "back up my data", it doesnt even grey at hover, just like the button wasn't there...
I can choose not to backup, that button works perfectly, and write the password too, i've tried all the screen, but nothing happends, so i can't backup the phone...

Does anyone think how to solve that? Thanks!
 

kharloz_jc

New member
Jun 8, 2014
2
0
Permission denied

Hi, I followed all instructions and I generated this error.

I would appreciate your help.
 

TripCode

Senior Member
Mar 13, 2014
171
162
Hi! i've done all the previous steps, but when i unlock the phone, to confirm the backup, i cant tap on "back up my data", it doesnt even grey at hover, just like the button wasn't there...
I can choose not to backup, that button works perfectly, and write the password too, i've tried all the screen, but nothing happends, so i can't backup the phone...

Does anyone think how to solve that? Thanks!

Try rebooting the device and trying again. If it is still greyed out, the backup feature maybe disabled on the device. Some manufacturers / service providers have specifically disabled usb backups.

Hi, I followed all instructions and I generated this error.

I would appreciate your help.

I, too am showing the same error.

It would appear that the key was extracted, but the "copy" wasn't pushed to the sdcard. KitKat? You don't need a copy of the key on your sdcard unless you want to use a supported app. As the key was extracted successfully, you could attempt to copy it by other means.
 

cardinalaa

New member
Jun 9, 2014
2
0
This sounds to me like you need to update your PATH Environment variable with the directory in which java is installed.

Open up a DOS window and type: "where java" (without quotes) to determine possible locations.

If it's located in: "C:\Windows\System32" then the following code should suffice:

Code:
set PATH=%PATH%;C:\Windows\System32

If it's located in: "C:\Program Files\Java\jre7\bin" then:

Code:
set PATH=%PATH%;C:\Program Files\Java\jre7\bin

The above needs to be added to the bat script BEFORE Java is called. You can edit the bat script by opening it with Notepad.

Alternatively, you could permanently update the PATH Environment (probably a better method).

To do this you would: Right click on "Computer" or "My Computer", within Windows Explorer, choose "Properties", click on the "Advanced system settings" and/or the "Advanced" tab, then click on the "Environment Variables" button. Select the "PATH" line, click the "Edit" button, and add the relevant directory to the end of any text that exists for PATH, prefixing the java path with a ";" (semicolon) if this line already contains other string paths. If PATH does not exist then you will need to add it. Sorry this paragraph is a little double-dutch (trying to cater for multiple versions of Windows).

Hi, I am receiving the "Cannot find the path specified" error. I have tried both changing the script and also the other method, in environment variables. I am curious if this has anything to do with the fact that its an ATT phone (since no one can even root it yet)? No other apps can access my phone, either. I have USB debugging enabled and all prerequisite programs installed. Tried on 2 computers, win7 and win 8.1

I wonder if i it is an error on my part..?
 

kharloz_jc

New member
Jun 8, 2014
2
0
Try rebooting the device and trying again. If it is still greyed out, the backup feature maybe disabled on the device. Some manufacturers / service providers have specifically disabled usb backups.





It would appear that the key was extracted, but the "copy" wasn't pushed to the sdcard. KitKat? You don't need a copy of the key on your sdcard unless you want to use a supported app. As the key was extracted successfully, you could attempt to copy it by other means.


I have reviewed the "Extract" folder and there was the key. I have managed to decrypt it.

Thanks for the help and the tool!

PD: sorry for my bad English, I use translator is haha.
 

PK_000

New member
Jun 11, 2014
1
0
Nothing happens

Hi, first, thanks for this iniciative. A lot of people would apreciate this :)

I think I did everything as u said, but when I open the WhatsAppKeyExtract,bat and then conect my phone in debuggin mode to PC, nothing happens. Ive waited for 10 minutes and.. nothing happens. Keep showing the initial message: "Please connect your Android device..." and in my phone nothing happens too. Just show a messagem at the upper tab saying: "USB debbugin conected".

Theres any kind of setting to do futher in the debbug options?

Thanks

Update: I had do install de universal adb driver for my phone, and now it starts the download, but now im having problem with java... the messagem says "'java' isnt a recognizable command". I tried all solutions in this post and nothing.. I need heeeelp! :)
 
Last edited:

ddlg2007

Member
Oct 18, 2009
8
1
Solution to path problem

Is working perfect. For someone else that can happen the same thing as me. I have to fix something (i am spanish) about:
java is not recognized as an internal or external command, operable program or batch file

Here is the solution:
java .com/en/download/help/path.xml

Or here:
1. Right-Click My Computer and select Properties
2. Then Click The Advanced Tab
3. Then Click Environment Variables
4. Select Path In The Bottom Box and Click Edit
5. Find Where You installed Java (E.g "C:\Program Files\Java\bin)
Its different on each computer
6. Make Sure to add a semicolon after the word bin in the path to seperate it from the other important paths
7. If this doesnt work then you may have to reinstall Java and Try Again

Setting Path on Windows
For Windows XP:

1. Start -> Control Panel -> System -> Advanced
2. Click on Environment Variables, under System Variables, find PATH, and click on it.
3. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
4. Close the window.
5. Reopen Command prompt window, and run your java code.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 49
    ** 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.
    4
    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)


    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.

    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
    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
    3
    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

    This method still works for Oneplus 9pro Android 13, but it has some new twists.

    Latest whatsapp viewer can't decrypt backups or open the conversations as-is due to slight changes to the encryption plus messages format in the sql database.

    Hope you find this helpful.

    To decrypt .14 files, use this instead:

    To open the new database file format after obtaining the files with the extractor, here are the instructions on how to create the needed tables in the SQL database so the viewer can process them:
    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. :)