FORUMS
Remove All Ads from XDA

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

171 posts
Thanks Meter: 151
 
By TripCode, Senior Member on 3rd June 2014, 03:47 AM
Post Reply Email Thread
14th December 2018, 04:15 PM |#521  
Junior Member
Thanks Meter: 0
 
More
Problem with Extractor
Here is log file. Any idea why this appear? Thanks1
Android 6.0 Xiaomi
Anyone have experience with Samsung J5 android 7.01.?

================================================== =======================
= 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.380 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 3306k 0 0:00:05 0:00:05 --:--:-- 3436k

Backing up WhatsApp 2.18.380
7223 KB/s (24432613 bytes in 3.303s)
Backup complete

Removing WhatsApp 2.18.380 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
6163 KB/s (18329558 bytes in 2.904s)
pkg: /data/local/tmp/LegacyWhatsApp.apk
Failure [INSTALL_FAILED_PERMISSION_MODEL_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 ...

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

Done

Restoring WhatsApp 2.18.380
6538 KB/s (24432613 bytes in 3.649s)
pkg: /data/local/tmp/base.apk
Success

Restore complete

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

Operation complete

Press any key to continue . . .
 
 
17th December 2018, 05:15 PM |#522  
Senior Member
Thanks Meter: 12
 
More
is it possible to read the old copyed files from pc?

My best friend died in year 2017 and the police give me his device. I make a full copy from note 4 and i have all files on my pc. After this i reset the device.
Now i have all folders include whatsapp etc.

Is it in futre possible to read the messages again?
17th December 2018, 08:02 PM |#523  
Senior Member
Thanks Meter: 104
 
More
Depends on what do you mean with "full copy", is /data partition included, do you have the possibility to restore backup to phone? Maybe i can assist send me pm
2nd January 2019, 05:09 AM |#524  
Senior Member
Flag Singapore
Thanks Meter: 37
 
More
Hi everyone, my Whatsapp backup was corrupted from Google Drive. I do not have any internal storage db because I had formatted my phone.

Now I have already extracted my msgstore.db.crypt12 from Google Drive and then .dump into temp.sql

I can see all my messages there. But how do restore it back to Whatsapp?
5th January 2019, 08:00 AM |#525  
Junior Member
Thanks Meter: 0
 
More
HI,

after downloading Java and every thing also i am gettng below error while downloading

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoa der.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(AndroidBac kup.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(AndroidBac kup.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

can you please help on this error.
i want to descrypt the crypt12 whats up file without key .. if any apllications are available let know i will try..

its very urgent kindly do the needful
5th January 2019, 06:41 PM |#526  
Junior Member
Thanks Meter: 3
 
More
Quote:
Originally Posted by ferraro.dav

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.

Finally after a bit of digging I was able to get some old WhatsApp crypt7 databases decrypted using a small modification to the .sh script in the first post (on macOS Mojave).

I had a very similar problem to the above, and your hint put me on the right path to fix this for me. I was trying to recover the crypt key from a very old WhatsApp install on a Moto G, so old that the version of WhatsApp it had installed was 2.11.432... only 1 bugfix release higher than the legacy version the script puts in place!

In case it helps someone, I had to fix a couple of things along the way to make it work:
1. Manually downloaded the legacy WhatsApp using the link inside the script beforehand,
Code:
curl -o tmp/LegacyWhatsApp.apk "http://www.cdn.whatsapp.net/android/2.11.431/WhatsApp.apk"
2. Made very similar changes to ferraro.dav above, but on my setup I had to do this in a two step process for it to work, otherwise I would get an annoying "Exception in thread "main" java.lang.reflect.InvocationTargetException" .

So I changed:

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 > /sdcard/whatsapp.ab"
adb pull /sdcard/whatsapp.ab tmp/whatsapp.ab
else
adb shell "bu 1 backup -noapk com.whatsapp > /sdcard/whatsapp.ab"
adb pull /sdcard/whatsapp.ab tmp/whatsapp.ab
fi
This initiates a backup of the whatsapp data through the adb shell and saves it onto the device itself, before then pulling that down to where the script is expecting it to keep everything working.

Digging into it a bit further it looks like there is an incompatibility between the very old adb bridge on the phone (running android 4.4.4), and the much more up to date adb I have setup on macOS Mojave (1.0.40). I found this post on stack overflow very helpful in getting this working.

I was then finally able to view the messages and export to json/html which was my goal all along, using https://andreas-mausch.de/whatsapp-viewer/. N.B. The current version of this tool didn't like the really old WhatsApp archives, but I randomly tried one a few versions older (1.9) which worked for me.

HTH someone, and thanks for putting this script together!
The Following 2 Users Say Thank You to angues For This Useful Post: [ View ] Gift angues Ad-Free
17th January 2019, 07:21 PM |#527  
Junior Member
Thanks Meter: 0
 
More
backupFrequency
what means the backupFrequency field in - 'info' ?
{
"backupFrequency": 3,
"backupNetworkSettings": 0,
"backupSize": 8133914927,
"backupVersion": 1,
"chatdbSize": 205945695,
"includeVideosInBackup": true,
"localSettings": {
"autodownload_cellular_mask": 0,
"autodownload_wifi_mask": 0,
"conversation_sound": true,
"input_enter_send": false,
"interface_font_size": "0",
"settings_language": "en-US",
"voip_low_data_usage": false
},
"mediaSize": 7927665742,
"numOfMediaFiles": 25389,
"numOfMessages": 784499,
"numOfPhotos": 8123,
"videoSize": 5796698165
}

what is '3' ? monthly? weekly? daily ? never?
31st January 2019, 01:05 AM |#528  
Junior Member
Thanks Meter: 0
 
More
So this is a lognshot since its been a while, but i had whatsapp on an app called parallel, how could i recover the key for that?
15th February 2019, 10:21 AM |#529  
nioBee's Avatar
Member
Thanks Meter: 13
 
More
Quote:
Originally Posted by TripCode

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

Hello,
I have downloaded the file linked in the first post, extracted it and tried to extract the key from my samsung galaxy s8...
First time I tried I got some errors (see attached images), then I decided to:
  1. Update Java to version 8 - 201
  2. Install ADB drivers from this page: 15 seconds ADB Installer v1.4.3
  3. Set Java path in system variables
  4. Disable "MyPhone Explorer" from launching every time I connect my phone to the PC

But now It just doesn't work.. I open the bat and it asks me to connect phone but then the window closes.. I disabled/reenabled debugging on phone, nothing happens.. uninstalled and reinstalled ADB Drivers.. nothing.. Tried to use Powershell but I get the error "whatsapp isnt installed" but it is on my phone...
I really don't get how to solve this issue...
Any help is really appreciated..

Edit: I have found out that the ADB Drivers I was using is obsolete (see this post: https://forum.xda-developers.com/sho...postcount=1456 so I took the platform tools and now it is connecting again to my phone! but I still get errors connected to Java...
Attached Thumbnails
Click image for larger version

Name:	01 CMD.PNG
Views:	234
Size:	27.9 KB
ID:	4705825   Click image for larger version

Name:	02 CMD.PNG
Views:	230
Size:	63.8 KB
ID:	4705826  
15th February 2019, 10:49 AM |#530  
nioBee's Avatar
Member
Thanks Meter: 13
 
More
Here the log I get using either the BAT file or the PowerShell File:
Code:
Please connect your Android device with USB Debugging enabled:

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

WhatsApp 2.19.34 installed

Found legacy WhatsApp 2.11.431 in local folder

Backing up WhatsApp 2.19.34
2475 KB/s (25385434 bytes in 10.014s)
Backup complete

Removing WhatsApp 2.19.34 skipping data
Success
Removal complete

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

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

Done

Restoring WhatsApp 2.19.34
4926 KB/s (25385434 bytes in 5.031s)
Success

Restore complete

Removing WhatsApp 2.19.34 temporary apk
File eliminato - C:\WhatsApp-Key-DB-Extractor-master\tmp\base.apk

Operation complete
I don't understand If I get the error because the legacy version cannot be installed or by some Java problem...

UPDATE: I think I found the problem... on android 7 you cannot install the legacy version of whatsapp, the system won't allow you to do so... I tried also with other softwares but every time the app doesn't install.. I have an older phone with android 4.4.2 and the extractor worked like a charm.. so I really think it isn't compatible with android 7 or later versions..
15th February 2019, 12:40 PM |#531  
sercankd's Avatar
Senior Member
Thanks Meter: 67
 
More
GBWhatsapp has internal option to extract key file. In the GBSettings there is backup option which backups unencrypted chat database, key file and other stuff to sdcard.
Post Reply Subscribe to Thread

Tags
crypt, crypt5, crypt8, smsbackup, whatsapp

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes