Skip to content

Unexpected end of data after trying "Taking out main files in "tmp/" folder temporarily" #128

@russandro

Description

@russandro

Description of the bug:
Literally the title.

To Reproduce:

  1. run 'wa_kdbe'
  2. Enter all the required data
  3. See error

Expected behavior:
The extraction of main files in the tmp/ folder

Screenshots:
image

Terminal output or log file:

====== Logging starts here. ====== 
File: wa_kdbe.py
Date: Tuesday 06/08/2024, 08:52:30
If you see any password here then do let know @github.com/YuvrajRaghuvanshiS/WhatsApp-Key-Database-Extractor



[Tuesday 06/08/2024, 08:52:30] >>> I am in device_serial_id.init(mode=USB, tcp_ip, tcp_port=)
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.main()
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.check_bin()
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.show_banner()

================================================================================
========                Current release date: 21/04/2022                ========
========                                                                ========
========  db   d8b   db  .d8b.         db   dD d8888b. d8888b. d88888b  ========
========  88   I8I   88 d8' `8b        88 ,8P' 88  `8D 88  `8D 88'      ========
========  88   I8I   88 88ooo88        88,8P   88   88 88oooY' 88ooooo  ========
========  Y8   I8I   88 88~~~88 C8888D 88`8b   88   88 88~~~b. 88~~~~~  ========
========  `8b d8'8b d8' 88   88        88 `88. 88  .8D 88   8D 88.      ========
========   `8b8' `8d8'  YP   YP        YP   YD Y8888D' Y8888P' Y88888P  ========
========                                                                ========
================================================================================

============ WhatsApp Key / Database Extrator for non-rooted Android ===========

================================================================================
===                                                                          ===
===  xxxxx  PLEASE TAKE WHATSAPP CHAT BACKUP BEFORE GETTING STARTED.  xxxxx  ===
===                                                                          ===
===     For that go to "WhatsApp settings \u2192 Chat Settings \u2192 Chat Backup"     ===
===              here take a local backup. Prepare for Worst.                ===
===                                                                          ===
===  Also if you see a folder "Android/media/com.whatsapp" copy it somewhere ===
===   safe. New versions of WhatsApp are saving data here INCLUDING IMAGES   ===
===       AND VIDEOS. I try to save it while uninstalling WhatsApp but       ===
===                        YOU CAN NEVER BE TOO SAFE.                        ===
===                                                                          ===
===     This script can extract your WhatsApp msgstore.db (non crypt12,      ===
===   un-encrypted file) and your "key" file from "/data/data/com.whatsapp"  ===
===  directory in Android 4.0+ device without root access. However you need  ===
===   to have JAVA installed on your system in order to "view the extract".  ===
===  If you don't have JAVA installed then you can "view extract" later by   ===
===   running "view_extract.py". The idea is to install a "Legacy WhatsApp"  ===
===       temporarily on your device in order to get the android backup      ===
===    permission. You should not lose any data and your current WhatsApp    ===
===   version will be installed after this process so don't panic and don't  ===
=== stop this script while it's working. However if something fails you can  ===
===    run "restore_whatsapp.py" and reinstall current WhatsApp or simply    ===
===                    update that from Google Play Store.                   ===
===                                                                          ===
===                      Script by: Yuvraj Raghuvanshi                       ===
===                      Github.com/YuvrajRaghuvanshiS                       ===
================================================================================
    
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.check_java()
[Tuesday 06/08/2024, 08:52:30] Found Java v1.8.0_421 installed on system. Continuing...

[Tuesday 06/08/2024, 08:52:30] Arguments passed: Namespace(allow_reboot=False, tcp_ip=None, tcp_port='5555', scrcpy=False, tar_only=False)
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.get_sys_info()
[Tuesday 06/08/2024, 08:52:30] System Info: {
  "Architecture": "AMD64",
  "Hostname": "DESKTOP-ULUQVFJ",
  "Platform": "Windows",
  "Platform Release": "10",
  "Platform Version": "10.0.19045",
  "Processor": "Intel64 Family 6 Model 158 Stepping 13, GenuineIntel",
  "RAM": "16 GB",
  "Python": [
    "tags/v3.12.4:8e8a4ba",
    "Jun  6 2024 19:30:16"
  ]
}
[Tuesday 06/08/2024, 08:52:30] Turned off wifi and mobile data...
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.run_scrcpy(_is_scrcpy=False)
[Tuesday 06/08/2024, 08:52:30] �Please read above instructions carefully \u2191 . Continue? (default y): y


[Tuesday 06/08/2024, 08:52:30] �If you haven't already, it is advised to take a WhatsApp chat backup by going to "WhatsApp settings \u2192 Chat Settings \u2192 Chat Backup". Hit "Enter" key to continue.
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.usb_mode()
[Tuesday 06/08/2024, 08:52:30] >>> I am in handler.handler(adb=bin\adb.exe -s 7TIZWSJRIBD6NZHQ)
[Tuesday 06/08/2024, 08:52:30] Connected to DN2103
[Tuesday 06/08/2024, 08:52:30] >>> I am in handler.after_connect(adb=bin\adb.exe -s 7TIZWSJRIBD6NZHQ)
Starting new HTTPS connection (1): web.archive.org:443
https://web.archive.org:443 "HEAD /web/20141111030303if_/http://www.whatsapp.com/android/current/WhatsApp.apk HTTP/11" 200 0
[Tuesday 06/08/2024, 08:52:30] WhatsApp v2.24.15.78 installed on device
[Tuesday 06/08/2024, 08:52:30] Found legacy WhatsApp V2.11.431 apk in "helpers" folder
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.real_deal(sdk_version=33, whatsapp_apk_path_in_device=/data/app/~~Y_E8sSd1gQ9cLa9-Byc0Bw==/com.whatsapp-RsQFU52G6M6gRKyXWhhLGg==/base.apk, version_name=2.24.15.78)
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.backup_whatsapp_apk(sdk_version=33, version_name=2.24.15.78, whatsapp_apk_path_in_device=/data/app/~~Y_E8sSd1gQ9cLa9-Byc0Bw==/com.whatsapp-RsQFU52G6M6gRKyXWhhLGg==/base.apk)
[Tuesday 06/08/2024, 08:52:30] Backing up WhatsApp 2.24.15.78 apk, the one installed on device to "/data/local/tmp/WhatsAppbackup.apk" in your phone.
[Tuesday 06/08/2024, 08:52:30] Apk backup is completed.
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.uninstall_whatsapp(sdk_version=33)
[Tuesday 06/08/2024, 08:52:30] Uninstalling WhatsApp, skipping data.
[Tuesday 06/08/2024, 08:52:30] Uninstalled.
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.install_legacy(sdk_version=33)
[Tuesday 06/08/2024, 08:52:30] Installing legacy WhatsApp V2.11.431, hold tight now.
[Tuesday 06/08/2024, 08:52:30] Installation Complete.
[Tuesday 06/08/2024, 08:52:30] Starting: Intent { cmp=com.whatsapp/.Main }
[Tuesday 06/08/2024, 08:52:30] Running legacy WhatsApp, it may crash, do not check for updates if it prompts.
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.backup_whatsapp_data_as_ab(sdk_version=33)
[Tuesday 06/08/2024, 08:52:30] Backing up WhatsApp data as "tmp/whatsapp.ab". May take time, don't panic.
[Tuesday 06/08/2024, 08:52:30] Done backing up data. Size: 129855182 bytes.
[Tuesday 06/08/2024, 08:52:30] >>> I am in wa_kdbe.reinstall_whatsapp()
[Tuesday 06/08/2024, 08:52:30] Reinstalling original WhatsApp.
[Tuesday 06/08/2024, 08:52:30] Reinstallation complete.


[Tuesday 06/08/2024, 08:52:30] �Our work with device has finished, it is safe to remove it now.


[Tuesday 06/08/2024, 08:52:30] >>> I am in view_extract.extract_ab(is_java_installed=True, is_tar_only=False)
[Tuesday 06/08/2024, 08:52:30] Found "whatsapp.ab" in "tmp" folder. Continuing... Size: 129855182 bytes.
[Tuesday 06/08/2024, 08:52:30] Enter a name for this user (default "user").: user
[Tuesday 06/08/2024, 08:52:30] Enter same password which you entered on device when prompted earlier.: ********
[Tuesday 06/08/2024, 08:52:30] Successfully unpacked "tmp/whatsapp.ab" to "tmp/whatsapp.tar". Size: 297535488 bytes.
[Tuesday 06/08/2024, 08:52:30] >>> I am in view_extract.taking_out_main_files(username=user)
[Tuesday 06/08/2024, 08:52:30] Taking out main files in "tmp/" folder temporarily.
[Tuesday 06/08/2024, 08:52:30] unexpected end of data
[Tuesday 06/08/2024, 08:52:30] >>> I am in view_extract.clean_tmp()
[Tuesday 06/08/2024, 08:52:30] Cleaning up "tmp/" folder...
[Tuesday 06/08/2024, 08:52:30] Could not delete "tmp/" folder...
[Tuesday 06/08/2024, 08:52:30] [WinError 32] Impossibile accedere al file. Il file è utilizzato da un altro processo: 'tmp/whatsapp.tar'
[Tuesday 06/08/2024, 08:52:30] Delete it manually, it's important.
[Tuesday 06/08/2024, 08:52:30] >>> I am in view_extract.kill_me(reason=)


[Tuesday 06/08/2024, 08:52:30] Exiting...
[Tuesday 06/08/2024, 08:52:30] Turn off USB debugging [and USB debugging (Security Settings)] if you're done.

Additional context:
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions