How to break the Android APK file to analyze the source code in classes.dex?

We could break the Android APK file to analyze the source code available in the classes.dex using the dex2jar utility tool based on the below steps;

Download the dex2jar utility from github https://github.com/pxb1988/dex2jar

1. Rename the .APK as .ZIP
2. Take the ‘classes.dex’ from the zip folder
3. Move the classes.dex to the dex2jar utility location Ex: D:\ROB\dex reader\dex2jar-0.0.9.15\dex2jar-0.0.9.15
4. Set classpath = “JDK path” to use the dex2jar utility
5. Use the following command to convert the classes.dex to JAR file

dex2jar

Break the class file to visualize the source code

Download the jd-gui utility from github https://github.com/java-decompiler/jd-gui

We could break the class file to analyze the source code in the dex2jar utility location based on the below steps;

1. Open the jd-gui.exe utility and select the classes_dex2jar.jar file from the dex2jar utility location by selecting the open option under the file menu
2. Expand the packages to visualize the classes source code

jdgui

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s