Package: wakdbe
WhatsApp Key/Database ExtractorExtract key/msgstore.db from /data/data/com.whatsapp in Android v4.0+ without root.About the ProjectBuilt WithGetting StartedPrerequisitesInstallationStandalone OperationsFeatures & ToDoDemoTroubleshootingLimitationsContributingLicenseAgreementContactAbout The ProjectThis project is inspired byEliteAndroidApps/WhatsApp-Key-DB-Extractor. Since Android v4.0+ Google has removed adb backup and apps no longer supported being backed up by "adb backup -f myApp.ab -apk com.foobar.app". However there is one catch in this scenario and that is some old version of many apps including WhatsApp support that to this day, and that's the idea...The idea is to install "Legacy Version" of WhatsApp on you device via adb and use "adb backup"  to fetch files from "/data/data/com.whatsapp" folder which includes both the 'key' and 'msgstore.db' (non encrypted) file and after that restore current WhatsApp.Built WithPythonBash(for Linux and OS X)Depends onJava(To extract backup)Getting StartedBefore doing anything take a backup of your chats and turn off your phone's internet so you don't lose any new messages.
For that go to 'WhatsApp Settings → Chat Settings → Chat Backup' here take a local bacakup. Prepare for Worst.Afterintallationfollow on screen instructions.PrerequisitesO/S: Any Windows/Mac/Linux.Python 3.xJavaUSB Debugging must be enabled on the target device. Settings → Developer Options → USB debugging.If you cannot find Developer Options then please go to: Settings → About phone/device and tap the Build number multiple times until you're finally declared a developer.Android device with Android 4.0 or higher. i.e. Ice Cream Sandwich, Jelly Bean, KitKat, Lollipop, Marshmallow, Nougat, Oreo, Pie, Q.InstallationDownload and install.pipinstallwakdbeInstall dependencies (for linux and OSX only) : skipsudofor mac.**TODO**
chmod+xbin/linux_dependencies.sh
sudo./bin/linux_dependencies.shIf you're getting any error while running above command you need to install the following manually for your linux distro. :adbcurltaropenjdk117zipscrcpyUnleash the beastpython3-mwakdbe-hCommand Line FlagsShortFlagTypeBehaviourStatus-ar--allow-rebootOptionalBoolReboots device before installing Legacy WhatsApp.Stable-tip--tcp-ip IP_ADDRESSOptionalStringConnects to a remote device via TCP mode.Stable-tp--tcp-port PORTOptionalStringPort number to connect to. Default : 5555.Stable-s--scrcpyOptionalBoolShow device screen as a window using ScrCpy.Stable-to--tar-onlyOptionalBoolGet ALL files as a tarball instead of main files from whatsapp backup.BetaExample usage :python3-mwakdbe--allow-reboot--tcp-ip192.168.43.130--tcp-port5555--scrcpy--tar-onlypython3-mwakdbe-ar-tip192.168.43.130-tp5555-s-toStandalone OperationsThese operations are standalone implementation of their defined task. One should run these when specifically needed. For ex : Process finished but WhatsApp was not reinstalled on device.Runview_extract: To unpack whatsapp.ab to whatsapp.tar and extract files.python3 -m wakdbe.view_extractIMP : For this to work there should be 'whatsapp.ab' file either in 'extracted/' folder or in 'tmp' folder in your directory.Runprotect: To compress/decompress user folder with(out) password for safekeeping.python3 -m wakdbe.protectIMP : For this to work there should either be "userName" folder or "userName.7z" file in 'extracted' folder in current directory. Where "userName" is name of user you entered earlier.Runrestore_whatsapp: To reinstall WhatsApp on device.python3 -m wakdbe.restore_whatsappFeatures & ToDo🟢 Extracts msgstore.db from /data/data/com.whatsapp. (duh)🟢 Works wirelessly without USB cable using "ADB over TCP" with--tcp-ip IP --tcp-port PORTflags.🟢 See and control your android phone with your computer usingScrCpyusing--scrcpyflag.🟢 Works with any android device v4.0+ so far.🟢 Works with any android device no matter where it is in universe as long as it is running ADB over TCP.🟢 Moves msgstore.db to your phone.🟢 Creates password protected 7z file so keep your extraction safe.🟢 Continues without JAVA installed and make "whatsapp.tar" out of "whatsapp.ab" once java is installed by runningpython3 -m wakdbe.view_extract.🟢 Command line arguments🟢 ADB Devices menu.🟢 Implement datetime.🟢 Extracts backup created over TCP.🔴 Works with WhatsApp Business.Demohttps://github.com/YuvrajRaghuvanshiS/WhatsApp-Key-Database-Extractor/discussions/33TroubleshootingIf runningpython3 -m wa_kdbeor any other file is throwing error like "python3 is recognised as interal or external command." AND python3 is "already added to path (in case of windows)" try running files withpy -m wa_kdbeinstead.If list is empty close terminal, remove and replug the device, and re-run the script.Read more.If you have never used USB Debugging before, you may also need to verify the fingerprint by ticking the checkbox and tapping 'allow' on device popup.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!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.WhatsApp crashing? Runpython3 -m wakdbe.restore_whatsapp. Or "clear data/storage" / uninstall and reinstall from Play Store.In MIUI, "Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]" occurs during installation of LegacyWhatsapp.apk, fix it byallowing install via adbIf "[INSTALL_FAILED_VERSION_DOWNGRADE]" run with--allow-rebootflag.python3 -m wa_kdbe --allow-rebootIf "[INSTALL_PARSE_FAILED_NOT_APK]" delete helpers/LegacyWhatsApp.apk and re-run.If "adb: error: cannot create 'tmp/WhatsAppbackup.apk': Permission denied" on macOS run script withsudo.sudo python3 -m wa_kdbeLimitationsThere always are limitations on how much we can make it work  and this is what allows us to keep going. Well no matter what I do sometimes this tool just won't work on some devices and if that's your case you can trythis fork of MarcoG3's WhatsDumpbyAlessandro Maggio.ContributingContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make aregreatly appreciated.Fork the project on GitHub.Create your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)"Draft" a pull request and mark it "Ready for review" once work is done.Other ways to contribute is to buy me a coffee but let's just say it is to test out new features of the project.Checkoutfeatures/fastto test backup and reinstallation of WhatsApp on device level.This makes it quite time saving specially in case of TCP.LicenseDistributed under the MIT License. SeeLICENSEfor more information.AgreementI made this project because it was hard for me to kill time and the other one was very old.
This tool is provided "as-is" and hence you will be responsible however you use it. Cheers☕ContactYuvraj Raghuvanshi -Send me a mailProject Link:https://github.com/yuvrajraghuvanshis/WhatsApp-Key-Database-Extractor