codehasan / dex2c

🎇 AOT compiler to translate dalvikvm code into cpp code
Apache License 2.0
172 stars 40 forks source link

Fix: 'tools' is not recognized as an internal or external command #4

Closed AbhiTheModder closed 10 months ago

AbhiTheModder commented 1 year ago

Fixed:

'tools' is not recognized as an internal or external command,
operable program or batch file.
[ERROR   ] dcc: Compile input.apk failed!
Traceback (most recent call last):
  File "C:\Users\local\Pictures\Camera Roll\dex2c\dcc.py", line 1013, in <module>
    dcc_main(
  File "C:\Users\local\Pictures\Camera Roll\dex2c\dcc.py", line 786, in dcc_main
    decompiled_dir = ApkTool.decompile(apkfile)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\local\Pictures\Camera Roll\dex2c\dcc.py", line 116, in decompile
    check_call([APKTOOL2, 'd', '-r', '-f', '-o', outdir, apk])
  File "C:\Python311\Lib\subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['tools/apktool.bat', 'd', '-r', '-f', '-o', '.tmp\\dcc-apktool-mce9V8fh', 'input.apk']' returned non-zero exit status 1.
Command '['tools/apktool.bat', 'd', '-r', '-f', '-o', '.tmp\\dcc-apktool-mce9V8fh', 'input.apk']' returned non-zero exit status 1.

It would be better if we just use these from base/main directory

codehasan commented 1 year ago

I will look into this error and if there is no other way around to fix this problem. Your changes will be merged.