linkedin / linkedin/qark

exec command failed -- bug report

Open
#293 6 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
3.4k
Forks
663
PR merge metrics
No merged PRs in 30d

Description

below is error info:

A:\android>qark --apk mojitianqi_7070802.apk
Decompiling...
Error running dex2jar command: b'C:\\\\Users\\\\yougar\\\\AppData\\\\Roaming\\\\
Python\\\\Python36\\\\site-packages\\\\qark\\\\decompiler\\\\..\\\\lib\\\\dex2ja
r-2.0\\\\d2j-dex2jar.bat A:\\\\android\\\\build\\\\qark\\\\classes.dex -o A:\\\\
android\\\\build\\\\qark\\\\mojitianqi_7070802.jar'
Traceback (most recent call last):
File "C:\Users\yougar\AppData\Roaming\Python\Python36\site-packages\qark\decom
piler\decompiler.py", line 217, in _run_dex2jar
ret_code = subprocess.call(shlex.split(dex2jar_command))
File "c:\program files\python36\lib\shlex.py", line 305, in split
return list(lex)
File "c:\program files\python36\lib\shlex.py", line 295, in __next__
token = self.get_token()
File "c:\program files\python36\lib\shlex.py", line 105, in get_token
raw = self.read_token()
File "c:\program files\python36\lib\shlex.py", line 136, in read_token
nextchar = self.instream.read(1)
AttributeError: 'bytes' object has no attribute 'read'
Error running dex2jar command

I change
File "C:\Users\yougar\AppData\Roaming\Python\Python36\site-packages\qark\decom
piler\decompiler.py", line 217, in _run_dex2jar
ret_code = subprocess.call(shlex.split(dex2jar_command))
to
ret_code = subprocess.call(shlex.split(dex2jar_command.decode(encoding="utf-8")))

then fixes it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review qark/decompiler/decompiler.py at line 217 and reproduce the reported qark --apk command on Python 3. Check how the dex2jar command is passed to shlex.split and verify that the command completes without the reported bytes-object error.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, python
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.