Schwartzblat / WhatsAppPatcher

A patcher that decompiles WhatsApp APK, patches the smali, recompiles and signs it.
163 stars 26 forks source link

[WinError 2] The system cannot find the file specified #75

Closed Darkaxt closed 10 months ago

Darkaxt commented 10 months ago

Following the process indicated in the readme doesn't work. If using -p option it won't detect the file. If using no arguments, as the code indicates, it will download the lastest version from apk mirror but crash on the next step.

` D:\Downloads\Public\WhatsAppPatcher>python main.py

[+] Downloading latest WhatsApp version from apkmirror [+] Running apktool to decompile the apk. Traceback (most recent call last): File "D:\Downloads\Public\WhatsAppPatcher\main.py", line 44, in main() File "D:\Downloads\Public\WhatsAppPatcher\main.py", line 35, in main extractor.extract_apk() File "D:\Downloads\Public\WhatsAppPatcher\whatsapp_patcher\extractor.py", line 21, in extract_apk subprocess.check_call( File "C:\Users\darka\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 408, in check_call retcode = call(*popenargs, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\darka\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 389, in call with Popen(popenargs, **kwargs) as p: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\darka\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\darka\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified `

One key difference found with the readme, is that the main.py is not inside whatsapp_patcher but on a higher level. So it seems that the readme may be outdated.

Darkaxt commented 10 months ago

My error, this is due to java not being detected on the path. I had to reopen cmd. Even though, the last line of the main.py still applies.