[TOOL]APK to Java RC2 *UPDATE*

Search This thread

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
APK to Java Release Candidate 2


Review by Adam from XDA-TV:
YouTube Video
The fragment about APK to Java
Article on the XDA Frontpage

apktojava-header-milestone.png


Description:
Since I'm into making Android Apps nowadays, I thought of making this tool to save me (and you) time. So I started coding it and it worked out pretty well so far. The tool can decompiles your selected apk to Java code, to learn from it, so as an educational purpose.
Additionally it also can decompile to smali code and it can decompile the resources of the app. It's currently a very early beta but it works successfully (at least at my computer)
The final version should convert any app successfully to java/smali/resource and an eclipse project, I'm doing my best to make it all work ASAP, if you think I did something wrong in the source or you want to contribute anything please let me know!

Used External Tools (thanks a lot to these developers!):
- 7za (Igor Pavlov)
- apktool (Ryszard Wisniewski, iBotPeaches)
- aapt (Google AOSP Team)
- baksmali-1.4.0 (JesusFreke's)
- jd-gui (Emmanuel Dupuy)
- jad (Pavel Kouznetsov)
- dex2jar (pxb1988)

Requirements:
- JRE 6/7 (I think that's all, but maybe android-sdk is needed, I guess not)


Screenshot:
rc2screen.png




Download:
Version RC2 (check github for changelog):
Mirror #1: broodplank.net
Mirror #2: Mediafire.com

Version RC1 (check github for changelog):
Mirror #1: broodplank.net
Mirror #2: Mediafire.com

Version 0.9 beta (check github for changelog):
Mirror #1: broodplank.net
Mirror #2: Mediafire.com

Version 0.8 beta (check github for changelog):
Mirror #1: broodplank.net
Mirror #2: Mediafire.com

Version 0.7 beta (check github for changelog):
Mirror #1: broodplank.net
Mirror #2: Mediafire.com

Version 0.6 beta (check github for changelog):
Mirror #1: broodplank.net
Mirror #2: Mediafire.com

Version 0.5 beta:
Mirror #1: broodplank.net
Mirror #2: Mediafire.com

Github Sources:
https://github.com/broodplank/APKtoJava


Please let me know how it runs!
 
Last edited:

crybert

Senior Member
Oct 15, 2011
869
2,009
I would suggest to post this in the main android dev thread. There you will get much more attention and more feedback.

Sent from my GT-I9001 using xda app-developers app
 
  • Like
Reactions: NicoTn

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
really great, thanks :laugh:

you should get a recognized contributor and developer, since you develop so many useful programs for us :good:


:good::good::good:i don't have enought words to thank you.... this app it's amazing. THANKS a lot !!! GOOD LUCK !!! :good::good::good:

Haha, you're welcome! I hope you enjoy it :D



really great, thanks :laugh:

you should get a recognized contributor and developer, since you develop so many useful programs for us :good:

You're welcome ^^. And I might get Recognized Developer later, the moment when I received the Recognized Contributor title, the Recognized Developer title was closed for a few months (and still is). So maybe after that time I can get an upgrade :D
 

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
I am happy you purchased i9001 ;)

Hehe, that's just typical me... every device (no matter if it's a smartphone or not) I want to optimize/tweak by default (when I've learned how to do this I always write a tut about it) also I like making little helpfull tools, so when you combine that you get this ;) My goal is to get this uber extended portfolio before I start working in a company, I think that way I can show my skills. (employees won't find AutoIT very special, but it's a start I guess)
 
Last edited:
  • Like
Reactions: leotefo and YMYA

EternalFame

Senior Member
Jan 11, 2011
330
63
Hehe, that's just typical me... every device (no matter if it's a smartphone or not) I want to optimize/tweak by default (when I've learned how to do this I always write a tut about it) also I like making little helpfull tools, so when you combine that you get this ;) My goal is to get this uber extended portfolio before I start working in a company, I think that way I can show my skills. (employees won't find AutoIT very special, but it's a start I guess)

they won't find it usefull since it's just for automatic scripts!
and the syntax is different from important languages :)
i advise you to learn C and then C++ (there you have wxwidgets where you can do the same Windows GUI programms :)

Sent from my Galaxy S Plus using xda app-developers app
 

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
they won't find it usefull since it's just for automatic scripts!
and the syntax is different from important languages :)
i advise you to learn C and then C++ (there you have wxwidgets where you can do the same Windows GUI programms :)

Sent from my Galaxy S Plus using xda app-developers app

My C/C++ is very bad, I'm learning Java now though. Developing Apps (aka java) is very popular at the moment. but I think C/C++ is nicer.
 

EternalFame

Senior Member
Jan 11, 2011
330
63
My C/C++ is very bad, I'm learning Java now though. Developing Apps (aka java) is very popular at the moment. but I think C/C++ is nicer.

java is also a good idea :)
i would also like to learn java and do some simple app coding for android :)
but im too busy with school :p
and right now i have to learn assambler for school xD the syntax is horrible O:

B2T:

your program could be very useful!
 

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
java is also a good idea :)
i would also like to learn java and do some simple app coding for android :)
but im too busy with school :p
and right now i have to learn assambler for school xD the syntax is horrible O:

B2T:

your program could be very useful!

lol assembly? Horrible language, but very close to 0 and 1 ;p
If you know assembly you can hack/crack anything
 

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
Nice work brood :D


Edit: Your next step is to make an option to compile the files again :)

Idd. But first i want a perfect automated process. Its currently not 100% automated so it still needs improvement ;)

Edit: Damnit build 7 also needed a critical fix.. guess build 8 will do the trick? I hope so lol..
Check the fix @ github
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 199
    APK to Java Release Candidate 2


    Review by Adam from XDA-TV:
    YouTube Video
    The fragment about APK to Java
    Article on the XDA Frontpage

    apktojava-header-milestone.png


    Description:
    Since I'm into making Android Apps nowadays, I thought of making this tool to save me (and you) time. So I started coding it and it worked out pretty well so far. The tool can decompiles your selected apk to Java code, to learn from it, so as an educational purpose.
    Additionally it also can decompile to smali code and it can decompile the resources of the app. It's currently a very early beta but it works successfully (at least at my computer)
    The final version should convert any app successfully to java/smali/resource and an eclipse project, I'm doing my best to make it all work ASAP, if you think I did something wrong in the source or you want to contribute anything please let me know!

    Used External Tools (thanks a lot to these developers!):
    - 7za (Igor Pavlov)
    - apktool (Ryszard Wisniewski, iBotPeaches)
    - aapt (Google AOSP Team)
    - baksmali-1.4.0 (JesusFreke's)
    - jd-gui (Emmanuel Dupuy)
    - jad (Pavel Kouznetsov)
    - dex2jar (pxb1988)

    Requirements:
    - JRE 6/7 (I think that's all, but maybe android-sdk is needed, I guess not)


    Screenshot:
    rc2screen.png




    Download:
    Version RC2 (check github for changelog):
    Mirror #1: broodplank.net
    Mirror #2: Mediafire.com

    Version RC1 (check github for changelog):
    Mirror #1: broodplank.net
    Mirror #2: Mediafire.com

    Version 0.9 beta (check github for changelog):
    Mirror #1: broodplank.net
    Mirror #2: Mediafire.com

    Version 0.8 beta (check github for changelog):
    Mirror #1: broodplank.net
    Mirror #2: Mediafire.com

    Version 0.7 beta (check github for changelog):
    Mirror #1: broodplank.net
    Mirror #2: Mediafire.com

    Version 0.6 beta (check github for changelog):
    Mirror #1: broodplank.net
    Mirror #2: Mediafire.com

    Version 0.5 beta:
    Mirror #1: broodplank.net
    Mirror #2: Mediafire.com

    Github Sources:
    https://github.com/broodplank/APKtoJava


    Please let me know how it runs!
    5
    really great, thanks :laugh:

    you should get a recognized contributor and developer, since you develop so many useful programs for us :good:


    :good::good::good:i don't have enought words to thank you.... this app it's amazing. THANKS a lot !!! GOOD LUCK !!! :good::good::good:

    Haha, you're welcome! I hope you enjoy it :D



    really great, thanks :laugh:

    you should get a recognized contributor and developer, since you develop so many useful programs for us :good:

    You're welcome ^^. And I might get Recognized Developer later, the moment when I received the Recognized Contributor title, the Recognized Developer title was closed for a few months (and still is). So maybe after that time I can get an upgrade :D
    4
    Hi Brood,

    Great tool...can you please make SGS3 launcher compatible to GB with this tool?

    thanks

    You might be able to if you do a hell lot of porting and have loads of java knowledge, you can't just do it with this tool, that would be just to easy..

    btw,

    RC2 Pre-Release Commit

    "Added an alternative way of making the java code (JAD), All options are
    now working. Finally able to control JD-GUI completely. updated help
    file and splash."

    https://github.com/broodplank/APKtoJava/commit/a6c6e80bfb68e0bc5bd6233b173cdd0cfa5ddc49

    it's a Pre-Release, but it's finally becoming something :D
    3
    Awesome, i realy want to learn more about android..
    Thanks Brood!

    Thanks :), You've come to the right place for learning more about android :D and you're welcome ^^
    3
    Does it have linux support? If not I can always try VM.

    Unfortunately not, Maybe I will make a new version for linux also :) (I think all the external programs also so support linux)


    Can the Java code be run in an application, browser perhaps? As in, running the app on your computer?

    No, this is no javascript, but java. You can run it in Eclipse for example


    Not to take anything away from the work you've done. But just so other's aren't confused, this is just an automated script/GUI for existing tools. It simply runs dex2jar, apktool, baksmali, etc.. I came into this hoping it was maybe a different decompiler, a better one that might do a better job of de-obfuscating the code. But seeing that it's just an automater/GUI takes away from that.

    Great job on the automater though, and keep up the work towards your education. We all have to start somewhere. :good:

    Yes that's what it does, I also mentioned the external tools used etc, so I think it's already clear that I didn't create an actual APK to Java decompiler, which would take me my whole life to only make a beta version :')

    I used the most accurate tools, to bad JD-Core isn't available, really hate to work with a unnecessary gui which is also not fully controllable for some reason.



    This looks amazing!

    I'm having an error though,

    xlTy.png


    Thanks!

    Thanks, In the current git commit (Early RC1) this problem is fixed. (Some one else mentioned it also, but It's kind of strange I think because I never received any error like that. however, it's fixed now.. (in the commit at least)
    Will release RC1 probably today


    first: thx for your great effort and work!
    one question though: so this does not produce usable and compilable java-code, right? so we can not use this tool to decompile for example a SystemUI.apk, apply our mod to the produced java-code and then recompile it to a working SystemUI.apk?

    greetz n thx,

    sUsH


    You're welcome!, Well actually, It does generate a usable code, but it needs to be edited a little in most cases, I think all apks that are specially built for specific devices such as SystemUI.apk won't work without modifying some code.
    for example, when you want to port a function from an other SystemUI.apk just decompile it, look up the source and paste it in your SystemUI.apk, probably it will have some errors because of invalid variable names or such, but the actually code just keeps intact, so that's the most important thing.


    wow. I'm impressed bro. Good job.

    Thanks, Hope you like the tool^^


    Im new to thread. I've used dex2jar years ago for help with my java II class making android apps for school. So does this just use dex2jar and some other tools to decompile with a GUI. Does this let you put it in eclipse and recompile?

    sent from my now EXTINCT cm10 Disarmed Toaster-.2 Evo 3D via xda app for Android

    Basically it's an automated gui for several external tools yes, I'm still working on the Eclipse function to make the output less buggy, I think making an actual working eclipse project from an apk is the biggest challenge, But remember this is only a beta, so many new versions will release ;)

    Looks amazing, this will really come in handy!

    Thanks! It can become very handy sometimes idd :D