• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

vakanal

New member
Oct 4, 2021
2
0
From far as I know, part 3 MUST be STRICKTLY followed.
I my self was unable to succede, so I went back again restoring my previous WhatsApp and syncing with Google Drive, and then did all over again but following it to the letter!!!
It is the only way it would work for sure.
Try looking at what you do and follow it even if some points look strange..
Good luck!
It gave me an error and it didnt restore the previous wa. Now the program says there is no wa installed.

How do I restore the wa installation? The databases are still in the phone but dont know if the key is.
 

PIRATA!

Senior Member
Dec 6, 2010
2,719
176
It gave me an error and it didnt restore the previous wa. Now the program says there is no wa installed.

How do I restore the wa installation? The databases are still in the phone but dont know if the key is.
If you have a Whatsapp forlder located exactly where it was originally, installing Whatsapp from PlayStore will ask you if you want to restore previous backup that it recognized present into the device.

If you have not deleted any file from that folder, you should have everything there.

It is a good idea to backup on your computer the full Whatsapp folder before making any of these things, so always have a full copy of that folder, even more than one on different supports (hard-disk, pen drive, other computer..)
I had 3 backups of that folder kept a part before even trying doing this.
 

civiclowprofile2

New member
Nov 28, 2021
2
0
Giving the following error, what should i check? Cheers


=========================================================================
= 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.21.22.26 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.21.22.26
4851 KB/s (37885620 bytes in 7.625s)
Backup complete

Removing WhatsApp 2.21.22.26 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
5383 KB/s (18329558 bytes in 3.324s)
Success
Install complete

Now unlock your device and confirm the backup operation.

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

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)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to process version 5
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:420)
at org.nick.abe.Main.main(Main.java:128)
... 5 more
Caused by: java.lang.IllegalArgumentException: Don't know how to process version 5
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:282)
... 6 more
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now

Cleaning up temporary files ...

Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.21.22.26
4338 KB/s (37885620 bytes in 8.528s)
Success

Restore complete

Removing WhatsApp 2.21.22.26 temporary apk
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\base.apk

Operation complete

Press any key to continue . . .
 

civiclowprofile2

New member
Nov 28, 2021
2
0
Giving the following error, what should i check? Cheers


=========================================================================
= 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.21.22.26 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.21.22.26
4851 KB/s (37885620 bytes in 7.625s)
Backup complete

Removing WhatsApp 2.21.22.26 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
5383 KB/s (18329558 bytes in 3.324s)
Success
Install complete

Now unlock your device and confirm the backup operation.

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

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)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to process version 5
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:420)
at org.nick.abe.Main.main(Main.java:128)
... 5 more
Caused by: java.lang.IllegalArgumentException: Don't know how to process version 5
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:282)
... 6 more
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now
bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
bin\tar.exe: Error is not recoverable: exiting now

Cleaning up temporary files ...

Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.21.22.26
4338 KB/s (37885620 bytes in 8.528s)
Success

Restore complete

Removing WhatsApp 2.21.22.26 temporary apk
Deleted file - C:\WhatsApp-Key-DB-Extractor-master\tmp\base.apk

Operation complete

Press any key to continue . . .
also after this process, the whatsapp app would crash & cannot open.
Have to uninstall & remove all data, restore back from cloud for hours. Not sure why it refuse to take local backup copy...
 

Diamond3z

New member
Dec 4, 2021
1
0
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

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!
Many thanks guys and everybody who has worked on this!

Any quick tip on how to merge two databases and import the resulting file back into WhatsApp?
 

PIRATA!

Senior Member
Dec 6, 2010
2,719
176
Many thanks guys and everybody who has worked on this!
)
Any quick tip on how to merge two databases and import the resulting file back into WhatsApp?
Thank you!

Well, what you ask it's a bit tricky..
Don't know about merging databases, but the importing works anytime, just need a good working database.
 

drasterlx

Senior Member
May 22, 2005
148
3
Hello

I installed whatsapp 2.11.431 in phone with android 8.1(lg g4) made a backup with helium and adb ... after that reinstalled latest version.. everything ok... continue working as usual.
To clone whatsapp without verification... moved the backup to a phone with android 4.0.4... installed whatsapp 2.11.431 with helium restore the backup... reinstaled latest whatsapp and works really good... both phone with same whatsapp..
Yesterday made same steps in a phone with android 10(samsung a6)... but then of install latest whatsapp .. it requested phone verification.... but the other 2 phones continue working ok..

Made similar test with other whatsapp number in same android 10... backup ... restore in android 4.0.4 and work well...

Any one made similar test? why a backup from android 8.1 dont work in android 10 but yes in 4.0.4...

I am really lost... i want to move my whastapp to the android 10 phone.. i cant do the verification because i am out of my country and the line dont have signal :S

Android 8.1 rooted
Android 10 no rooted
Android 4.0.4 no rooted

Any help?

Thanks
 
Last edited:

Maarten85

New member
Jan 4, 2022
1
0
Hi

Could this be done without USB (e.g., network connection, BT, ...)? My smartphone doesn't connect to USB anymore (bad contact, I've been using a wireless charger since).

Thanks
 

simonjanr

New member
Jan 21, 2022
1
0
Hello everyone,

I'm new here on the forum. I followed the instructions as per here: https://forum.xda-developers.com/t/...ot-updated-october-2016.2770982/post-86047015

NEW EDIT: Huray! It seemed to work without verifying my mobile number on installing legacy Whatsapp so I gof the messages decripted.

Can I just disable and force stop the legacy whatsap momentarily while I substitute its database with an older db version in its db folder in order to decrypt that and merge it with the tools mentioned in the link below? Or is the process more complicated?

(https://forum.xda-developers.com/t/...ackup-file-into-one-no-root-required.3142974/
 
Last edited:

Gykonik

Member
Nov 19, 2016
29
0
I made a backup using the tutorial and everything worked, however the restoring of the original Whatsapp didn't work (and the tmp file is empty). So I now have the decrypted files (like msgstore.db), but not msgstore.db.crypt12 and thus whatsapp can't find / restore the database. Is there any way of "converting back" the msgstore.db into a crypt12 file? I don't want to lose the chats of the past 7 years :( Please help me!
 
Jan 11, 2017
17
6
I made a backup using the tutorial and everything worked, however the restoring of the original Whatsapp didn't work (and the tmp file is empty). So I now have the decrypted files (like msgstore.db), but not msgstore.db.crypt12 and thus whatsapp can't find / restore the database. Is there any way of "converting back" the msgstore.db into a crypt12 file? I don't want to lose the chats of the past 7 years :( Please help me!
Those files should be in your sdcard (internal directory) as is. If your version of whatsapp used the path "/sdcard/WhatsApp/Databases" that crypt12 must be there however if that used the path "/sdcard/Android/media/com.whatsapp/WhatsApp/Databases" then those crypt12 might very well be deleted I'm afraid.

I could not find any tool that encrypts back the database however many are there which decrypts. If you can reverse engineer those tools then you can encrypt that back. Here are some:

 
  • Like
Reactions: simonjanr

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I made a backup using the tutorial and everything worked, however the restoring of the original Whatsapp didn't work (and the tmp file is empty). So I now have the decrypted files (like msgstore.db), but not msgstore.db.crypt12 and thus whatsapp can't find / restore the database. Is there any way of "converting back" the msgstore.db into a crypt12 file? I don't want to lose the chats of the past 7 years :( Please help me!
    Those files should be in your sdcard (internal directory) as is. If your version of whatsapp used the path "/sdcard/WhatsApp/Databases" that crypt12 must be there however if that used the path "/sdcard/Android/media/com.whatsapp/WhatsApp/Databases" then those crypt12 might very well be deleted I'm afraid.

    I could not find any tool that encrypts back the database however many are there which decrypts. If you can reverse engineer those tools then you can encrypt that back. Here are some:

  • 48
    ** 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
    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)