DECOMPILING DEX INTO JAVA SOURCECODE

Royce Roy

Total Post:149

Points:1043
Posted by  Royce Roy
 1013  View(s)
Ratings:
Rate this:
How can one decompile Android DEX (VM bytecode) files into corresponding Java sourcecode?
  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: decompiling DEX into Java sourcecode

    Get these tools:

    1) dex2jar, which is made by a Chinese student. It will translate dex files to jar files

    2) jd-gui to view the java files in the jar

    The source code is quite readable as dex2jar makes some optimizations.

    Procedure:

    And here's the procedure on how to decompile:

    Step 1:

    Convert classes.dex in test_apk-debug.apk to test_apk-debug_dex2jar.jar

    d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk
    Note: In the Windows machines all the .sh scripts are replaced by .bat scripts

    Step 2:

    Open the jar in JD-GUI

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!