Android APK unpack and analyze the Source Code
I needed to view the cource code to get some controls of the app.
Therefore, I summarized what I did for it.
How to get the Source Code(Extract & Analyze)
- Rename the APK files extension *.apk -> *.zip
- unzip the file.zip from 1.
- Find the file “classes.dex” in the unzipped folder. Then, convert it to *.java file using the command below in windows command prompt.
- “classes-dex2jar.jar” file will be created.
- Launch “jd-gui.exe” and drag the file from 4. to the “Java Decompiler” window
- The classes including source codes will be shown. Export the files from “File -> Save all sources”
1. Go to official web site(http://jd.benow.ca/)
2. Switch the tag below “JD-GUI”, from “Overview” to “Download”
3. Download links by OS will be shown. Click the one for Windows OS.
4. Unzip the zip file and click “jd-gui.exe” to launch.
5. To get the extracted source codes, drag the files you want to analyze, such as *.jar files into the window.
If you have any issue, please feel free to leave a comment!