MarcoG3 / WhatsDump

Extract WhatsApp private key from any non-rooted Android device (Android 7+ supported)
https://plainsec.org
GNU Lesser General Public License v3.0
269 stars 56 forks source link

Error on ADB version #7

Open p5panam opened 5 years ago

p5panam commented 5 years ago

I have this error... any ideas to fix it?

[INFO] Starting emulator... emulator: WARNING: Crash service did not start

HAX is working and emulator runs in fast virt mode. emulator: Cold boot: requested by the user [INFO] Trying to register phone on emulator... (may take few minutes) [INFO] Installing WhatsApp... [INFO] Cleaning WhatsApp... [INFO] Moving extracted database into emulator... Traceback (most recent call last): File "whatsdump.py", line 244, in main() File "whatsdump.py", line 227, in main wa_emu.register_phone(msgstore_path, phone.country_code, phone.national_number, args.wa_verify, wa_code_callback) File "C:\Python27\src\whatsapp.py", line 76, in register_phone vc = tools.get_viewclient() File "C:\Python27\src\tools.py", line 13, in get_viewclient vc_adb = VcAdbClient(self.adb_client.serial) File "C:\Python27\lib\site-packages\com\dtmilano\android\adb\adbclient.py", line 187, in init self.checkVersion(ignoreversioncheck) File "C:\Python27\lib\site-packages\com\dtmilano\android\adb\adbclient.py", line 384, in checkVersion "ERROR: Incorrect ADB server version %s (expecting one of %s)" % (version, VALID_ADB_VERSIONS)) RuntimeError: ERROR: Incorrect ADB server version 00040029 (expecting one of ['00040028', '00040027', '00040024', '00040023', '00040020', '0004001f'])

MarcoG3 commented 5 years ago

Looks like some ADB version check that 3rd party module is making. Should be fixed in 1e20fd1

p5panam commented 5 years ago

Seems another check is required on another file. "adbclient.py"

HAX is working and emulator runs in fast virt mode. emulator: Cold boot: requested by the user [INFO] Trying to register phone on emulator... (may take few minutes) [INFO] Installing WhatsApp... [INFO] Cleaning WhatsApp... [INFO] Moving extracted database into emulator... 9999 Traceback (most recent call last): File "whatsdump.py", line 244, in main() File "whatsdump.py", line 227, in main wa_emu.register_phone(msgstore_path, phone.country_code, phone.national_number, args.wa_verify, wa_code_callback) File "C:\Python27\src\whatsapp.py", line 76, in register_phone vc = tools.get_viewclient() File "C:\Python27\src\tools.py", line 18, in get_viewclient return ViewClient(device=vc_adb, serialno=self.adb_client.serial, useuiautomatorhelper=True) File "C:\Python27\lib\site-packages\com\dtmilano\android\viewclient.py", line 2577, in init self.uiAutomatorHelper = UiAutomatorHelper(device) File "C:\Python27\lib\site-packages\com\dtmilano\android\uiautomator\uiautomatorhelper.py", line 128, in init self.runTests() File "C:\Python27\lib\site-packages\com\dtmilano\android\uiautomator\uiautomatorhelper.py", line 187, in runTests newAdbClient = AdbClient(self.adbClient.serialno, self.adbClient.hostname, self.adbClient.port, timeout=None) File "C:\Python27\lib\site-packages\com\dtmilano\android\adb\adbclient.py", line 187, in init self.checkVersion(ignoreversioncheck) File "C:\Python27\lib\site-packages\com\dtmilano\android\adb\adbclient.py", line 384, in checkVersion "ERROR: Incorrect ADB server version %s (expecting one of %s)" % (version, VALID_ADB_VERSIONS)) RuntimeError: ERROR: Incorrect ADB server version 00040029 (expecting one of ['00040028', '00040027', '00040024', '00040023', '00040020', '0004001f'])

MarcoG3 commented 5 years ago

Can you tell me the OS you're using? Also, please paste the content of the file in WhatsApp-Dump/android-sdk/platform-tools/source.properties so I can take a look at SDK version. Since the 3rd party module is not very flexible, I guess a downgrade to a supported SDK would be needed.

p5panam commented 5 years ago

i fixed adding on adbclient.py at line 380 Just add that version on the list.

VALID_ADB_VERSIONS = ["00040029", "00040028",

Seems working, i receive registration number, but then appears: [INFO] Dialog message: Verifying [ERROR] Exception in verification: Cannot find restore button, is msgcrypt associated with +xxx?

Somehow the last part is not working

ghost commented 5 years ago

I had the same error, add 40020029 too, to fix it.

MarcoG3 commented 5 years ago

This needs a more robust bugfix, I will commit a fix as soon as I have some free time.