yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] juancarlos123:
error

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: Tamaño de registro = 2 bloques

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: apps / com.whatsapp / f / key: No se encuentra en el archivo

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: Error en la salida retrasada de errores anteriores

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe : Tamaño de registro = 2 bloques

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: apps / com.whatsapp / db / msgstore.db: No se encuentra en el archivo

D: \ WhatsApp-Key-DB- Extractor-master \ bin \ tar.exe: Salida de error retrasada de errores anteriores

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: Tamaño de registro = 2 bloques

D: \ WhatsApp-Key-DB-Extractor -master \ bin \ tar.exe: apps / com.whatsapp / db / wa.db: no se encuentra en el archivo

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: Salida de error retrasada de errores anteriores

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: Tamaño de registro = 2 bloques

D : \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: apps / com.whatsapp / db / axolotl.db: No se encuentra en el archivo

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar .exe: Salida de error retrasada de errores anteriores

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: Tamaño de registro = 2 bloques

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar. exe: apps / com.whatsapp / db / chatsettings.db: No se encuentra en el archivo

D: \ WhatsApp-Key-DB-Extractor-master \ bin \ tar.exe: Salida de error retrasada de errores anteriores

Limpiando archivos temporales ...

Hecho

Restaurando WhatsApp 2.16.133

2850 KB / s (25001462 bytes en 8.564s)

pkg: /data/local/tmp/base.apk

Exito

Restauración completa

Eliminación de WhatsApp 2.16.133 apk temporal

Operación finalizada

Presione cualquier tecla para continuar.
[Android Apps and Games] p4r4d0x86:
Tu copia de seguridad está vacía / Your backup is empty (or incomplete)

Did you start/launch the downgraded application before starting the backup? ("my" updated batch script is asking normally)
[Android Apps and Games] jult:
Just an FYI, this no longer works. The latest WhatsApp and Android 7+ versions don't allow you to run the legacy WA, so there's not going to be a backup of the "key" to download.

The only way to get it, is to have your device rooted.

I'm frankly stunned that after such long time WhatsApp still doesn't offer a simple toolset to merge and restore old databases and keys, so that people can store backups of their entire chat history in HTML format etc.

Yes, there are numerous third party tools, one even less reliable and insecure than the next, it's a disaster.

So strange how these WA developers, with an income in the millions $US per year, seem too lazy to provide export/merge options for old dated crypt* files. How hard can that be? It's *their* code, for crying out loud. You just build an app next to WA that allows you to open and export *.crypt12 files from the same device where the valid key is under /data/* and you make sure it's by the same dev team, so WhatsApp Inc. so everybody can trust it. But nooooo, the world has to jump through mountains of adb and java (of all) hoops to get there.
[Android Apps and Games] alecxs:
Please enter your backup password (leave blank for none) and press Enter: 000
[Android Apps and Games] jult:
This is only the exchange passwd allowing it to transfer on both ends (device and PC). It needs at least 3 characters, hence the 3 zeros.
[Android Apps and Games] alecxs:
abe.jar failes to decrypt after successfully pulled whatsapp.ab - why do you encrypt your backup? you should leave it blank on both sides to disable encryption
[Android Apps and Games] jult:
You're completely missing what this is about. It doesn't encrypt or decrypt, it *requires* a passwd in order to do the transfer.

And by the way, it didn't successfully pull whatsapp.ab, it was empty because WA legacy never ran.
[Android Apps and Games] alecxs:
1) read the OP. you can leave it blank.

2) read your log. Size of tmp\whatsapp.ab is 29626805 bytes

3) if you enter a password, your .ab file will be encrypted. it can decrypted with abe.jar when java is installed correctly. if you leave it blank, your .ab file will not encrypted, instead it is just a tarball archive which can be unpacked from tar
[Android Apps and Games] p4r4d0x86:
Just not true. Let me be more precise ;):

Just uninstall your version, reboot your phone and install old version with "my" latest .bat / batch version.

If you don't reboot, it won't work (It's like there is a protection which stays in memory ; like android keeping in mind the version number of the more recent application)
[Android Apps and Games] araytb:
Thank you for doing this. After a lot of trial-and-error, I got this to work for me on Samsung S10 (Android 9 Pie), Pixel 3 (Android 9 Pie), and a couple android emulators. :)
[Android Apps and Games] alecxs:
Do you mean...

... because when uninstall from settings it deletes all data

guess this is the dalvik-cache (re-created from apk on next boot)
[Android Apps and Games] p4r4d0x86:
Exactly

The "-k" option uninstalls the application while retaining the data/cache.

Indeed, it could be that since we use the "-k" option

And something changed since android 7+, like a new version check from davlik-cache (?)
[Android Apps and Games] evilhedrox:
Hi, I have oneplus 3t and set a second parallel whatsapp, can I use this script to obtain the key for the second whatsapp?
[Android Apps and Games] aboanas.at:
whatsapp is deleted !!!!!!!!

oh noooooooooooooooooo :( :( :(

my whatsapp is deleted from my phone when i run this tool

please please help me to restore it :(:(:(:(:(
[Android Apps and Games] bozolino:
I have android 9, moto G6 plus and could not get this to work. Any help?

------------
Please connect your Android device with USB Debugging enabled:

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

WhatsApp 2.19.175 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.19.175
3507 KB/s (25883340 bytes in 7.207s)
Backup complete

Removing WhatsApp 2.19.175 skipping data
Success
Removal complete

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

Now unlock your device and confirm the backup operation.

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

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:\Users\Renato\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab
Deleted file - C:\Users\Renato\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt
Deleted file - C:\Users\Renato\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt
Deleted file - C:\Users\Renato\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt
Deleted file - C:\Users\Renato\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt
Deleted file - C:\Users\Renato\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.19.175
3246 KB/s (25883340 bytes in 7.786s)
Success

Restore complete

Removing WhatsApp 2.19.175 temporary apk
Deleted file - C:\Users\Renato\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\base.apk

Operation complete

Press any key to continue . . .
[Android Apps and Games] nutwision:
It worked

It works.

But you have to follow ALL the instructions you will get on your PC and on your cellphone.

Also I recommend to do a Backup of files and Google Drive before you do nothing.

Then the only step my cellphone denied me was the unistallation of old version of WhatsApp but it is no problem because you say to Google Play to update it without problems. Then you should say to Whatsapp to recover your chats and media and there it is!!

Thank you for this important update

nutwision:good::o
[Android Apps and Games] LOGZERA:
whatsapp bussines

What is the method or tool for decrypt whatsapp businnes?

I tried with WhatsApp-Key-DB-Extractor but doesn`t work for whatsapp businnes
[Android Apps and Games] adolfosi:
hey..

after i put the password.. ive got this

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

Arquivo excluído - C:\Users\Adolfo\Desktop\DB Browser for SQLite\velho\novo\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab

Arquivo excluído - C:\Users\Adolfo\Desktop\DB Browser for SQLite\velho\novo\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt

Arquivo excluído - C:\Users\Adolfo\Desktop\DB Browser for SQLite\velho\novo\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt

Arquivo excluído - C:\Users\Adolfo\Desktop\DB Browser for SQLite\velho\novo\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt

Arquivo excluído - C:\Users\Adolfo\Desktop\DB Browser for SQLite\velho\novo\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt

Arquivo excluído - C:\Users\Adolfo\Desktop\DB Browser for SQLite\velho\novo\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.19.188

3472 KB/s (25392412 bytes in 7.140s)

Success

Restore complete

Removing WhatsApp 2.19.188 temporary apk

Arquivo excluído - C:\Users\Adolfo\Desktop\DB Browser for SQLite\velho\novo\WhatsApp-Key-DB-Extractor-master\tmp\base.apk

Operation complete

Pressione qualquer tecla para continuar. . .
[Android Apps and Games] bestefreund:
Is it still possible to carry out this procedure on a Nexus 5 with Android 6.0.1? I tried the steps listed, but installing legacy WhatsApp fails with the message Failure [INSTALL_FAILED_INVALID_APK]. Subsequently, none of the files it attempts to recover are found, so I don't get a key in the 'extracted' folder. Should it still be possible to retrieve it?
[Android Apps and Games] writhetech:
Ooof, it has taken many days of editing and installing a variety of software, but I have finally had success de-crypting one of my whatsapp databases.

I am running Mac OS 101.10.5, taking the databases from an old Samsung S4 mini. It doesn't work with my Sampsung S7, it won't install the old version of whatsapp. I haven't tried running it yet on the S7 without running the install-old-version-of-whatsapp bit. I'll try that later.

I am using the latest WhatsAppKeyDBExtract.sh with a few edits as I have had to write in the full path names for where the ADB command is, and for where all the files are. That was a lot quicker than working out how to set the PATH properly, which I still haven't done.

I had to upgrade my version of JAVA from version 6 to version 8, the last that supports Mac 10.10. Then I had to reset the new home directory for the new java version. That got rid of the JAVA errors.

I was then having the problem where ADB was downloading an empty database file. Following the links on here a few pages back, I downloaded version 20 of the platform tools for Mac (I had originally installed the latest version 29) and replaced my version of platform tools with an older version.

And thankfully it now works and I now have an extracted database to play with.

Many thanks everyone who has helped posting suggestions and tips. You've all helped me little by little get to where I needed to be.

Thank you.

Rob
[Android Apps and Games] hajrach16:
i have tried it but when i go and look intot the extractor folder there is nothing in there
[Android Apps and Games] arpcpro:
I've read that it works but it keeps failing on my android 7.1. I've manually installed whatsapp 2.11.431 because the tool failed to install. But now I cannot open whatsapp because it says that the date/time is incorrect. Anyway I still do not get any files on the extracted folder:
[Android Apps and Games] arpcpro:
Where is that option exactly? Is it possible then to use merjapp.jar directly?
[Android Apps and Games] liza10o:
nothing is found in my extracted file except placeholder file
[Android Apps and Games] petrovicveljko:
Urgent update

Is there any chance to receive an update for Android 9 Pie (API 28) and Android 10 (API 29) support?

Thank you in advance and best regards.
[Android Apps and Games] Albert83BCN:
First of all thank your for the great work and thanks to the community being so helpful.

I've been reading the whole thread and based on the users feedback it seems that this can be time consuming if something goes wrong, so before trying I'd like to make sure... can this be used to restore Whatsapp chats from one phone to a different one? I've been looking for the whole thread but I could not find an answer to this.

My use case scenario is: I've upgraded from Moto G5 plus to Moto One Zoom (both non-rooted) and I've been trying for many days to restore the chat history via the GDrive backup feature and also copy/pasting local backup from one phone to the other and trying to reactivate but not matter what, the restore process always gets stuck either at 24% or 31% or 39%, plus the security measures to not try again until many hours, this has been desperating.

I did a search to restore the Whatsapp via ADB as I remember a few years ago I did with other apps and then the search got me here. This method seems to have potential but since it relies on the encryption key stuff I suspect It might only work to restore to the same device :S

Any help would be very much appreciated ^^
[Android Apps and Games] alecxs:
the new whatsapp does not support adb backup but this script is trying to install older version without deleting chats. once you get managed to get the backup.ab it should be no problem to restore to any other device, just use the apk from downloads
[Android Apps and Games] alecxs:
i don't use Whatsapp but afaik if you see the registration dialog, the data was deleted. may have something todo with apk is not included in whatsapp.ab so maybe repeat the adb backup with parameter -apk will work. on target phone set the time back to old date and enable airplane mode, then chats should be readable directly after restoring without any warning or registration dialog
[Android Apps and Games] Albert83BCN:
Hey, just coming back to report, I finally did not have success with this method. Restoring the backup via ADB on the new phone from the legacy WhatsApp would not work in my case. I tried restoring the data with the legacy WA already installed, being uninstalled, apk along the the ADB data backup, restoring the data from the legacy WA over the new WA already installed, etc. Based on the app settings storage report seems like the data never made it there when the adb restore ended. I feel like being stuck at the wrong date error screen due to old API was at the culprit althoug I don't really know, but I could not restore it. Conversely, poutting the unencrypted DB into the sd card and trying to restore from there with the current WA version seems like it would not work as well, some folks reporting that the new WA won't restore unencrypted DBs, just take their word for it.

There were still some attempts I did not make, like activating the new whatsapp first and then shutting down and trying restoring only the data, maybe this would have make it, but In the end I got back to square one and tried the restore the regular way and after a few attempts I finally succeeded so I can already forget about this. I described the steps here just in case anyone is struggling with the restore process although I feel like in the end it was more of a luck thing that any special step in the process. Thanks anyway for the help! really appreciated.
[Android Apps and Games] geaitani:
Hi,

When the "WhatsAppKeyDBExtract" process beings, I receive the following error, can you please help:

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
[Android Apps and Games] Cutswrd:
Hi, this tool is working fine for me, I have just tested it now but there is one thing I did to get the key and decrypt database you may have to know it:

I tested this tool on Note 4 with 6.0.1 android version but get same error and no thing has been extracted, what I noticed that is because of OS version, it doesn't work on newer versions of android nor 6.0.1 version.

I have LG-D280n mobile which has kernel version 3.4.0+ and 4.4.2 Android version, I installed Whatsapp on it and restored my backup from google drive, when it is finished I tested this tool on it and I get the database and crypt key although the same error has occurred.

Here is my result:

=========================================================================

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

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.19.360

5395 KB/s (27355917 bytes in 4.951s)

Backup complete

Installing legacy WhatsApp 2.11.431

7 KB/s (251 bytes in 0.031s)

pkg: /data/local/tmp/LegacyWhatsApp.apk

Failure [INSTALL_FAILED_INVALID_APK]

Install complete

Now unlock your device and confirm the backup operation.

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

apps/com.whatsapp/f/key

apps/com.whatsapp/db/msgstore.db

apps/com.whatsapp/db/wa.db

apps/com.whatsapp/db/axolotl.db

apps/com.whatsapp/db/chatsettings.db

Extracting whatsapp.cryptkey ...

Extracting msgstore.db ...

Extracting wa.db ...

Extracting axolotl.db ...

Extracting chatsettings.db ...

Pushing cipher key to: /storage/emulated/legacy /WhatsApp/Databases/.nomedia

failed to copy 'tmp\apps\com.whatsapp\f\key' to '/storage/emulated/legacy': Is a directory

Cleaning up temporary files ...

Done

Restoring WhatsApp 2.19.360

2770 KB/s (27355917 bytes in 9.643s)

pkg: /data/local/tmp/com.whatsapp-1.apk

Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]

Restore complete

Removing WhatsApp 2.19.360 temporary apk

Operation complete

Press any key to continue . . .

-------

May be the only solution for now is to use an old phone with Android 4.0+. Hoping this can help you.
[Android Apps and Games] 69monos:
This is February 2020, and I got this working on a Pixel 3 with latest Whatsapp version as of 26 Feb 2020. I needed badly to extract the database for a forensics investigation. I never have done this before. This did not work "out of the box" on my Mac with latest OSx Catalina. Installing the Java was a nightmare.

So I switched to an old PC laptop with Windows (that conveniently had Java installed). The script still did not work either. I narrowed it to the following: when you manage to extract the whatsapp.ab you find that it is a very small file and is almost empty. The reason for this is (I figured out by luck) when the script installs the old version of whatapp, you would need to actually go and try to start it. Since it is expired, it will complain about the time is off. It will show a button to. "Adjust TIme". By pressing it, you actually do the magic. This needs to be done just before the script attempts to extract the back up, otherwise you'll get the dreaded empty file. Then some sort of prompt/pause statement needs to be inserted in the script to prompt the user to do that and then press enter to continue. Next you need to acknowledge the backup from the phone screen. You will need to insert another pause/prompt in the script to let the user know that the whatsapp.ab file needs to be edited with an Hex Editor and tweak the version on the very first few characters of the file (where it says ANDROID BACKUP 5, you need to replace 5 by 4, then save it). Then go back to the window where the script is running and currently paused, press enter and then voila! It will work flawlessly. Next you run Whatsapp Viewer by from Andreas Mausch (google it) and it will extract the database with the extracted key, no issues.... You are golden.

all the Best

Quique/Spain