Posts How to extract java code from apk
Post
Cancel

How to extract java code from apk

Objective

In the tutorial we are going through how we can extract java code from apk file

Tools Required

  1. APK Tool
  2. JD-GUI
  3. dex2jar

Lets get into command part

  • Extracting apk data

    • apktool.jar d <name_of_apk>.apk

      Note: The folder generated contain everything other than Java files will go to java in next step

  • Converting apk to jar

    • d2j-dex2jar <name_of_apk>.apk
    • This above command converts apk file to jar file
  • Opening java source code

    • Now use jd-gui by double clicking or running java -jar <jd-gui-file-name>.jar
    • Now press ` ctrl+o ` and select converted jar file
    • You can see all packages and class files, when you click on each file the source code will open
    • your screen will be similar as below

Output

Desktop View

Let me know your thoughts in comments section below

This post is licensed under CC BY 4.0 by the author.