[Q] Decompile, Edit Code and Re-compile to APK for android - Android Q&A, Help & Troubleshooting

Hello everyone
I have a question, first look at what I did.
I want to edit code of apk.
First, I use dex2jar. I can convert from APK to JAR file.
Second, I use JD. I can convert from JAR to Java source code.
Then I am trying to import these code into eclipse (or other editors) but it is not working.
Is there any possible way to edit the code?
I know we can edit smali but I think it is so much difficult.
I would be easier if I can edit in java source code and compile again to APK.
Thanks

Please use the Q&A Forum for questions Thanks
Moving to Q&A

It's not that easy. You can decompile (dex2jar & jd) the code to read it, do some research, etc. but this is a one way trip. If you want to modify something you will have to learn smali.

so, you mean the only way to modify code is smali?

Related

[Q] Decompiling the "classes.dex" file for BIDI support

Hi All,
I'm a noob ROM developer and I want to create a new Rom based on
one of the great Roms here on this forum and add it support for RTL languages so it can support correct display of numbers when displaying an RTL lang.
As I understand I need to somehow decompile the "classes.dex" so I can edit the code in it and compile it again.
How can I achieve this? Maybe I can the original source code of it so I don't need to decompile?
I'm experienced with c++ and Java Android apps development but don't have a clue from where to start roms development.
Appreciated your help,
Thanks,
Oren

[Q] How to compile .apk?

I'm a graphic designer and I'd love to start making themes for the SGS2 but I don't know how to create the APKs, specifically, the SystemUI.apk. I've read up about it but haven't found anything helpful.
Could someone write a guide on how to do it or give me a link to one?
Could i recomend looking at VRTheme, see this post and this post, this way you dont have to build apks in the traditional sense.
You will want apktool to decompile apks, then edit, then use it again to recompile.

[Q] Smali -> Java

I know it is possible to convert Java source to Smali, but is it possible the other way around? I'm kind of new with Android developing and I am reverse engineering apps to see how everything works in the Android platform, but can't do so with Smali. Any suggestions?
Don't think you can convert smali > java, but you can convert classes.dex (compiled form found in APK) to java. Use something like 7zip or WinRAR to extract "classes.dex" from the APK you are looking at then use dex2jar from here: https://code.google.com/p/dex2jar/downloads/list to convert the classes.dex file to a .jar file. (if you're on windows, just drag "classes.dex" onto "dex2jar.bat". On Linux, usage might be a little different, probably just open a terminal and type something like "./dex2jar.sh classes.dex").
Then you can open the .jar file with JD-GUI from here: http://java.decompiler.free.fr/?q=jdgui
Does it convert it perfectly to Java, or is it broken code?
shawngriffin said:
Does it convert it perfectly to Java, or is it broken code?
Click to expand...
Click to collapse
Seems OK to me, but I don't really know Java. Function names seem to be changed. Doesn't take long for you to try it yourself and see though
Okay I will. Thank you for your help
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Thanks ✟
Moving to Q&A

[Q] Modifying Smali Code and recompile it.

I have read all the threads on the topic of decompiling APK file and recompiling it, and so far I am successful in decompiling and recompiling it.And now I want to make some changes in smali files like change package name and remove some features, But I don't know smali language, so Is there a way that I can convert smali files into Android JAVA project which I can import into Eclipse or I must have to learn smali language to achieve what I want.
Thanks in Advance
decompilerr said:
I have read all the threads on the topic of decompiling APK file and recompiling it, and so far I am successful in decompiling and recompiling it.And now I want to make some changes in smali files like change package name and remove some features, But I don't know smali language, so Is there a way that I can convert smali files into Android JAVA project which I can import into Eclipse or I must have to learn smali language to achieve what I want.
Thanks in Advance
Click to expand...
Click to collapse
It can be done with smali also ....
Only thing is you need to be tricky ....[emoji6]
Am not writing the procedure here coz changing package name doesn't sounds good for me [emoji1] I always respect efforts of original developers (some kangers always do change name and remove some features and claim the apk as theirs in generally am saying don't get hurted )
So I just want to confirm that changing package name and removing some features is possible via smali editing no need to convert the apk to java source .......
Press Thanks Button If You like My Work & Posts?

[Help] IDE for edit code Android System

Hi all,
I'm a new bie in Platform Android Development, i have a problem, hope you help me resolve it.
I downloaded source code Android System to build my own ROM, i use Notepad++ to edit code, but it not easy, and i want to add source code to a IDE for edit code easily. But i didnt find an IDE for it.
Any one used it?

Categories

Resources