New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix issues #293 and #299 #302
base: master
Are you sure you want to change the base?
Conversation
quote apk tool command quote dex2jar command
quote decompilers commands
It seems like your code has some issues running on python 3.6 vs python 2.7. This is most likely because of the unicode/str/bytes that each version of the language does. If you can fix these, I would be happy to merge. |
This PR works and fix my problems (Windows 10, Python 3.6.8). |
@nwalsh1995 and @ViperLiu Please take needful to close this bug. This issue is occurred to me but when I had updated my decompiler.py and external_decompiler.py file according to @ViperLiu. It is working fine. |
@@ -203,7 +203,7 @@ def _run_dex2jar(self): | |||
|
|||
log.debug("Running dex2jar with command %s", dex2jar_command) | |||
try: | |||
ret_code = subprocess.call(shlex.split(dex2jar_command)) | |||
ret_code = subprocess.call(shlex.split(dex2jar_command.decode(encoding="utf-8"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ensure backward compatibility with python2.7 (unfortunately has reach EOL prior to Jan 2021), simply check the type of the dex2jar_command
variable using isinstance(dex2jar_command, bytes)
. If the check fails, simply run subprocess.call(shlex.split(dex2jar_command))
instead.
fix issues #293 and #299