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

Search This thread

Baconator724

Member
Jul 3, 2016
36
2
How can I find out it?
You had it installed on your phone when you bought it. and websites like tweakers.net probably also state it as special information about the phone. However I think this is really unlikely.

Hi.
I have problems with using this tool. :(
My device is Nexus 6 with Android 7. Can you help me?
Code:
=========================================================================
= 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.16.310 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 17.4M 100 17.4M 0 0 7796k 0 0:00:02 0:00:02 -::- 7796k
Backing up WhatsApp 2.16.310
remote object '/data/app/com.whatsapp-2/base.apk' does not exist
Backup complete
Removing WhatsApp 2.16.310 skipping data
Success
Removal complete
Installing legacy WhatsApp 2.11.431
3647 KB/s (18329558 bytes in 4.907s)
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: 123
Password is set but strong AES encryption is not allowed
Please install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 or 8
Exiting.
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 - D:\Projects\EXWA\key_extractor_nougat\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab
Deleted file - D:\Projects\EXWA\key_extractor_nougat\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt
Deleted file - D:\Projects\EXWA\key_extractor_nougat\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt
Deleted file - D:\Projects\EXWA\key_extractor_nougat\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt
Deleted file - D:\Projects\EXWA\key_extractor_nougat\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt
Deleted file - D:\Projects\EXWA\key_extractor_nougat\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt
Done
Downloading WhatsApp 2.16.310 to local folder
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29654 0 29654 0 0 94741 0 -::- -::- -::- 94741
Restoring WhatsApp 2.16.310
926 KB/s (29654 bytes in 0.031s)
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl140132202.tmp/base.apk: AndroidManifest.xml]
Restore complete
Removing WhatsApp 2.16.310 temporary apk
Deleted file - D:\Projects\EXWA\key_extractor_nougat\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key-DB-Extractor-master\tmp\base.apk
Operation complete
Press any key to continue . . .
Code:
 Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
This is odd. Try to re-download the files and use a different USB cable and port, as I think the files might have corrupted.

Also, are you rooted or do you use a custom ROM?
 

Raptor.X

Senior Member
Jul 20, 2008
166
9
Paris
Hi guys,

Here's what's happening for me:

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

Found legacy WhatsApp 2.11.431 in local folder

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

Removing WhatsApp 2.16.396 skipping data
Removal complete

Installing legacy WhatsApp 2.11.431
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
protocol failure
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
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(NativeMethodAccessorImpl.
java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.RuntimeException: java.lang.NumberFormatException: For inpu
t 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
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\Me\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\whatsap
p.ab
Deleted file - C:\Users\Me\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\waplen.
txt
Deleted file - C:\Users\Me\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.
txt
Deleted file - C:\Users\Me\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\wapath.
txt
Deleted file - C:\Users\Me\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\wapver.
txt
Deleted file - C:\Users\Me\Desktop\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.
txt

Done

Downloading WhatsApp 2.16.396 to local folder
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29686 0 29686 0 0 65676 0 --:--:-- --:--:-- --:--:-- 65676

Operation complete

Press any key to continue . . .

I am rooted and everything is installed correctly on my PC. Using Galaxy S7 with Superman ROM.
The "Extracted" folder is still empty except ".placeholder" file.
Thanks.
 

akotowski

New member
Jan 8, 2017
2
0
Hey,
i got the same Error as mentioned before. I am using a Pixel with WhatApp Version 2.16.396.

The Script removes the current Version of Whatapp and isn't able to install the older Version.

Here is the Complete Scriptoutput:

=========================================================================
= 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.16.396 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 17.4M 100 17.4M 0 0 2395k 0 0:00:07 0:00:07 --:--:-- 2336k

Backing up WhatsApp 2.16.396
3803 KB/s (28443847 bytes in 7.303s)
Backup complete

Removing WhatsApp 2.16.396 skipping data
Success
Removal complete

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

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

Cleaning up temporary files ...

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

Done

Restoring WhatsApp 2.16.396
4684 KB/s (28443847 bytes in 5.929s)
Success

Restore complete

Removing WhatsApp 2.16.396 temporary apk
Datei wurde gelöscht - D:\Download\WhatsApp-Key-DB-Extractor-master\WhatsApp-Key
-DB-Extractor-master\tmp\base.apk

Operation complete

Drücken Sie eine beliebige Taste . . .
 

rahulmishra1111111

New member
Jan 11, 2017
1
0
i will pay 1USD
if someone help me in extracting whatsapp key from my non rooted phone
please call me if u r interested and u have full knowledge about it
i only have 12 hours not more than that
this is my no. +919807787704
 

jobhimself

New member
Jan 14, 2017
2
0
After resolving a few errors by installing everything required, trying with many WhatsApp versions, on OSX, Linux and Windows, I still can't get the script to work.

There is no error per se but the script seems unable to find the needed directories (look after I entered the backup password).

My phone is a BlackPhone BP1.

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

* server not running *
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
./WhatsAppKeyDBExtract.sh: line 57: [: -eq: unary operator expected

Found legacy WhatsApp 2.11.431 in local folder

WhatsApp 2.12.25 installed

Backing up WhatsApp 2.12.25
[100%] /data/app/com.whatsapp-1.apk
Backup complete

Installing legacy WhatsApp 2.11.431
[100%] /data/local/tmp/LegacyWhatsApp.apk
	pkg: /data/local/tmp/LegacyWhatsApp.apk
Success
Install complete

Now unlock your device and confirm the backup operation...

Please enter your backup password (leave blank for none) and press Enter:
******
tar: apps/com.whatsapp/f/key: Not found in archive
tar: Error exit delayed from previous errors.
tar: apps/com.whatsapp/db/msgstore.db: Not found in archive
tar: Error exit delayed from previous errors.
tar: apps/com.whatsapp/db/wa.db: Not found in archive
tar: Error exit delayed from previous errors.
tar: apps/com.whatsapp/db/axolotl.db: Not found in archive
tar: Error exit delayed from previous errors.
tar: apps/com.whatsapp/db/chatsettings.db: Not found in archive
tar: Error exit delayed from previous errors.

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

Restoring WhatsApp 2.12.25
[100%] /data/local/tmp/com.whatsapp-1.apk
	pkg: /data/local/tmp/com.whatsapp-1.apk
Success
Restore complete

Cleaning up temporary files ...
Done

Operation complete

Please press Enter to quit...

How can I get the script to work?

EDIT
The error seems to occur at line 32:
Code:
java -jar bin/abe.jar unpack tmp/whatsapp.ab tmp/whatsapp.tar $password

If I don't rm the tmp files and execute this line I have:
Code:
  % java -jar ../bin/abe.jar unpack whatsapp.ab whatsapp.tar PASSWORD                                                      
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: javax.crypto.BadPaddingException: Given final block not properly padded
	at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:420)
	at org.nick.abe.Main.main(Main.java:128)
	... 5 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
	at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:966)
	at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:824)
	at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:436)
	at javax.crypto.Cipher.doFinal(Cipher.java:2165)
	at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:330)
	... 6 more
 
Last edited:

xdaforo

Senior Member
Dec 4, 2012
67
13
Samsung Galaxy Watch 4
Hi, it's the first time for me using this software and it's not working. I might be doing something wrong. I have a non-rooted xperia sp with locked bootloader.

This is the result after installin driver, updating java, enabling debugging mode in my case:

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

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

WhatsApp 2.16.396 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.16.396
3323 KB/s (28443847 bytes in 8.357s)
Backup complete

Installing legacy WhatsApp 2.11.431
1522 KB/s (18329558 bytes in 11.758s)
        pkg: /data/local/tmp/LegacyWhatsApp.apk
Success
Install complete

Now unlock your device and confirm the backup operation.

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

[B]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(JarRsrcLoa
der.java:58)
Caused by: java.lang.RuntimeException: java.lang.NumberFormatException: For inpu
t 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
[/B]
Cleaning up temporary files ...

File Removed: C:\Users\Admin\Desktop\WhatsApp-Key-DB-Extractor-mast
er\WhatsApp-Key-DB-Extractor-master\tmp\whatsapp.ab
File Removed: C:\Users\Admin\Desktop\WhatsApp-Key-DB-Extractor-mast
er\WhatsApp-Key-DB-Extractor-master\tmp\waplen.txt
File Removed: C:\Users\Admin\Desktop\WhatsApp-Key-DB-Extractor-mast
er\WhatsApp-Key-DB-Extractor-master\tmp\sdpath.txt
File Removed: C:\Users\Admin\Desktop\WhatsApp-Key-DB-Extractor-mast
er\WhatsApp-Key-DB-Extractor-master\tmp\wapath.txt
File Removed: C:\Users\Admin\Desktop\WhatsApp-Key-DB-Extractor-mast
er\WhatsApp-Key-DB-Extractor-master\tmp\wapver.txt
File Removed: C:\Users\Admin\Desktop\WhatsApp-Key-DB-Extractor-mast
er\WhatsApp-Key-DB-Extractor-master\tmp\sdkver.txt

Done

Restoring WhatsApp 2.16.396
2459 KB/s (28443847 bytes in 11.295s)
        pkg: /data/local/tmp/com.whatsapp-2.apk
Success

Restore complete

Removing WhatsApp 2.16.396 temporary apk
File Removed: C:\Users\Admin\Desktop\WhatsApp-Key-DB-Extractor-mast
er\WhatsApp-Key-DB-Extractor-master\tmp\com.whatsapp-2.apk

Operation complete

Press any key to continue. . .

Any idea about what to correct in order to get the key file? thanx!
 
Last edited:

ferraro.dav

New member
Jan 30, 2017
1
2
Tar error fix

I noticed that I'm not the only one who's having the tar errors "tar: apps/com.whatsapp/f/key: Not found in archive", the problem is with the backup file given by adb that is empty. I found on stackexchange (android.stackexchange .com /a/143481/207500) that it has to do with a backup command bug and a simple solution. You just need to use the phone shell instead of letting abd take care of it.
On unix open the ssh file and change this:
Code:
if [ $sdkver -ge 23 ]; then
adb backup -f tmp/whatsapp.ab com.whatsapp
else
adb backup -f tmp/whatsapp.ab -noapk com.whatsapp
fi
to this:
Code:
if [ $sdkver -ge 23 ]; then
adb shell "bu 1 backup com.whatsapp" > tmp/whatsapp.ab
else
adb shell "bu 1 backup -noapk com.whatsapp" > tmp/whatsapp.ab
fi
Also, it kept giving me empy backup files until I didn't put a "desktop backup password" and wrote it in BOTH the boxes (even if it says that leaving the second blank will make it use the default password).
Hope this helps and that the developers put this change in the script so that no one else has this problem.
 

Trans-amers

Senior Member
Nov 14, 2012
128
14
Bath
I noticed that I'm not the only one who's having the tar errors "tar: apps/com.whatsapp/f/key: Not found in archive", the problem is with the backup file given by adb that is empty. I found on stackexchange (android.stackexchange .com /a/143481/207500) that it has to do with a backup command bug and a simple solution. You just need to use the phone shell instead of letting abd take care of it.
On unix open the ssh file and change this:
Code:
if [ $sdkver -ge 23 ]; then
adb backup -f tmp/whatsapp.ab com.whatsapp
else
adb backup -f tmp/whatsapp.ab -noapk com.whatsapp
fi
to this:
Code:
if [ $sdkver -ge 23 ]; then
adb shell "bu 1 backup com.whatsapp" > tmp/whatsapp.ab
else
adb shell "bu 1 backup -noapk com.whatsapp" > tmp/whatsapp.ab
fi
Also, it kept giving me empy backup files until I didn't put a "desktop backup password" and wrote it in BOTH the boxes (even if it says that leaving the second blank will make it use the default password).
Hope this helps and that the developers put this change in the script so that no one else has this problem.
Wo if im using pc, what shd I change to prevent this error?

Sent from my Nexus 6 using Tapatalk
 

rayman3

Member
Sep 1, 2015
14
3
South of Germany
I noticed that I'm not the only one who's having the tar errors "tar: apps/com.whatsapp/f/key: Not found in archive", the problem is with the backup file given by adb that is empty. I found on stackexchange (android.stackexchange .com /a/143481/207500) that it has to do with a backup command bug and a simple solution. You just need to use the phone shell instead of letting abd take care of it.
On unix open the ssh file and change this:
Code:
if [ $sdkver -ge 23 ]; then
adb backup -f tmp/whatsapp.ab com.whatsapp
else
adb backup -f tmp/whatsapp.ab -noapk com.whatsapp
fi
to this:
Code:
if [ $sdkver -ge 23 ]; then
adb shell "bu 1 backup com.whatsapp" > tmp/whatsapp.ab
else
adb shell "bu 1 backup -noapk com.whatsapp" > tmp/whatsapp.ab
fi
Also, it kept giving me empy backup files until I didn't put a "desktop backup password" and wrote it in BOTH the boxes (even if it says that leaving the second blank will make it use the default password).
Hope this helps and that the developers put this change in the script so that no one else has this problem.

Thanks for that, i will try it, if the error occurs.
For all other users here:
- If WA is preinstalled on the phone, it´s possible that the script do not work (syntax error or similar)!
- If you´ve set a password in the backup-options of your android-phone, the script do not work -> maybe work, if you remove the option of seting a password in the options of your phone & try again.
- If you want to edit the script like "ferraro.dav" here, use an editor like notepad++, open the ".bat", ".sh" or ".ps1" file and edit them.

N´till yet, i have used this tool with several phones (about 60) and it works within 90%. But i can increasingly find that there are problems with newer models.
 

Rockermen

Member
Feb 17, 2017
5
0
Problem with Java

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

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.17.79
4587 KB/s (29034509 bytes in 6.180s)
Backup complete

Installing legacy WhatsApp 2.11.431
3950 KB/s (18329558 bytes in 4.531s)
pkg: /data/local/tmp/LegacyWhatsApp.apk
Success
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.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

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

Cleaning up temporary files ...
Done

Restoring WhatsApp 2.17.79
4181 KB/s (29034509 bytes in 6.780s)
pkg: /data/local/tmp/com.whatsapp-2.apk
Success
Restore complete

Removing WhatsApp 2.17.79 temporary apk


Operation complete

Presione una tecla para continuar . . .

Can someone tell me how to resolve this problem?
 

rayman3

Member
Sep 1, 2015
14
3
South of Germany
---------- Post added at 08:06 PM ---------- Previous post was at 08:01 PM ----------

[/COLOR]
=========================================================================
= 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.79 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.17.79
4587 KB/s (29034509 bytes in 6.180s)
Backup complete

Installing legacy WhatsApp 2.11.431
3950 KB/s (18329558 bytes in 4.531s)
pkg: /data/local/tmp/LegacyWhatsApp.apk
Success
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.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

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

Cleaning up temporary files ...
Done

Restoring WhatsApp 2.17.79
4181 KB/s (29034509 bytes in 6.780s)
pkg: /data/local/tmp/com.whatsapp-2.apk
Success
Restore complete

Removing WhatsApp 2.17.79 temporary apk


Operation complete

Presione una tecla para continuar . . .

Can someone tell me how to resolve this problem?

Phone-model? Android-Version? WhatsApp preinstalled?:confused:

---------- Post added at 08:16 PM ---------- Previous post was at 08:06 PM ----------

I am able to complete all processes but there is nothing in the Extract folder..can some one help me??

Can you post the log?
 

umairnajib

New member
Feb 25, 2017
2
0
---------- Post added at 08:06 PM ---------- Previous post was at 08:01 PM ----------

[/COLOR]

Phone-model? Android-Version? WhatsApp preinstalled?:confused:

---------- Post added at 08:16 PM ---------- Previous post was at 08:06 PM ----------



Can you post the log?


now it just closes //i mean the debug window .. :(
 

Rockermen

Member
Feb 17, 2017
5
0
---------- Post added at 08:06 PM ---------- Previous post was at 08:01 PM ----------

[/COLOR]

Phone-model? Android-Version? WhatsApp preinstalled?:confused:

---------- Post added at 08:16 PM ---------- Previous post was at 08:06 PM ----------


Android 4.4.4, Huawei Ascend G620S, and whatsapp is not preinstalled
 

Harsh213

New member
Mar 10, 2017
1
0
Unexpected error !

Hi, First of all, Thanks for the brilliant work. Much Appreciated.

I am stuck up with this:


bin\tar.exe: apps/com.whatsapp/f/key: Not found in archive
bin\tar.exe: Error exit delayed from previous errors
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: apps/com.whatsapp/db/wa.db: Not found in archive
bin\tar.exe: Error exit delayed from previous errors
apps/com.whatsapp/db/axolotl.db
bin\tar.exe: apps/com.whatsapp/db/chatsettings.db: Not found in archive
bin\tar.exe: Error exit delayed from previous errors

Extracting axolotl.db ...
1 file(s) copied.

Could you help me find a solution? How can i fix and get the whatsapp key generated. I am following the Directory Structue. Java is up to date.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Sorry for waking up an old thread.

    Adb fails to install an older WhatsApp (even with -d) citing the version downgrade error... Was there a specific way to get around this?

    It seems that only debugable apps can be installed this way :/
    you need to restart your device before installing the old version
    1
    But how can it be 17gigs then just messages really
    IDK msgstore.db.crypt14 is only an encrypted backup of the msgstore.db stored in /data/data/com.whatsapp/databases

    media is stored in internal/Android/media/com.whatsapp
  • 49
    ** Version 4.7 Updated October 2016 - Supports Android 4.0-7.0 **

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

    TUTORIAL:

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

    PREREQUISITES:

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

    INSTRUCTIONS:

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

    TROUBLESHOOTING:

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

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


    AUTHOR: TripCode
    THANKS: dragomerlin for Android Backup Extractor and Abinash Bishoyi for being cool.
    4
    just extracted whatsapp data from:
    - lenovo p2 under android 7.0
    - galaxy s8 under android 9.0

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

    Few tips before publishing (they will be in the script):
    - if you get an error during the downgrade, reboot your phone before installing the downgrade
    - i kept the "adb backup" command but before executing it, you have to launch the downgraded application! (tested multiple times, without this launch, the backup was empty or corrupted)
    - update "adb.exe" (and libs) and "abe.jar" (thanks @progman321 for the tips)


    which url?

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

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

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


    first, the "foreplay" steps, if you know what i mean ;) :
    1. enable "usb debugging" in your phone
    2. verify you have the latest version of java and the android debug bridge drivers in your pc
    3. download the .zip from this post
    4. extract it without changing the overall structure of the folder
    5. download wa 2.11.431 (like from android-apk.org)
    6. put it in the tmp folder replacing legacywhatsapp.apk

    second, the feel like a hacker from mr. Robot steps:
    1. launch whatsappkeydbextract.bat file
    2. input y to reboot the device
    3. once rebooted, unlock it (you should not find your wa app anymore) and press any key in cw
    4. wait until the streamed install is done
    5. unlock again your phone
    6. prompted "wa has been updated" should be prompted in your phone, press continue
    7. search for wa in your phone and open it
    8. (a new prompt in your phone will say it's an outdated version of wa press ok, if it doesnt appear don't worry)
    9. press the adjust date and you will be sent to a date & time page, keep it open
    10. press any key in cw
    11. select the option you prefer at the command window
    12. select fullback up in your phone (without entering any password)
    13. restore wa press any key
    14. you made it as well :highfive:

    finally you should download the whatsapp viewer and use it to open the msgstor.db file
    i hope it helps and sorry for the bad jokes :p

    n.b.: For the steve jobs lovers i'm sorry i have a win pc altough i'm not against a fundraise to buy me one, i would love to replace my potato with an apple :d
    wa = whatsapp
    cw = command window

    FINALLY!!!! THIS UP HERE IS ALL YOU NEED TO HAVE/FOLLOW SO TO BACKUP WhatsApp FILES WITH LAST 2020 ANDROID ON A WINDOWS BASED SYSTEM!!!!!!

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

    EVERYTHING DID WORK AT FIRST TRY!!!!!

    Thank you guys. I really love ya!!! :D
    3
    I will try this evening/night (ADT - Atlantic Daylight Time / ADST Atlantic Daylight Saving Time ... or currently UTC-3) :p

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

    And the new UNTESTED merjapp.jar is here:
    https://github.com/p4r4d0x86/merjapp/releases/download/v190508/merjapp.jar
    3
    Detailed Instructions

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


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

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

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

    N.B.: For the Steve Jobs lovers I'm sorry I have a Win PC altough I'm not against a fundraise to buy me one, I would love to replace my potato with an apple :D
    WA = Whatsapp
    CW = Command Window

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

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

    Hope you find this helpful.

    To decrypt .14 files, use this instead:

    To open the new database file format after obtaining the files with the extractor, here are the instructions on how to create the needed tables in the SQL database so the viewer can process them:
    2
    Yes, this is a normal backup method. There are automatic tools that do the same without using PC, just on device side.

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

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

    regards.

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