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

General Tech Bugs & Fixes 2 years ago

0 3 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (3)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

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

profilepic.png
manpreet 2 years ago

Hiii...

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.


0 views   0 shares

profilepic.png
manpreet 2 years 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!

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community