|
|
Steps To Extract Source Code (JAVA & XML) From An Android APK File
- Dex2Jar or from here (For JAVA Code)
- Java Decompiler or from here (For JAVA Code)
- APK TOOL or from here
- APK Install or from here
- Extract all the pre - requistics files.
- Download your apk file and paste it on your desktop.
- Rename your application (.apk to .zip) i.e. (ex: techiesnet.apk to techiesnet.zip)
- Now extract the techiesnet.zip file.
- Open the Techies Net folder, there you will find the classes.dex file.
- Copy the classes.dex file and paste it in Dex2jar folder.
- Now open the command prompt (Run -> Cmd -> Enter). There locate the cmd to your folder (ex: cd C:\Users\Shoeb Ahmad Fareed\Desktop\dex2jar-0.0.9.15)
- Enter a command "dex2jar classes.dex" -> Enter
- Automatically classes_dex2jar.jar file will be created.
- Now to go to Jd-Gui folder (Dex Compiler) -> Open jd-gui.exe
- Go to File -> Open File and Locate the classes_dex2jar.jar file from Dex2jar folder
- All the source will be displayed. Go to File -> Save all sources
- By this you will get the source code of your application
- Create a XML folder on desktop. In that folder paste Apk tool, Apk install and android apk (techiesnet.apk) in that folder. (See the screenshot below)
- Now open command prompt -> Locate your XML folder using the command "cd C:\Users\Shoeb Ahmad Fareed\Desktop\XML" -> Enter
- There write the command "apktool d Techiesnet.apk" -> Enter
- (Note: Replace Techiesnet with your application name)
- Once all the process is completed. A folder with your application name will be created containing All the XML files.
- As now you have got both android source code (java) and (XML). Combine them, and you can easily import the folder in your Android Development Tools using your Android_Manifest.xml file.
- We think, you enjoyed the topic. Please let us know if you have queries.