Search code examples
javajarapkdexdex2jar

Dex2Jar-API usage example


I'm trying to create an application for APK-analysis written in Java.

I need to add source code viewing option to my application. To my mind, best way for this is to somehow use Dex2Jar project, that has API and Maven repository, but I don't know how to use it (convert DEX file to JAR using Dex2Jar API, for example).

Please, help me to find out the best way to explore the source code of DEX file using Java.

Thanks for help!


Solution

  • You might consider looking at the enjarify project as well. Both dex2jar and enjarify only get you java bytecode though. You'll still need to decompile that to get something like java source code.

    For decompilation, you could try the fernflower project, which is a mirror of the decompiler that IntelliJ IDEA uses for its decompiled class view.