yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Digvijay yadav:
getting this error when trying to get my whatsapp data from google drive.....

Traceback (most recent call last):

File "WhatsAppGDExtract.py", line 206, in

main()

File "WhatsAppGDExtract.py", line 187, in main

runMain('info', 'settings', 0)

File "WhatsAppGDExtract.py", line 138, in runMain

drives = gDriveFileMap()

File "WhatsAppGDExtract.py", line 65, in gDriveFileMap

for result in jres['items']:

KeyError: 'items'
[Android Apps and Games] coolfire:
I get the same errors too, on my S8 plus
[Android Apps and Games] 0r3n:
Please update in red bold font that it's gonna reinstall Whatsapp and you should backup Whatsapp chat before running this tool.

all latest messages are gone since my update is 1 week old.

:crying:
[Android Apps and Games] danieleoni:
On Android 5.1.1 and whatsapp 2.18.142 I have the failure message on reistall whatsapp procedure: "invalid APK". The new installed whatsapp gives a wrong data and time error message. Needed to reinstall from store
[Android Apps and Games] FabrizioDiantina:
WhatsAppKeyDBExtract - Fail to downgrade Whatsapp version

Hello,

Thanks for the tool WhatsAppKeyDBExtract

I have a problem:

The extractor works fine, but FAIL to downgrade the Whatsapp version installed on the phone (Android, not rooted), therefore I do not get to extract the whatsapp key. See attached screenshot.

I have tried the following:

1) Updated my Java environment

2) Forced the Whatsapp app on the phone to close

3) Disable to phone internet connection

But did not work. ANY HELP PLEASE?

Phone has Android 7.0

Any advise is welcome! Thanks in advance!

[IMG="Key Extractor fail to downgrade Whatsapp version"]I:\All backup from K HDD[/IMG]
[Android Apps and Games] slr117:
Re: Extraction failure

Hi, I've been able to get to the extraction process and I get a "Backup Complete" message, but then the extractor (.bat) window shows:

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

I have no backup passwords set on the phone (that I am aware of - only using pattern and fingerprint), and the Android version is 7.0.

The extracted folder only shows the placeholder file. No other files have been acquired.

Please advise
[Android Apps and Games] cdoub:
Hi , I dont see the whatsapp.cryptkey (nor key.db) file among the extracted files. What could be the problem?

Can I still get out the key to decrypt ? Thank you
[Android Apps and Games] manhusky:
take backup without unlocking phone

How can i take backup without unlocking phone ? what codes i needs to change in the file ir can you provide script which can be used to take backup without unlocking the phone. Its urgent.

Thanks
[Android Apps and Games] poopah:
Hi i have a error installing legacy i need help

Installing legacy whatsapp 2.11.431

Failure [-26: Package com.whatsapp new target SDK 19 doesn't support runtime permissions but the old target SDK 23 does.]

Install complete

Now unlock your device and confirm the backup operation.

Please enter your password

C:\Users\....\bin\tar.exe: Record size = 2 blocks

C:\Users\....\bin\tar.exe: apps/com.whatsapp/f/key: Not found in archive

C:\Users\....\bin\tar.exe: Error exit delayed from previous errors

C:\Users\....\bin\tar.exe: Record size = 2 blocks

C:\Users\....\bin\tar.exe: apps/com.whatsapp/db/msgstore.db: Not found in archive

C:\Users\....\bin\tar.exe: Error exit delayed from previous errors

C:\Users\....\bin\tar.exe: Record size = 2 blocks

C:\Users\....\bin\tar.exe: apps/com.whatsapp/db/wa.db: Not found in archive

C:\Users\....\bin\tar.exe: Error exit delayed from previous errors

C:\Users\....\bin\tar.exe: Record size = 2 blocks

C:\Users\....\bin\tar.exe: apps/com.whatsapp/db/axolot1.db: Not found in archive

C:\Users\....\bin\tar.exe: Error exit delayed from previous errors

C:\Users\....\bin\tar.exe: Record size = 2 blocks

C:\Users\....\bin\tar.exe: apps/com.whatsapp/db/chatsettings.db: Not found in archive

C:\Users\....\bin\tar.exe: Error exit delayed from previous errors

Cleaning up temporary files ...

Done

Restoring whatsapp 2.18.203 2.11.1

Success

Restore Complete
[Android Apps and Games] swarup2018:
Yes I have got same issue with my Samsung Galaxy J710F.

Please can anyone help !
[Android Apps and Games] tallalbinsaif:
Daemon Running Successfully ..

and then nothing happens... neither on phone nor on computer

Please help .

* Using Honor 4c .. Kitkat 4.4.2

---------- Post added at 12:07 AM ---------- Previous post was at 12:02 AM ----------

Same Issue ... have u got any solution ....
[Android Apps and Games] CharlesWh:
Downgrade Failure

I'm following the instructions on this post, for use with my Samsung Note 8, but the downgrade fails and I'd be grateful for any suggestions.
[Android Apps and Games] bodaciousundead22:
I have the same issue!! And is very annoying. please help

Traceback (most recent call last):

File "WhatsAppGDExtract.py", line 206, in <module>

main()

File "WhatsAppGDExtract.py", line 187, in main

runMain('info', 'settings', 0)

File "WhatsAppGDExtract.py", line 138, in runMain

drives = gDriveFileMap()

File "WhatsAppGDExtract.py", line 65, in gDriveFileMap

for result in jres['items']:

KeyError: 'items'
[Android Apps and Games] noob505:
Thank you! + tips for troubleshooting

Thank you for this very useful tool!

Here's a tip if you have the same error as me (on win10/Fairphone2/android6)

if you're stuck on the second line

* daemon started successfully

try replacing bin/adb.exe with a recent version (download from android dev page, platform-tools, then try it in cmd with "adb.exe devices")
[Android Apps and Games] helen2:
do u know if the tool works olso with kitkat 4.4.4 but with whatsap is version 2.18.230. have allready the backup files on my computer(I have saved them before flashing new stock firmware) so I neade only the key and then with whatsap viewer I will get back all files/chat and pics.

ok nothing happening look at the pic stops on that line .I use windows 7 I gave disablet UAC so I dnt neade to give any permition.How I get it working?

Any help?

Let me know

Thanks'

Helen
[Android Apps and Games] Alan8941:
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
rm failed for -f, No such file or directory
Restore complete
Cleaning up
Done

The script said it failed to install legacy whatsapp, made a backup of current whatsapp, removed and then failed to restore with insufficient storage error. But somehow everything still working for now.
[Android Apps and Games] striderx07:
I Have Followed The Same Steps But in the Extracted Folder I have Got Only One File File Name is placeholder.There was a success Message shown In the Extractor please help me
[Android Apps and Games] thetool:
Failed, and data lost.

Had to restore to the last day backup...

Log - run from PowerShell:

Removing WhatsApp 2.18.230 2.11.1 skipping data

Success

Removal complete

Installing legacy WhatsApp 2.11.431

5461 KB/s (18329558 bytes in 3.277s)

Failure [-26: Package com.whatsapp new target SDK 19 doesn't support runtime permissions but the old target SDK 23 does.]

Install complete

Now unlock your device and confirm the backup operation.

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

C:\Whats-back\bin\tar.exe: Record size = 2 blocks

C:\Whats-back\bin\tar.exe: apps/com.whatsapp/f/key: Not found in archive

C:\Whats-back\bin\tar.exe: Error exit delayed from previous errors

C:\Whats-back\bin\tar.exe: Record size = 2 blocks

C:\Whats-back\bin\tar.exe: apps/com.whatsapp/db/msgstore.db: Not found in archive

C:\Whats-back\bin\tar.exe: Error exit delayed from previous errors

C:\Whats-back\bin\tar.exe: Record size = 2 blocks

C:\Whats-back\bin\tar.exe: apps/com.whatsapp/db/wa.db: Not found in archive

C:\Whats-back\bin\tar.exe: Error exit delayed from previous errors

C:\Whats-back\bin\tar.exe: Record size = 2 blocks

C:\Whats-back\bin\tar.exe: apps/com.whatsapp/db/axolotl.db: Not found in archive

C:\Whats-back\bin\tar.exe: Error exit delayed from previous errors

C:\Whats-back\bin\tar.exe: Record size = 2 blocks

C:\Whats-back\bin\tar.exe: apps/com.whatsapp/db/chatsettings.db: Not found in archive

C:\Whats-back\bin\tar.exe: Error exit delayed from previous errors

Cleaning up temporary files ...

Done

Restoring WhatsApp 2.18.230 2.11.1

4866 KB/s (32159304 bytes in 6.453s)

Success

Restore complete

Removing WhatsApp 2.18.230 2.11.1 temporary apk

Operation complete
[Android Apps and Games] dangel900:
error whatsapp extractor

I have this error

Traceback (most recent call last):

File "WhatsAppGDExtract.py", line 206, in <module>

main()

File "WhatsAppGDExtract.py", line 187, in main

runMain('info', 'settings', 0)

File "WhatsAppGDExtract.py", line 138, in runMain

drives = gDriveFileMap()

File "WhatsAppGDExtract.py", line 65, in gDriveFileMap

for result in jres['items']:

KeyError: 'items'

help
[Android Apps and Games] Nico074:
I have the same whatsapp version but when i launch WhatsAppKeyDBExtract.bat it start and close by itself and nothing happens. Maybe this tool does not work with whatsapp version 2.18.230?

Can someone help me please???
[Android Apps and Games] zabahbah1:
please help me!

I downloaded the extractor, it seemed to have worked however when I go to the file it says placeholder with nothing in it. I need the key to be able to see my crypt12 files. someone please help me. I have an android samsung note 8 model SM-n95OU
[Android Apps and Games] alecxs:
to all people, i think this thread is dead. parsing error means the older WhatsApp version failed to install. you can try this but i guess it fails on Oreo because google have changed their API deprecation policies
[Android Apps and Games] JotZet79:
WORKS LIKE A CHARM, could not believe it! ;) But finally I have my WhatsApp messages decrypted!

I had an error saying "INSTALL_FAILED_INVALID_APK". After downloading manually from WhatsApp.net (the exact URL is in the batch/shell scritpt) renaming it to LegacyWhatsApp.apk, and storing it under "./tmp" it finally worked (on mac OS x 10.14.2)!
[Android Apps and Games] wolfziz:
Issue with this procedure.

Hello there,

thank you for this guide!

I'm having some issues in following the procedure:

> I downloaded and extracted (maintaining the structure) the "WhatsApp-Key-DB-Extractor-master"

> I installed and run the ADB Drivers

> I activated Debug Mode on my device

> I have Java 7 update 51 on my laptop

I proceed as follow:

1) run ADB drivers (a popup confirming they are running appears!)

2) I run "WhatsAppKeyDBExtract.bat"

3) I plug in my device and unlock the screen

but nothing happens.. in the "WhatsAppKeyDBExtract.bat" I have this message:

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

* daemon started successfully *

And then nothing happens.. Am I missing something?

Could someone help me?

Thanks in advance! ;)

WolfZiz
[Android Apps and Games] dferferfer:
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?
[Android Apps and Games] alecxs:
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
[Android Apps and Games] Nite.Achilles:
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?
[Android Apps and Games] sri2729:
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(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

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
[Android Apps and Games] angues:
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,

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:

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:

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!
[Android Apps and Games] meirtolpin11:
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?
[Android Apps and Games] dany512:
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?
[Android Apps and Games] nioBee:
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:

Update Java to version 8 - 201

Install ADB drivers from this page: 15 seconds ADB Installer v1.4.3

Set Java path in system variables

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

I really don't get how to solve this issue... :eek:

Any help is really appreciated..

Edit: I have found out that the ADB Drivers I was using is obsolete (see this post: https://xdaforums.com/showpost.php?p=78809830&postcount=1456 so I took the platform tools and now it is connecting again to my phone! :good: but I still get errors connected to Java...
[Android Apps and Games] sercankd:
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.
[Android Apps and Games] idcore:
I was able to downgrade app on Oreo 8 (Honor 9) with the following lines (line 1 is probably useless, but i didn't tried without it):

I think trick is to downgrade right after restart... Last line is the one with the old apk, change the path accordingly...

bin\adb.exe shell getprop ro.build.version.release

bin\adb.exe reboot

bin\adb.exe wait-for-device

bin\adb.exe install -r -d tmp\LegacyWhatsApp.apk
[Android Apps and Games] nioBee:
Thank you, for now I'm unable to try because I don't have my phone anymore.

I was indeed able to install whatsapp legacy directly removing the new version but the script didn't work either.. He did the first check on the app, finds the legacy version and exits.. so in the end I just gave up and uninstalled everything.. I had a Drive backup, it wasn't complete, I miss about 1day of messages, but I had spent too much time trying.. ;)

Hope this script gets updated to work on Oreo and Pie.
[Android Apps and Games] Kurumim:
Solution to bin\tar.exe: not found - Windows

Solution to bin\tar.exe: not found - Windows

Please refer to this post for the Unix solution and explanation.

This is a two way solution. First your database will be copied to your cellphone and then to your computer. So you need to have enough free space on your cellphone memory. Just copied my database, needed about 400mb free on the phone.

Solution is applicable to WhatsApp Key/DB Extractor 4.7

1. Open "WhatsAppKeyDBExtract.bat" located in the main directory with a proper editor (i.e. Notepad++)

2. Find these problematic lines of code (lines 112-115 on code version 4.7):

if %sdkver% geq 23 (
bin\adb.exe backup -f tmp\whatsapp.ab com.whatsapp
) else (
bin\adb.exe backup -f tmp\whatsapp.ab -noapk com.whatsapp
)

3. Replace that with:

if %sdkver% geq 23 (
bin\adb.exe shell "bu 1 backup com.whatsapp > /sdcard/whatsapp.ab"
bin\adb.exe pull /sdcard/whatsapp.ab tmp/whatsapp.ab
) else (
bin\adb.exe shell "bu 1 backup -noapk com.whatsapp > /sdcard/whatsapp.ab"
bin\adb.exe pull /sdcard/whatsapp.ab tmp/whatsapp.ab
)

4. Save your .bat file and execute the script.

Thanks to ferraro.dav and angues
[Android Apps and Games] Chitarrista4:
Is there any way I can extract my key from Android Pie?

I've tried modifying this shell script applying the patch by angues, but I've only extracted a 549 bytes whatsapp.ab file. I've tried running abe.jar on this file and I obtained a not encouraging zero-padded 1KB file :D
[Android Apps and Games] dharmil007:
Does this work on Android Pie?
[Android Apps and Games] p4r4d0x86:
Not tested yet on Android Pie :|

If you have access to the phone, make a backup on GD and try WhatsApp-GD-Extractor (?)

Another

commercial

tool could be tried: EXWA (Elcomsoft)
[Android Apps and Games] progman321:
This works on Android v9 and the one above does not work almost surely because the output pipe is not escaped!!! (> should be ^>) but also Android 9 does not allow the 1 argument to the backup/restore utility bu and it should be removed. Hope this helps some:

if %sdkver% geq 23 (

bin\adb.exe shell "bu backup com.whatsapp ^> /sdcard/whatsapp.ab"

bin\adb.exe pull /sdcard/whatsapp.ab tmp/whatsapp.ab

) else (

bin\adb.exe shell "bu backup -noapk com.whatsapp ^> /sdcard/whatsapp.ab"

bin\adb.exe pull /sdcard/whatsapp.ab tmp/whatsapp.ab

)

It still will not fix the error about version 5 - this is a problem with abe (android backup extractor) written in Java and in abe.jar - seems a better extractor needed for the .ab files with this header:

ANDROID BACKUP

5

1

AES-256

Can download the latest abe.jar here: github.com/nelenkov/android-backup-extractor/releases where abe-all.jar should be renamed to abe.jar and replaced in the bin folder version. This fixes errors up to the not found errors as the key and other databases simply are not in the small little ab file made. That is a separate issue however, due to downgrades being not allowed by apps and this error is shown above hence the backup will contain nothing in it and make a bad tar file. But the other fixes are applicable for those that would like to know of them.
[Android Apps and Games] p4r4d0x86:
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 [MENTION=9871247]progman321[/MENTION] for the tips)
[Android Apps and Games] Makorus:
Any news on this? :)
[Android Apps and Games] p4r4d0x86:
I will try this evening/night (ADT - Atlantic Daylight Time / ADST Atlantic Daylight Saving Time ... or currently UTC-3) :p
[Android Apps and Games] p4r4d0x86:
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