Reputation: 4205
I'm trying to do something simple. I have an APK file, I want to change a certain variable value in a certain activity, and then recompile it back to APK so I can use it on my android device.
It's been days since I started with it and I can't find any solution for it.
I tried these approaches:
classes.dex
to jar using dex2jar.On a different approach I can't remember how I did it, I was able to get to the activity files, but couldn't understand how to recompile it to APK again.
Please, if you have any idea of how do edit the classes
and the activity, let me know. I have read lots of SO questions and google it so many times but I couldn't find any solution for it. Thanks!
Upvotes: 4
Views: 14606
Reputation: 1148
Use apk-editor.
Apk-editor is app in android That decompile and recompile apk
Upvotes: 1
Reputation: 16399
I suggest you to use APK Studio. You can decompile/recompile apk using it. However, you cannot edit the source in Java. It decompiles in language called smali
. If you need to just change a value, I guess this tool can solve your problem.
Upvotes: 1
Reputation: 731
Using Android apk tool you can able to decompile the existing APK only. You can't recompile it. It will throw error
If you are going to convert dex file to JAR file and JAR file to dex file that also won't work most of the times.
But one solution is available.. "DexPatcher". I tried this one but got stuck in between do to lack of knowledge... You can try "Dexpatcher tool" it will be good. If u got any idea please let me know..
Have a good day
Upvotes: 1