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

jar to dex fails #123

Closed
balika011 opened this issue Jun 19, 2016 · 3 comments
Closed

jar to dex fails #123

balika011 opened this issue Jun 19, 2016 · 3 comments

Comments

@balika011
Copy link

`16:25:25 INFO - output directory: file
16:25:25 INFO - converting to dex: file.jar ...
16:25:25 ERROR - jadx error: java class to dex conversion error:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:82)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:279)
at com.android.dx.command.dexer.Main.run(Main.java:245)
at jadx.core.utils.files.JavaToDex.convert(JavaToDex.java:51)
at jadx.core.utils.files.InputFile.loadFromJar(InputFile.java:123)
at jadx.core.utils.files.InputFile.searchDexFiles(InputFile.java:64)
at jadx.core.utils.files.InputFile.addFilesFrom(InputFile.java:34)
at jadx.api.JadxDecompiler.loadFiles(JadxDecompiler.java:121)
at jadx.cli.JadxCLI.processAndSave(JadxCLI.java:29)
at jadx.cli.JadxCLI.main(JadxCLI.java:18)
...while parsing org/a/a/c/b.class

1 error; aborting

jadx.core.utils.exceptions.DecodeException: java class to dex conversion error:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:82)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:279)
at com.android.dx.command.dexer.Main.run(Main.java:245)
at jadx.core.utils.files.JavaToDex.convert(JavaToDex.java:51)
at jadx.core.utils.files.InputFile.loadFromJar(InputFile.java:123)
at jadx.core.utils.files.InputFile.searchDexFiles(InputFile.java:64)
at jadx.core.utils.files.InputFile.addFilesFrom(InputFile.java:34)
at jadx.api.JadxDecompiler.loadFiles(JadxDecompiler.java:121)
at jadx.cli.JadxCLI.processAndSave(JadxCLI.java:29)
at jadx.cli.JadxCLI.main(JadxCLI.java:18)
...while parsing org/a/a/c/b.class

1 error; aborting

    at jadx.core.utils.files.InputFile.loadFromJar(InputFile.java:132) ~[jadx-core-0.6.1-dev-build226.jar:na]
    at jadx.core.utils.files.InputFile.searchDexFiles(InputFile.java:64) ~[jadx-core-0.6.1-dev-build226.jar:na]
    at jadx.core.utils.files.InputFile.addFilesFrom(InputFile.java:34) ~[jadx-core-0.6.1-dev-build226.jar:na]
    at jadx.api.JadxDecompiler.loadFiles(JadxDecompiler.java:121) ~[jadx-core-0.6.1-dev-build226.jar:na]
    at jadx.cli.JadxCLI.processAndSave(JadxCLI.java:29) ~[jadx-cli-0.6.1-dev-build226.jar:na]
    at jadx.cli.JadxCLI.main(JadxCLI.java:18) ~[jadx-cli-0.6.1-dev-build226.jar:na]

Caused by: jadx.core.utils.exceptions.JadxException:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.processClass(Main.java:704)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
at com.android.dx.command.dexer.Main.access$300(Main.java:82)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:632)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:279)
at com.android.dx.command.dexer.Main.run(Main.java:245)
at jadx.core.utils.files.JavaToDex.convert(JavaToDex.java:51)
at jadx.core.utils.files.InputFile.loadFromJar(InputFile.java:123)
at jadx.core.utils.files.InputFile.searchDexFiles(InputFile.java:64)
at jadx.core.utils.files.InputFile.addFilesFrom(InputFile.java:34)
at jadx.api.JadxDecompiler.loadFiles(JadxDecompiler.java:121)
at jadx.cli.JadxCLI.processAndSave(JadxCLI.java:29)
at jadx.cli.JadxCLI.main(JadxCLI.java:18)
...while parsing org/a/a/c/b.class

1 error; aborting

    at jadx.core.utils.files.InputFile.loadFromJar(InputFile.java:125) ~[jadx-core-0.6.1-dev-build226.jar:na]
    ... 5 common frames omitted`
@a3349384
Copy link

a3349384 commented May 9, 2017

+1

@asashour
Copy link
Contributor

Which Java version is used? Do you have sample APK?

@skylot
Copy link
Owner

skylot commented Mar 26, 2019

From class version 34 looks like this is Java 8, now jadx can convert this version, but don't support some instructions for new features like lambdas (see #384)

@skylot skylot closed this as completed Mar 26, 2019
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

No branches or pull requests

4 participants