Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ViperLiu
Copy link

@ViperLiu ViperLiu commented Jan 16, 2019

fix issues #293 and #299

@nwalsh1995
Copy link
Contributor

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.

@vizzdoom
Copy link

This PR works and fix my problems (Windows 10, Python 3.6.8).

@testSatya007
Copy link

@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")))

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants