What's new

Closed Modify apk

Status
Not open for further replies.

zildjianfritzie

Eternal Poster
Joined
Jan 22, 2017
Posts
224
Reaction
373
Points
265
Hey Guys an' Girls!
Anyway, so when I first learnt how to decompile, modify then recompile .apks I found it was a rather slow process and figured out a far faster way.I searched google and xda many times and couldn't find my method anywhere. So without further ado, let's go through an easy, simple, step by step guide on how to modify .apk files!

Step 1 - Getting the .apk

Firstly, of course, you will need to obtain the .apk file that you want to edit. There are two methods to do this:

a) If you have the recovery flashable zip for the rom you are currently on, simply open it up, navigate to the file you want to edit (in my casesystem -> app -> settings.apk) and drag the .apk file onto your desktop.

b) Using root browser or a similar app on your device, navigate to the .apk you wish to edit and copy it onto your sdcard. Then connect to your computer and copy the file from your phone to the computer.

Step 2 - Editing/Modifying your .apk

Now is the important part. Install Winrar by clicking the link. You do not have permission to view the full content of this post. Log in or register now. Then open the .apk by right clicking the file -> open with -> WinRar. Now you can look around the .apk file. Find a file inside the .apk you wish to edit. (In my case I'm going to navigate to res -> mipmap-hdpi -> ic_launcher_settings.png). Just drag the file from the .apk and edit to your liking.

NOTE: It is recommended never to completely take everything out of the .apk and then put it all back in. Just do one file at a time.

Then when your finished, select the old file in the .apk and press the delete button. Now drag in the new edited file into where you found it. Easy!

Step 3 - Putting the new .apk back where it belongs

Now of course, your going to have to put it back on your device to see the changes in effect, there's no point having it on your computer! There are two ways to go about this:

a) Open up your rom and navigate to the place where you took your .apk file from. Click on the old .apk file and press the delete button. Now drag your new edited .apk file into the zip. Then connect your device to your computer and drag the rom onto the sdcard and flash it via recovery. Now reboot the system and see your change/s in effect!

b) Copy your new .apk file from your computer to your device. Then, using Root browser or a similar app, navigate to the old .apk file and look at the permisions. (eg. RW--r--) Now delete the old file and replace with the new, but make sure to set the permissions the same as they were before. Now Simply reboot and see your change/s in effect!

NOTE: For some .apk files (eg. Framework-res.apk) there might be missing folders inside the .apk (eg. Values).

xda forum
 
Status
Not open for further replies.
Back
Top