Tomek Kondrat · Dec 18, 2013 at 08:30 pm

GetJava Helps You Convert APKs into Java Projects

Android is an operating system that uses a lot of programming languages. The most common languages are Java (or Android Java if you prefer), C, XML, Bash, as well as a few more. Android applications can be decompiled by APKTool and a few similar tools, and their output is Smali. I know that many of you will disagree with me, but Smali is quite complicated language—much more than Java.

There are two tools that can convert Smali back to Java: Dex2Jar and JAD. They are pretty hard to use, though, and need some experience to use them properly. Luckily, XDA Recognized Developer broodplank1337 created a simple bash script, that does all the work for us. This script can get all necessary dependencies, as well as get the Java code straight from APK. It works on Linux only, but I’m quite sure that can be used on non UNIX-like systems like Windows with Cygwin. The developer recommends that you put the file in ~/bin and make it executable. Further instructions are available in the thread.

Sometimes scripts can make life a lot easier. If you are interested in the project, make your way to the original thread to get more information and learn how to convert assembler code into Java.

Note: Tools like this should be used for educational purposes. “Borrowing” code from applications (paid or free) is unethical and should not take place. They are closed source for a reason. Keep that in mind.


_________
Want something on the XDA Portal? Send us a tip!

Tomek Kondrat

eagleeyetom is an editor on XDA-Developers, the largest community for Android users. Tomek is the only Polish moderator on XDA Developers. He graduated from the University of Warmia and Mazury in Olsztyn with a degree in journalism and public communication in 2013. He's a big fan of football (not hand egg), post rock and cooking. A total addict of mobile technology, especially Android. Currently flashes dozens of custom ROMs on his OPO. View eagleeyetom's posts and articles here.
Chris Gilliam · May 29, 2015 at 11:29 am · 1 comment

I/O Summary: Google Cardboard Virtual Reality

One year ago, Google introduced cardboard. Amazingly enough, that was all it took to fire up the Virtual Reality scene on Android, and what began as an open design concept exploded into thousands of apps and dozens of headsets from big and small vendors alike. Now, there are more than 1 million cardboard viewers/handsets - a Google-quoted number that might not even be accurate given the ease with which headsets can be rigged through off-the-shelf equipment. This year, cardboard returned...

XDA NEWS
Jimmy McGee · May 29, 2015 at 06:00 am · 4 comments

Android M Preview Images – XDA TV

Android M preview images are available. That and much more news is covered by Jordan when he reviews all the important stories from this week. Included in this week's news is the announcement of Google's Project Tango going on sale and be sure to check out the article talking about Google's Roboto font going open source. That's not all that's covered in today's video! Jordan talks about the other videos released this week on XDA TV. XDA TV Producer TK...

XDA NEWS
Mathew Brack · May 28, 2015 at 09:59 pm · 6 comments

I/O Summary: How Android M Handles Power And Charging

In the spirit of improving the core Android experience, Google is changing Android M to be smarter about managing power. Their new Doze feature comprises of two primary roles which allow Android to use motion detection in order to predict activity, and go into deep sleep at the right time based on accelerometer readings.   In order to extend your screen off battery life, Android M will now monitor your activity levels and if it detects that your device has...

XDA NEWS
Share This