decompile and recompile apk
decompile and recompile apk
Instructions:
First, Take any apk file and unpack(decompile) it. This will create an “application” directory
with assets, resources, compiled code, etc.
# To decompile an apk
· apktool d -r -s application.apk
or
· apktool d application.apk
If you wish to decompile any java files, you can do the following:
· dex2jar application/classes.dex
· jd-gui classes-dex2jar.jar
· You can just change the orientation of the main activity in the Manifest file or you can
change the app name from strings.xml file.(just to check the recompiled apk is working
or not)
Once you have made your changes, you need to repack the APK. This will create a
my_application.apkfile:
· apktool b -f -d application
After recompiling (building) the apk the new apk will be generated in Dist folder.
# To generate a key.
# Verify apk
you have a my_application-aligned.apk file, which you can install onto your device.