DexException: not support version
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 663
- PR merge metrics
- No merged PRs in 30d
Description
I'm stucked forever in "Running scans", I guess it's a problem with dex2jar
Log:
```
Running dex2jar with command /home/brain4care/.local/lib/python2.7/site-packages/qark/decompiler/../lib/dex2jar-2.0/d2j-dex2jar.sh /home/brain4care/Documents/build/qark/classes.dex -o /home/brain4care/Documents/build/qark/app-release.jar
dex2jar /home/brain4care/Documents/build/qark/classes.dex -> /home/brain4care/Documents/build/qark/app-release.jar
com.googlecode.d2j.DexException: not support version.
at com.googlecode.d2j.reader.DexFileReader.(DexFileReader.java:151)
at com.googlecode.d2j.reader.DexFileReader.(DexFileReader.java:211)
at com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:104)
at com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)
at com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)
Getting java version
Got full java version openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.10.3)
OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.10.3, mixed mode, sharing)
Calling APKTool with following command
java -Djava.awt.headless=true -jar /home/brain4care/.local/lib/python2.7/site-packages/qark/decompiler/../lib/apktool/apktool.jar d /home/brain4care/Desktop/genApk/release/app-release.apk --no-src --force -m --output /home/brain4care/Documents/build/qark/apktool
I: Using Apktool 2.3.1 on app-release.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
S: WARNING: Could not write to (/home/brain4care/.local/share/apktool/framework), using /tmp instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
I: Loading resource table from file: /tmp/1.apk
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying raw classes.dex file...
I: Copying raw classes2.dex file...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
APKTool finish executing, trying to move manifest into proper location
Manifest moved successfully
Removing apktool subdirectory of build
Removed apktool directory
Starting decompilation with cfr
Starting decompilation with procyon
Starting decompilation with fernflower
warn: missing '/home/brain4care/Documents/build/qark/app-release.jar', ignored
error: no sources given
Processing /home/brain4care/Documents/build/qark/app-release.jar (use silent to silence)
Exception analysing jar org.benf.cfr.reader.util.ConfusedCFRException: No such jar file /home/brain4care/Documents/build/qark/app-release.jar
java.io.FileNotFoundException: File not found: /home/brain4care/Documents/build/qark/app-release.jar
at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:220)
at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:141)
Failed to extract fernflower jar with command 'jar xf app-release.jar'
Traceback (most recent call last):
File "/home/brain4care/.local/lib/python2.7/site-packages/qark/decompiler/decompiler.py", line 294, in unpack_fernflower_jar
retcode = subprocess.call(command)
File "/usr/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Running scans...
```
My app is for Nougat users at least, there is a workaround that i can do?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in qark/decompiler/decompiler.py and inspect how the bundled dex2jar script is invoked for classes.dex. Reproduce the failure with the reported dex2jar and Java versions, then determine whether the scan can complete when decompilation succeeds. Done means the unsupported-version failure is handled or resolved and QARK proceeds through scanning without the downstream missing-JAR errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, python
- Domain
- devtools, mobile-dev, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100