Code Monkey home page Code Monkey logo

whatsapp-key-db-extractor's People

Contributors

eliteandroidapps avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatsapp-key-db-extractor's Issues

SDK 19 doesn't support runtime permissions

Hello folks,

I am getting a

Performing Streamed Install
adb: failed to install tmp\LegacyWhatsApp.apk: Failure [-26: Package com.whatsapp new target SDK 19 doesn't support runtime permissions but the old target SDK 31 does.]

on WhatsApp-Key-DB-Extractor-master with Android 12 (Realme RMX3393).
Using the WhatsApp Messenger Version 2.11.431 APK file.

Any ideas how to cirumvent that or what else to try?

Failure [INSTALL_FAILED_VERSION_DOWNGRADE]

Hi,

any chance this wonderful utility will work on Huawey P9 plus ?

Please help me! Thank you 1k

Pietro


Please connect your Android device with USB Debugging enabled:

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

Downloading legacy WhatsApp 2.11.431 to local folder

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17.4M 100 17.4M 0 0 5264k 0 0:00:03 0:00:03 --:--:-- 5264k

WhatsApp 2.17.323 installed

Backing up WhatsApp 2.17.323
remote object '/data/app/com.whatsapp-2/base.apk' does not exist
Backup complete

Removing WhatsApp 2.17.323 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
7958 KB/s (18329558 bytes in 2.249s)
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:

Password is set but strong AES encryption is not allowed
Please install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 or 8
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
Exiting.
tar: tmp/whatsapp.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: tmp/whatsapp.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: tmp/whatsapp.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: tmp/whatsapp.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: tmp/whatsapp.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Saving whatsapp.cryptkey ...
cp: cannot stat 'tmp/apps/com.whatsapp/f/key': No such file or directory
Saving msgstore.db ...
cp: cannot stat 'tmp/apps/com.whatsapp/db/msgstore.db': No such file or directory
Saving wa.db ...
cp: cannot stat 'tmp/apps/com.whatsapp/db/wa.db': No such file or directory
Saving axolotl.db ...
cp: cannot stat 'tmp/apps/com.whatsapp/db/axolotl.db': No such file or directory
Saving chatsettings.db ...
cp: cannot stat 'tmp/apps/com.whatsapp/db/chatsettings.db': No such file or directory

Pushing cipher key to: /sdcard/WhatsApp/Databases/.nomedia
cannot stat 'tmp/apps/com.whatsapp/f/key': No such file or directory

Downloading WhatsApp 2.17.323 to local folder

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33428 0 33428 0 0 98360 0 --:--:-- --:--:-- --:--:-- 98317

Restoring WhatsApp 2.17.323
742 KB/s (33428 bytes in 0.043s)
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl843851857.tmp/base.apk: AndroidManifest.xml]
Restore complete

Cleaning up temporary files ...
rm: cannot remove 'tmp/whatsapp.tar': No such file or directory
Done

Operation complete

Please press Enter to quit...

Keep getting error: INSTALL_FAILED_VERSION_DOWNGRADE

Hello,

I want to extract the whatsapp DB on my nonrooted Oneplus 5t (Android 7.1.1 /OxygenOS) to modify it and then restore the backup. But I keep getting the error Install_failed_version_downgrade.
What I tried: Used apktool to extract the current version of Whatsapp and the Legacy version your program downloads. Then I modified the version of the legacy to match the current version (in AndroidManifest.xml). After that I repacked the Legacy APK and signed it with a certificate (otherwise I get the error that no certificates are used to sign the apk). But then I get the error that the certificate doesnt match with the certificate of the original APK.

What can I do?

Android 9.0 not supported.

With my android pie device the terminal can't prompt my phone for debugging.
So basically I can't use extractor for Android 9 :(

Issue to restore whatsapp version

Hello,

After run whatsapp key/db extractor, had this issue:

Restoring WhatsApp 2.17.190
5996 KB/s (30187044 bytes in 4.916s)
pkg: /data/local/tmp/com.whatsapp-1.apk
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]

Restore complete

Now I can't open whatsapp again, how can I fix this step?

Thanks

WhatsApp needs to be installed before running this

One of the important prerequirements is that whatsapp is still installed. I thought I could uninstall the app as it leaves sqlite files behind, but that's not the case...

Without Whatsapp installed you'd be just left with "2.11.431 was unexpected at this time." error or similar, as the script fails when it cannot locate Whatsapp version string.

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

Samsung S8+
8.0.0
SEV: 9.0
Kernel: 4.4.111-xxxxx
Update: 1. Oktober 2018

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

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.18.327
4622 KB/s (23838869 bytes in 5.036s)
Backup complete

Removing WhatsApp 2.18.327 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
5029 KB/s (18329558 bytes in 3.558s)
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: xxxxxxx

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

D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now

Cleaning up temporary files ...
Done

Restoring WhatsApp 2.18.327
5924 KB/s (23838869 bytes in 3.929s)
Success
Restore complete

Removing WhatsApp 2.18.327 temporary apk


Operation complete

Drücken Sie eine beliebige Taste . . .

Error= BadAuthentication

Hey Guys,

I've tried using App Password, tried removing my 2-step verification from gmail, tried using another gmails and also tried executing the script several times.
All the time I end up with: "Error= BadAuthentication"
Tried bypassing it to see if it would crash in another section of the code, and it did at getGoogleDriveToken, as expected.
Apparently google's "android.clients.google.com/auth" has been disabled, but for some reason people in the forum seem to have it working lately, I really don't understand whats the problem.

Can you give me a hand?

No source code for the core

The big work happens inside a .jar file with no corresponding .java file. It'd be very interesting to know how it works.

Getting errors on \bin\tar.exe

Hello there! I am trying to make it work.

Here I paste my log on the command. Hope you can help me!

Edit: When I run the command, it does uninstall my WhatsApp app, so that might be the reason it doesn't find some files. Is it normal? haha

.\WhatsAppKeyDBExtract.bat

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

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.18.105
remote object 'package:=' does not exist
Backup complete

Removing WhatsApp 2.18.105 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
8180 KB/s (18329558 bytes in 2.188s)
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: i

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

Deleted file - D:\Stuff\Descargas Chrome\platform-tools\tmp\whatsapp.ab
Deleted file - D:\Stuff\Descargas Chrome\platform-tools\tmp\whatsapp.tar
Deleted file - D:\Stuff\Descargas Chrome\platform-tools\tmp\waplen.txt
Deleted file - D:\Stuff\Descargas Chrome\platform-tools\tmp\sdpath.txt
Deleted file - D:\Stuff\Descargas Chrome\platform-tools\tmp\wapath.txt
Deleted file - D:\Stuff\Descargas Chrome\platform-tools\tmp\wapver.txt
Deleted file - D:\Stuff\Descargas Chrome\platform-tools\tmp\sdkver.txt

Done

Downloading WhatsApp 2.18.105 to local folder
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33259 0 33259 0 0 57541 0 --:--:-- --:--:-- --:--:-- 57541

Operation complete

Press any key to continue . . .

Not extracting with mac / Android 4

Hello, there! I have a problem backing up my WhatsApp on my MacBook. I have a Android 4 device. It is working with a windows PC, I can perfectly run the Backup Process there, but on my Macbook this occurs:

Last login: Tue May 21 17:19:30 on ttys000
isso:~ patrickl$ /Users/patrickl/Downloads/WhatsApp-Key-DB-Extractor-master-2/WhatsAppKeyDBExtract.sh

=========================================================================
= 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:

cannot connect to daemon at tcp:5037: Connection refused

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    /Users/patrickl/Downloads/WhatsApp-Key-DB-Extractor-master-2/WhatsAppKeyDBExtract.sh: line 57: [: -eq: unary operator expected

Downloading legacy WhatsApp 2.11.431 to local folder

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file tmp/LegacyWhatsApp.apk: Not a directory
100 251 100 251 0 0 2668 0 --:--:-- --:--:-- --:--:-- 2670
curl: (23) Failed writing body (0 != 251)

WhatsApp 2.19.128 installed

Backing up WhatsApp 2.19.128
/data/app/com.whatsapp-2.apk: 1 file p...d. 2.7 MB/s (25140140 bytes in 8.979s)
Backup complete

Installing legacy WhatsApp 2.11.431
Performing Push Install
adb: error: cannot stat 'tmp/LegacyWhatsApp.apk': Not a directory
rm failed for -f, No such file or directory
Install complete

adb: backup unable to create file 'tmp/whatsapp.ab': Not a directory
Operation failed

Downloading WhatsApp 2.19.128 to local folder

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file tmp/com.whatsapp-2.apk: Not a directory
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (23) Failed writing body (0 != 7751)

Restoring WhatsApp 2.19.128
Performing Push Install
adb: error: cannot stat 'tmp/com.whatsapp-2.apk': Not a directory
rm failed for -f, No such file or directory
Restore complete

Cleaning up temporary files ...
rm: tmp/whatsapp.ab: Not a directory
rm: tmp/whatsapp.tar: Not a directory
rm: tmp/apps: Not a directory
rm: tmp/com.whatsapp-2.apk: Not a directory
Done

Operation complete

Please press Enter to quit...

Maybe someone could help, would be very grateful!

Date error after using Extractor ("Datum stellen")

Hello,
first let me thank you for the fantastic program.
It worked great, created all the files, but when i tried to restart Whatsapp afterwards it always started, then showed me a screen that my date was incorrect and a push key "Datum stellen" (set time) , which always leads to time settings. As my settings were correct i just confirmed the settings. But whatsapp remained in the state "Datum stellen" . In the topline of the screen there was a triangle with the exclamation mark saying Whatsapp error...
My Whatsapp-Version is 2.16.310 (german)
Android is 4.2
I overcame this problem with reinstalling Whatsapp from backup ....

Need help - Urgent

Hey there. Hope you are doing well. Just stumbled upon one of your github repo on whatsapp . So thought to ask you for your help

Just to tell you how important and urgent is for me restoring my chat because i have many important chats happened in the recent days All with the office work And if I am not able to restore i will be devastated. Being not a tech geek I Really need your support and guidance on this one 🙏

Actually out of nowhere my WhatsApp got crashed . But i knew I had this back on Google drive so i am safe but when i tried uninstalling and reinsgal WhatsApp the drive backup pop up didn't even came up and it just opened with Only the groups i have subscribed to And no chats at all. For a moment i was just shocked And didn't even know what just happened

I have tried every possible methods to restore messages reading online but none of it helped. I am Running android 10 on redmi note 8,

From my understanding reading online and researching about it for days i concluded that i have the corrupt database on google drive. That's why its not able to restore

i do have the local backup files which are named msgstore at separate locations as a backup

when trying both google drive and local backup i am getting these error

https://imgur.com/a/FMglfOD

So please help me guide through this situation. It would mean a world to me🙏

Banned

My private number get banned from someone hates me image

3rd Party Apps Support

Hello,

This is a wonderful app even though that it was not updated for more than 2 years. I tried it on different devices, it worked on most of them.

My question here is that with the public launch of whatsapp API, other apps are coming up, for example, whatsapp plus; is there anyway to extract cipher key from the new app, is there specific locations in the code that could be changed to make it work well?

Appreciate your help.

Regards,

tengo un problema al intarla whatssap 2.11

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

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.17.107
3346 KB/s (35082716 bytes in 10.238s)
Backup complete

Installing legacy WhatsApp 2.11.431
2912 KB/s (18329558 bytes in 6.146s)
pkg: /data/local/tmp/LegacyWhatsApp.apk
Failure [INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.whatsapp.permission.VOIP_C
ALL pkg=com.whatsapp]
Install complete

Now unlock your device and confirm the backup operation.

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

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

Archivo eliminado: C:\Users\HK\Desktop\WhatsApp-Key-DB-Extractor-master\WhatsApp
-Key-DB-Extractor-master\tmp\whatsapp.ab
Archivo eliminado: C:\Users\HK\Desktop\WhatsApp-Key-DB-Extractor-master\WhatsApp
-Key-DB-Extractor-master\tmp\whatsapp.tar
Archivo eliminado: C:\Users\HK\Desktop\WhatsApp-Key-DB-Extractor-master\WhatsApp
-Key-DB-Extractor-master\tmp\waplen.txt
Archivo eliminado: C:\Users\HK\Desktop\WhatsApp-Key-DB-Extractor-master\WhatsApp
-Key-DB-Extractor-master\tmp\sdpath.txt
Archivo eliminado: C:\Users\HK\Desktop\WhatsApp-Key-DB-Extractor-master\WhatsApp
-Key-DB-Extractor-master\tmp\wapath.txt
Archivo eliminado: C:\Users\HK\Desktop\WhatsApp-Key-DB-Extractor-master\WhatsApp
-Key-DB-Extractor-master\tmp\wapver.txt
Archivo eliminado: C:\Users\HK\Desktop\WhatsApp-Key-DB-Extractor-master\WhatsApp
-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.17.107
2502 KB/s (35082716 bytes in 13.687s)
pkg: /data/local/tmp/base.apk
Success

Restore complete

Removing WhatsApp 2.17.107 temporary apk
Archivo eliminado: C:\Users\HK\Desktop\WhatsApp-Key-DB-Extractor-master\WhatsApp
-Key-DB-Extractor-master\tmp\base.apk

Operation # complete****

Getting a lot of permission issues from what I'm seeing

Here is a dump of my output. Seems to be permission issues but I cannot be sure. Anybody can help?

-e Removing WhatsApp 2.18.191 skipping data
Success
-e Removal complete

-e Installing legacy WhatsApp 2.11.431
adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
-e Install complete

Now unlock your device and confirm the backup operation...
-e 
Please enter your backup password (leave blank for none) and press Enter: 

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	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
tar: Error opening archive: Failed to open 'tmp/whatsapp.tar'
tar: Error opening archive: Failed to open 'tmp/whatsapp.tar'
tar: Error opening archive: Failed to open 'tmp/whatsapp.tar'

Whatsapp backup is incomplete

Everything works up to the creating the .tar file.

The contents of the file does not contain the key.db or the msgstore.db files anymore. I tried it with the latest 2.18.46

Failed to parse /data/local/tmp/LegacyWhatsApp.apk

Hi all

I wasn't sure if this tool supports Android 11, but I tried it anyway and got the following error:

Exception occurred while executing 'install':
java.lang.IllegalArgumentException: Error: Failed to parse APK file: /data/local/tmp/LegacyWhatsApp.apk: Failed to parse /data/local/tmp/LegacyWhatsApp.apk

WhatsApp DB Extractor Screenshot 1

Any ideas what causes the error?

error: more than one device and emulator

Hi
Thank you so much for this script. When I try to extract the WhatsApp encryption key by running the .bat file, I got the following error message:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: protocol fault (status read)
error: protocol fault (status read)
error: more than one device and emulator

13 was unexpected at this time.

Here is list of the attached devices:

C:\adb devices -l
List of devices attached
emulator-5554          offline
dc954d2d               device product:jfltexx model:GT_I9505 device:jflte

It seems that I have to specify the device name within the bat file!

Any suggestion please?

Failed to install legacy version

running on a Galaxy S7 with Android 8:

Installing legacy WhatsApp 2.11.431 Failed to install tmp/LegacyWhatsApp.apk: Failure [-26: Package com.whatsapp new target SDK 19 doesn't support runtime permissions but the old target SDK 23 does.] Install complete

Doesn't work under Android 8.0. Any chance to fix?

WhatsApp 2.18.92 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.18.92
2495 KB/s (32461441 bytes in 12.705s)
Backup complete

Removing WhatsApp 2.18.92 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
2782 KB/s (18329558 bytes in 6.432s)
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 ...

Удален файл - E:\Downloads\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab
Удален файл - E:\Downloads\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt
Удален файл - E:\Downloads\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt
Удален файл - E:\Downloads\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt
Удален файл - E:\Downloads\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt
Удален файл - E:\Downloads\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.18.92
3360 KB/s (32461441 bytes in 9.432s)
Success

Restore complete

Removing WhatsApp 2.18.92 temporary apk
Удален файл - E:\Downloads\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\base.apk

Operation complete

File not extracted

My device is rooted, Android 5.1, but I couldn't find key file previously, so I used this script. It gave several errors and key file wasn't extracted.


=========================================================================
= 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 *
adb server is out of date.  killing...
* daemon started successfully *

WhatsApp 2.23.4.79 installed

Downloading legacy WhatsApp 2.11.431 to local folder
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1942  100  1942    0     0   2762      0 --:--:-- --:--:-- --:--:--  2762

adb server is out of date.  killing...
* daemon started successfully *
Backing up WhatsApp 2.23.4.79
Backup complete

Installing legacy WhatsApp 2.11.431
* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
adb server is out of date.  killing...
* daemon started successfully *
Install complete

adb server is out of date.  killing...
* daemon started successfully *
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.NumberFormatException: For input string: ""
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:420)
        at org.nick.abe.Main.main(Main.java:128)
        ... 5 more
Caused by: java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:280)
        ... 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\ABC\Desktop\123\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab
Deleted file - C:\Users\ABC\Desktop\123\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt
Deleted file - C:\Users\ABC\Desktop\123\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt
Deleted file - C:\Users\ABC\Desktop\123\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt
Deleted file - C:\Users\ABC\Desktop\123\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt
Deleted file - C:\Users\ABC\Desktop\123\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.23.4.79
adb server is out of date.  killing...
* daemon started successfully *
4316 KB/s (11075584 bytes in 2.505s)
adb server is out of date.  killing...
* daemon started successfully *
        pkg: /data/local/tmp/base.apk
Failure [INSTALL_FAILED_INVALID_APK]
adb server is out of date.  killing...
* daemon started successfully *

Restore complete

Removing WhatsApp 2.23.4.79 temporary apk
Deleted file - C:\Users\ABC\Desktop\123\WhatsApp-Key-DB-Extractor-master\tmp\base.apk

Operation complete

Press any key to continue . . .

Java Error

I got the following shown in the command line:

Please connect your Android device with USB Debugging enabled:

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

WhatsApp 2.19.188 2.11.1 installed

Downloading legacy WhatsApp 2.11.431 to local folder

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 251 100 251 0 0 148 0 0:00:01 0:00:01 --:--:-- 148

Backing up WhatsApp 2.19.188 2.11.1
5296 KB/s (25670822 bytes in 4.733s)
Backup complete

Removing WhatsApp 2.19.188 2.11.1 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
7 KB/s (251 bytes in 0.031s)
Error: Failed to parse APK file: android.content.pm.PackageParser$PackageParserException: Failed to parse /data/local/tmp/LegacyWhatsApp.apk
Install complete

Now unlock your device and confirm the backup operation.

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

Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
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

C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\XY\Desktop\WhatsApp-Key-DB-Extractor-master\bin\tar.exe: Error is not recoverable: exiting now

Cleaning up temporary files ...
Done

Restoring WhatsApp 2.19.188 2.11.1
4313 KB/s (25670822 bytes in 5.811s)
Success
Restore complete

Removing WhatsApp 2.19.188 2.11.1 temporary apk

Operation complete

Drücken Sie eine beliebige Taste . . .

Can you help?
I have Android 8.0 and Java Version 8 Update 211 installed.

Script works, but database file does not appear

Hi,

I runned your script with 2 differentes phones (Samsung with Android 7, and Wiko with Android 6), in both cases no errors appear (the procedure seems to be successful), but when i go to the extracted folder there isn't any database file, just the placeholder one.
In my Windows 10 PC i have Java updated, I installed ADB Drivers from here and I enabled USB Debugging on my phones.

Any idea?

Thanks

Full Back-up of data

What exactly does this mean, what does it back-up. Like if I run it on the phone what does it do to the phone?
It says a full back up of data will be made but where will this be stored?

image

Failed Installed Whasapp legacy version

When I execute in my old phone with Android 6.0 (LG g3), the scripts works perfectly but when I try to the the same in my new phone with (samsung s6 edge) with android 7.0 installed I face this error:

Failed to install tmp/LegacyWhatsApp.apk: Failure [-26: Package com.whatsapp new target SDK 19 doesn't support runtime permissions but the old target SDK 23 does.]

And the same error when is trying to restore, so I lost my data, but I can recovery from google drive:

Failed to install tmp/base.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl754377382.tmp/base.apk: AndroidManifest.xml]

I read that android 7.0 is supported, so do you know how to deal with this error?

Whatsapp Uninstalled

My whatsapp got uninstalled from my phone and even the backups where not found in the extracted folder

Equivalent script

#!/usr/bin/env bash

export PATH=$PATH:$ANDROID_HOME/platform-tools

PKG_NAME=com.whatsapp
LEGACY_APK_FILE=WhatsApp.legacy.apk
BACKUP_APK_FILE=WhatsApp.backup.apk

info() {
	echo "==> [info] $*"
}

error() {
	echo "==> [error] $*"
	exit 1
}

install_apk() {
	local apk_filepath=$1

	if [ "$SDK_VERSION" -ge 17 ]; then
		adb install -r -d "$apk_filepath"
	else
		adb install -r "$apk_filepath"
	fi
}

uninstall_package() {
	local package=$1

	if [ "$SDK_VERSION" -ge 23 ]; then
		adb shell pm uninstall -k "$package"
	fi
}

stop_package() {
	local package=$1

	if [ "$SDK_VERSION" -ge 11 ]; then
		adb shell am force-stop "$package"
	else
		adb shell am kill "$package"
	fi

}

backup_package() {
	local package=$1

	if [ "$SDK_VERSION" -ge 23 ]; then
		adb backup -f whatsapp.ab "$package"
	else
		adb backup -f whatsapp.ab -noapk "$package"
	fi
}

cleanup() {
	if [ -f "$BACKUP_APK_FILE" ]; then
		install_apk "$BACKUP_APK_FILE"
	fi

	adb kill-server
}

trap cleanup EXIT

set -eu -o pipefail

info "Check for required binaries"

for cmd in adb curl grep java tar tr; do
	command -v $cmd || error "$cmd not available"
done

info "Please connect your Android device with USB Debugging enabled"

adb kill-server
adb start-server
adb wait-for-device

info "Checking script compatibility"

SDK_VERSION=$(adb shell getprop ro.build.version.sdk | tr -d '[:space:]')

if [ "$SDK_VERSION" -le 13 ]; then
	error "Unsupported Android Version - Require 4.0 or higher"
fi

APK_VERSION=$(adb shell dumpsys package com.whatsapp | sed -nE 's/.*versionName=(.*)/\1/p' || true)

if [ -z "$APK_VERSION" ]; then
	error "WhatsApp not installed on device"
fi

APK_PATH=$(adb shell pm path com.whatsapp | sed -nE 's/.*package:(.*)/\1/p')
BACKUP_DIR=$(adb shell "echo -e \$EXTERNAL_STORAGE/WhatsApp/Databases/.nomedia")

if [ ! -f $LEGACY_APK_FILE ]; then
	info "Downloading legacy WhatsApp version"
	curl -o $LEGACY_APK_FILE https://whatcrypt.com/WhatsApp-2.11.431.apk
fi

if [ "$(wc -c <$LEGACY_APK_FILE)" -lt 10000 ]; then
	error "Failed to download legacy WhatsApp apk"
fi

info "Running with configuration"

echo "APK_VERSION = '$APK_VERSION'"
echo "APK_PATH = '$APK_PATH'"
echo "BACKUP_DIR = '$BACKUP_DIR'"

info "Replacing WhatsApp ${APK_VERSION} with Legacy build"

if [ ! -f $BACKUP_APK_FILE ]; then
	info "Downloading installed WhatsApp version"
	adb pull "$APK_PATH" "$BACKUP_APK_FILE"
fi

stop_package $PKG_NAME
uninstall_package "$PKG_NAME"
install_apk $LEGACY_APK_FILE

info "Attempting backup using legacy whatsapp"

backup_package "$PKG_NAME"

info "Restoring WhatsApp"

cleanup

Crypt key from legacy version whatsapp doesn't work on new version database

Hi,
I tested the following unsuccessfully:
I extracted a cypher key from whatsapp version 2.11.431
I copied a local crypted database from whatsapp version 2.18.177
With "WhatsApp Viewer.exe" I tried to decrypt the database.
Unfortunately error: "encryption failed.........invalid key".
This answers the question in README.md: "The only caveat to this is that I don't know whether the WhatsApp key might change as you upgrade"

Receiving Error Installing legacy WhatsApp 2.11.431

Please connect your Android device with USB Debugging enabled:

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    ./WhatsAppKeyDBExtract.sh: line 57: [: -eq: unary operator expected

Found legacy WhatsApp 2.11.431 in local folder

WhatsApp 2.20.206.24 installed

Backing up WhatsApp 2.20.206.24
/data/app/com.whatsapp-owUBh4PC-r9QoLSs48u47Q==/base.apk: 1 file pulled, 0 skipped. 10.4 MB/s (31188619 bytes in 2.849s)
Backup complete

Removing WhatsApp 2.20.206.24 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
Performing Streamed Install
adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl209896515.tmp/base.apk: AndroidManifest.xml]
Install complete

WARNING: adb backup is deprecated and may be removed in a future release
Now unlock your device and confirm the backup operation...

Android 8.0 not supported

Not working with android 8.0.

Error is something like:
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgument
Exception: Don't know how to process version 5
at AndroidBackup.extractAsTar(AndroidBackup.java:232)
at Main.main(Main.java:40)
Caused by: java.lang.IllegalArgumentException: Don't know how to process version
5
at AndroidBackup.extractAsTar(AndroidBackup.java:72)

Decrypt and Crypt

Hello,

It's possible recrypt into crypt12 after modify the sqlite database ?

Fails to install legacy WhatsApp on OnePlus 3T, Android 7.1.1

I successfully retrieved the unencrypted WhatsApp databases from my old phone using the extractor, but I couldn't do the same on my new phone.

The reason why it fails is apparently a problem with installing / downgrading to WhatsApp 2.11.431, which makes all subsequent commands fail (because no WhatsApp is installed on the phone at that point):

failure [INSTALL_FAILED_VERSION_DOWNGRADE]

I also tried to download the legacy apk on the phone and install it there, but it fails as well.

Is there any way to fix this? Or can the legacy version simply not run under Android 7.1.1 anymore? If so, is there any other way to backup the data without rooting the device?

My OS: Windows 10 64bit
Extractor: latest master of today

it didnt work and i lost all my data afterwards

PS C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor> ls

Directory: C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor

Mode LastWriteTime Length Name


d----- 3/10/2024 12:56 AM bin
d----- 3/10/2024 12:56 AM extracted
d----- 3/10/2024 1:02 AM tmp
-a---- 3/10/2024 12:56 AM 43 LICENSE
-a---- 3/10/2024 12:56 AM 1190 LICENSE.Apache-2.0
-a---- 3/10/2024 12:56 AM 1110 LICENSE.CURL
-a---- 3/10/2024 12:56 AM 35815 LICENSE.GPL-3.0
-a---- 3/10/2024 12:56 AM 3571 LICENSE.PCRE2
-a---- 3/10/2024 12:56 AM 3786 README.md
-a---- 3/10/2024 12:56 AM 7549 WhatsAppKeyDBExtract.bat
-a---- 3/10/2024 12:56 AM 7286 WhatsAppKeyDBExtract.ps1
-a---- 3/10/2024 12:56 AM 6331 WhatsAppKeyDBExtract.sh

PS C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor> .\WhatsAppKeyDBExtract.ps1

=========================================================================
= 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: v5.1 (22/02/2022) ### =

Please connect your Android device with USB Debugging enabled:

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

WhatsApp 2.24.4.76 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.24.4.76
7270 KB/s (55145837 bytes in 7.407s)
Backup complete

Removing WhatsApp 2.24.4.76 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
6069 KB/s (18329558 bytes in 2.949s)
Success
Install complete! Open Whatsapp, allow the permissions request, if any. Then, press Enter to continue.

Now unlock your device and confirm the backup operation.

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

0% 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 23% 24% 25% 26% 27% 28% 29% 30% 31% 32% 33% 34% 35% 36% 37% 38% 39% 40% 41% 42% 43% 44% 45% 46% 47% 48% 49% 50% 51% 52% 53% 54% 55% 56% 57% 58% 59% 60% 61% 62% 63% 64% 65% 66% 67% 68% 69% 70% 71% 72% 73% 74% 75% 76% 77% 78% 79% 80% 81% 82% 83% 84% 85% 86% 87% 88% 89% 90% 91% 92% 93% 94% 95% 96% 97% 98% 99% 100%
42705920 bytes written to tmp\whatsapp.tar.

C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: apps/com.whatsapp/f/key: Not found in archive
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error exit delayed from previous errors
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: apps/com.whatsapp/f/encrypted_backup.key: Not found in archive
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error exit delayed from previous errors
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: apps/com.whatsapp/db/msgstore.db: Not found in archive
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error exit delayed from previous errors
apps/com.whatsapp/db/wa.db
apps/com.whatsapp/db/axolotl.db
apps/com.whatsapp/db/chatsettings.db
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: apps/com.whatsapp/Avatars: Not found in archive
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error exit delayed from previous errors

Extracting axolotl.db ...
Cleaning up temporary files ...
Done

Restoring WhatsApp 2.24.4.76
5227 KB/s (55145837 bytes in 10.301s)
Success
Restore complete

Removing WhatsApp 2.24.4.76 temporary apk

Operation complete

Press any key to continue . . .
PS C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor> cd ..
PS C:\Users\Dev\Downloads> rm -r .\WhatsApp-Key-DB-Extractor\ -Force
PS C:\Users\Dev\Downloads> git clone https://github.com/EliteAndroidApps/WhatsApp-Key-DB-Extractor.git
Cloning into 'WhatsApp-Key-DB-Extractor'...
remote: Enumerating objects: 115, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 115 (delta 28), reused 28 (delta 28), pack-reused 81
Receiving objects: 100% (115/115), 10.92 MiB | 5.38 MiB/s, done.
Resolving deltas: 100% (58/58), done.
PS C:\Users\Dev\Downloads> cd .\WhatsApp-Key-DB-Extractor
PS C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor> ls

Directory: C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor

Mode LastWriteTime Length Name


d----- 3/10/2024 1:06 AM bin
d----- 3/10/2024 1:06 AM extracted
d----- 3/10/2024 1:06 AM tmp
-a---- 3/10/2024 1:06 AM 35815 LICENSE
-a---- 3/10/2024 1:06 AM 2876 README.md
-a---- 3/10/2024 1:06 AM 6759 WhatsAppKeyDBExtract.bat
-a---- 3/10/2024 1:06 AM 6488 WhatsAppKeyDBExtract.ps1
-a---- 3/10/2024 1:06 AM 5746 WhatsAppKeyDBExtract.sh

PS C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor> .\WhatsAppKeyDBExtract.ps1

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

Downloading legacy WhatsApp 2.11.431 to local folder

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0

Backing up WhatsApp 2.24.4.76
6870 KB/s (55145837 bytes in 7.838s)
Backup complete

Removing WhatsApp 2.24.4.76 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
Invalid APK file: tmp\LegacyWhatsApp.apk
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

C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error is not recoverable: exiting now
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error is not recoverable: exiting now
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error is not recoverable: exiting now
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error is not recoverable: exiting now
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Cannot open tmp\whatsapp.tar: No such file or directory
C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor\bin\tar.exe: Error is not recoverable: exiting now

Cleaning up temporary files ...
Done

Restoring WhatsApp 2.24.4.76
5278 KB/s (55145837 bytes in 10.203s)
Success
Restore complete

Removing WhatsApp 2.24.4.76 temporary apk

Operation complete

Press any key to continue . . .
PS C:\Users\Dev\Downloads\WhatsApp-Key-DB-Extractor>

Backing up to tar failing, any idea

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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

Can this be modified for whatsapp business ?

Would like to know if this can be modified for whatsapp business. I change the path of com.whatsapp to com.whatsapp.w4b, it passes some of the validations but then fails with legacy install.

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

While following the simple instructions I get the following error output:

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: ""
	at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:420)
	at org.nick.abe.Main.main(Main.java:128)
	... 5 more
Caused by: java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:592)
	at java.lang.Integer.parseInt(Integer.java:615)
	at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:280)
	... 6 more
tar: Error opening archive: Failed to open 'tmp/whatsapp.tar'
tar: Error opening archive: Failed to open 'tmp/whatsapp.tar'
tar: Error opening archive: Failed to open 'tmp/whatsapp.tar'
tar: Error opening archive: Failed to open 'tmp/whatsapp.tar'
tar: Error opening archive: Failed to open 'tmp/whatsapp.tar'

Saving whatsapp.cryptkey ...
cp: tmp/apps/com.whatsapp/f/key: No such file or directory
Saving msgstore.db ...
cp: tmp/apps/com.whatsapp/db/msgstore.db: No such file or directory
Saving wa.db ...
cp: tmp/apps/com.whatsapp/db/wa.db: No such file or directory
Saving axolotl.db ...
cp: tmp/apps/com.whatsapp/db/axolotl.db: No such file or directory
Saving chatsettings.db ...
cp: tmp/apps/com.whatsapp/db/chatsettings.db: No such file or directory

Pushing cipher key to: /storage/emulated/legacy/WhatsApp/Databases/.nomedia
adb: error: cannot stat 'tmp/apps/com.whatsapp/f/key': No such file or directory

What is the issue here? Did I skip an important step?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.