please wait

  • Atul Kasana Dec-06-2018 06:35:33 AM ( 5 months ago )

    How do I get source code for various Android applications for free?

  • Vikrant Srivastava Dec-06-2018 06:46:28 AM ( 5 months ago )


    It's pretty easy reverse engineering an apk file.
    First of all rename the file extention from .apk to .zip and extract files inside. You will get the res folder and AndroidManifest.xml, some other files and classes.dex. The xml files are not readable yet.
    Second, download a tool called dex2jar(Google, and download from Google Code page). Now place the classes.dex file inside the dex2jar folder and run "./ classes.dex" and you will get a jar file. This contains all of the java code that the application has. Download a tool called jdgui and use that to extract the actual java files from the jar files.
    Now that you have the source code, you need the xml files, resources etc. For that, download apktool from thier Google code page. Use the instructions given in the readme file to decompile the apk file. You will get the smali code and xml files.
    Now copy the source code and xml files to get a complete android project. Enjoy!
    These instructions will only work for Linux systems. There is no way that I'm aware to this on Windows machine. So you can run a VM of Linux if you are using windows. Also the instructions are not meant to be used for piracy, copyright violations and I absolve myself from all responsibility should you choose to do the same.

  • Jai Khanna Dec-06-2018 06:49:16 AM ( 5 months ago )

    Basically you:

    1. Use apktool to get the resource files out of the apk
    2. Use dex2jar to get a jar file that contains the classes in a format that Eclipse will like.
    3. Create an Eclipse project point it at the resource files and the new jar file
    4. Open the jar file with a zip utility and delete the existing resources
    5. Open the jar file with JDGui to view the source code
    6. Take whatever source code you need from JDGui, stick it in a class inside Eclipse and modify it
    7. Delete that class from the jar file (so you don't have the same class defined multiple times)
    8. Run it.
      Good Luck!

Please login

Similar Discussion

Recommended For You