TUTORIAL - Swapping out PNG's in .apk

Search This thread

itiskonrad

Senior Member
Dec 5, 2009
361
307
Google Pixel 6 Pro
Swapping out PNG's!

**This is for system apk's, not for market ones. To modify apps you've downloaded and installed, you will need a program like the fantastic Apk Manager, since non-system apps are signed and have to be resigned after getting messed with**

*MY TYPICAL DISCLAIMER!*
I AM NOT A DEV! I just like tinkering with this phone because I'm overall an extremely picky and obsessive person. I have no prior android experience (besides a little tinkering with my X10), and am in NO way an expert. But since I know how to mess with my phone a little bit and I've been asked to share, I will =) But follow these instructions at your own risk! I am not responsible for the untimely death of your phone, so please be cautious and careful, and if you have any questions about any step, before you try it, ask me or someone who knows! I don't want the blood of your dead phone on my hands! It's Christmas, after all! =)
These instructions are for Windows computers. Sorry, I'm just not familiar with mac or linux. =(


***Swapping out PNG's***

Okay, so say you have an icon or an image in your phone that you just don't like and would like to swap out with something (or swap out with nothing, so you can't see it at all). Here is what you'll need:

7zip for your computer
Root explorer for your phone
Some kind of image editor. I'm partial towards Paint.net. =) (Only if you're actually going to edit an image. If you're just going to swap it out for something else, you obviously won't need this.)

Here is a good example of something where I really felt like I needed to change some images we can use that I just discovered last night while calling to activate my credit card over the phone. Here is the dialer when you start the phone:

2011-12-25094409.png


Notice those handy letters next to the numbers =)
Once I started the call to the credit card company, it asked me to verify myself by inputting, using the keypad, the letters of my mother's maiden name. So I opened the dialer, and what did I see?

2011-12-25094421.png


For whatever STUPID STUPID REASON, they REMOVE the letters next to the numbers on the keypad that opens DURING the call, making it extremely difficult for me to type my mother's maiden name in the time permitted, given that no, I don't off the top of my head know where the letters sit on the dialer. So I felt this needed fixing =)

1.) Copy the apk you want to modify from your phone (using root explorer) and transfer to your computer

In this case, I wanted my Phone.apk, which is in /system/app. The vast majority of system apps are in this folder with the major exception of framework-res.apk, which is the phone’s BIG cajone in /system/framework, and as such, should be handled with utmost care. Messing with framework-res.apk incorrectly is an EASY way to brick your phone in a heartbeat.

2.) Unzip the apk using 7zip and look for your PNG's!

Keep the original, untouched, zipped apk somewhere safe on your computer. You’re going to need one to modify and another copy for safekeeping in case you want to revert back to the stock apk, or something goes wrong. Unzipping the apk just makes searching for the PNG you’re looking for much easier, since you can change the folder view in windows to give you a thumbnail of each of the items. And lookee, lookee, here they are in phone/res/drawable-hdpi, right next to other dial buttons with those handy letters!!

dialerpngs.png


3.) Edit your PNG's however you want.

In this case, the work is pretty much done for us! I just swapped out the PNG's without the letters for copies of the ones with the letters, and just changed the names of the files to the original versions, like so:

Dialerpngswithletters.png


4.) Using 7zip, right click on the original, untouched apk, choose 7zip, and open archive. DO NOT EXTRACT.

Open archive will let you explore the apk without having to extract it and lose the proper packaging of the apk.

5.) Select all your newly modified PNG’s and drag and drop them into the correct location in the open archive of the original apk, letting them overwrite the old PNG’s.

6.) Put this newly modified apk back onto your phone. Using root explorer, copy the new apk into the /system folder of your phone.

7.) CHANGE THE PERMISSIONS of the apk to match those of the original apk in /system/app.

In this case, long press on the phone.apk, select permissions, and select the check boxes as follows- Owner: Read, Write; Group: Read; Others: Read. This matches the permissions of phone.apk in /system/app

8.) Move the new apk into /system/app, and let it overwrite the original!

9.) Restart your phone!

Voila! Now when I call my credit card company and have to type in names, I can!

2011-12-25103547.png
 
Last edited:

hyelton

Recognized Contributor
May 26, 2010
13,958
6,233
31
Wilmington
Well I cant use it:/ Anything I try I get Access Denied! Using Windows 7. Getting it with 7-zip and Winrar same error just access denied or storage full when trying to copy over a PNG.
 

PMad

Senior Member
Well I cant use it:/ Anything I try I get Access Denied! Using Windows 7. Getting it with 7-zip and Winrar same error just access denied or storage full when trying to copy over a PNG.

You need to copy the file to your SD card, no other place.. And when using Root Explorer, you have to make sure that when your in the System/app folder, you have to tap the button at the top of the screen that says "Mount R/W" and when you do, the button will change to "Mount R/O", that will allow you to modify things in that folder.

---------- Post added at 06:23 PM ---------- Previous post was at 06:15 PM ----------

Here's my problem:

I follow the instructions to the T, after changing the permissions of the file, i paste it in the System/App folder and immediately the phone app starts force closing, constantly non stop. I have to hold the power button to bring up the menu and mash the force close button as fast as i can until my finger ends up hitting the power off button that is underneath the force close button, than i can hit the ok button and restart. When i do that and the phone boots back up, some phone storage thing force closes a few times, then after a few minutes the phone app itself force closes, and regardless of anything, my modifications are never there!

If i try to call anybody, my phone loads skype and calls, and if i try to call voicemail, i get ANOTHER force close, android.process.acore

Also, my phone is stuck with no signal, probably why skype tries to load..

I'm assuming this is because my phone is completely stock with root? I need to deodex it to do this stuff right?
 
Last edited:
  • Like
Reactions: Ace King 34

PMad

Senior Member
Ok so I did it again, but this time, instead of making my own custom PNG files, i copied the ones with the letters, renamed them to the names of the ones without the letters, pasted them back, overwrote them, added them to the APK, and put it back on the phone.. Same problems happened, but i noticed something.

When changing the permissions of the file in Root Explorer, they dont stick.. Once i open up the permissions window again they are back to the way they were before, so i can only change the permissions of the file after copying it over and rebooting. I have all the same problems as before, except once i change the permissions of the file and reboot, everything seems to work fine once the phone is fully booted up, and the changes stuck.

So seems there's an issue with something im doing with the new PNG files, or 7zip isnt reconstructing the file 100% back to normal but close, or something... Either way, now im off to one change at a time! ugg...
 

iJimaniac

Senior Member
Oct 19, 2011
1,365
418
Okay, so nice tutorial! I am just wondering since you say framework-Res.apk is so dangerous, are you saying I could brick my device using this method, or is this method fine? I am not going to mess with the .9 pngs, just regular pngs.
 

itiskonrad

Senior Member
Dec 5, 2009
361
307
Google Pixel 6 Pro
This method is fine, but you have to be very careful to follow the protocol precisely (in particular, the parts about using root explorer and changing permissions properly). If you have any questions, please ask. And as usual, be sure to have both a nandroid and titanium backup of your phone juuust in case of the unexpected...
 

Ticklefish

Inactive Recognized Themer
Oct 27, 2011
6,773
8,633
Hampshire, UK
Okay, so nice tutorial! I am just wondering since you say framework-Res.apk is so dangerous, are you saying I could brick my device using this method, or is this method fine? I am not going to mess with the .9 pngs, just regular pngs.

.9 png's aren't that bad, as long as you know what to do with them.

To put in one simple line....don't touch the 1 pixel wide border around the edge!!

That's it really. The border isn't part of the image, it's instructions for stretching the image. As long as you avoid changing it, you can change the actual image itself as much as you like.
 

Pankaj05

Member
Jun 19, 2012
10
1
Hey.....thank u for the tutorial.....
i tried replacing the png's in Framework-res.apk.....there was a change in the size of the apk :confused:
and when i copied it in system/framework phone wont boot....but am able to go into recovery..... :rolleyes:
 

DrDank

Senior Member
Apr 17, 2013
80
8
Shelby
Just wondering if this would still work? I see its from back in 2011 and last thing I seen on it was 2013.. --- Might give this a try
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Swapping out PNG's!

    **This is for system apk's, not for market ones. To modify apps you've downloaded and installed, you will need a program like the fantastic Apk Manager, since non-system apps are signed and have to be resigned after getting messed with**

    *MY TYPICAL DISCLAIMER!*
    I AM NOT A DEV! I just like tinkering with this phone because I'm overall an extremely picky and obsessive person. I have no prior android experience (besides a little tinkering with my X10), and am in NO way an expert. But since I know how to mess with my phone a little bit and I've been asked to share, I will =) But follow these instructions at your own risk! I am not responsible for the untimely death of your phone, so please be cautious and careful, and if you have any questions about any step, before you try it, ask me or someone who knows! I don't want the blood of your dead phone on my hands! It's Christmas, after all! =)
    These instructions are for Windows computers. Sorry, I'm just not familiar with mac or linux. =(


    ***Swapping out PNG's***

    Okay, so say you have an icon or an image in your phone that you just don't like and would like to swap out with something (or swap out with nothing, so you can't see it at all). Here is what you'll need:

    7zip for your computer
    Root explorer for your phone
    Some kind of image editor. I'm partial towards Paint.net. =) (Only if you're actually going to edit an image. If you're just going to swap it out for something else, you obviously won't need this.)

    Here is a good example of something where I really felt like I needed to change some images we can use that I just discovered last night while calling to activate my credit card over the phone. Here is the dialer when you start the phone:

    2011-12-25094409.png


    Notice those handy letters next to the numbers =)
    Once I started the call to the credit card company, it asked me to verify myself by inputting, using the keypad, the letters of my mother's maiden name. So I opened the dialer, and what did I see?

    2011-12-25094421.png


    For whatever STUPID STUPID REASON, they REMOVE the letters next to the numbers on the keypad that opens DURING the call, making it extremely difficult for me to type my mother's maiden name in the time permitted, given that no, I don't off the top of my head know where the letters sit on the dialer. So I felt this needed fixing =)

    1.) Copy the apk you want to modify from your phone (using root explorer) and transfer to your computer

    In this case, I wanted my Phone.apk, which is in /system/app. The vast majority of system apps are in this folder with the major exception of framework-res.apk, which is the phone’s BIG cajone in /system/framework, and as such, should be handled with utmost care. Messing with framework-res.apk incorrectly is an EASY way to brick your phone in a heartbeat.

    2.) Unzip the apk using 7zip and look for your PNG's!

    Keep the original, untouched, zipped apk somewhere safe on your computer. You’re going to need one to modify and another copy for safekeeping in case you want to revert back to the stock apk, or something goes wrong. Unzipping the apk just makes searching for the PNG you’re looking for much easier, since you can change the folder view in windows to give you a thumbnail of each of the items. And lookee, lookee, here they are in phone/res/drawable-hdpi, right next to other dial buttons with those handy letters!!

    dialerpngs.png


    3.) Edit your PNG's however you want.

    In this case, the work is pretty much done for us! I just swapped out the PNG's without the letters for copies of the ones with the letters, and just changed the names of the files to the original versions, like so:

    Dialerpngswithletters.png


    4.) Using 7zip, right click on the original, untouched apk, choose 7zip, and open archive. DO NOT EXTRACT.

    Open archive will let you explore the apk without having to extract it and lose the proper packaging of the apk.

    5.) Select all your newly modified PNG’s and drag and drop them into the correct location in the open archive of the original apk, letting them overwrite the old PNG’s.

    6.) Put this newly modified apk back onto your phone. Using root explorer, copy the new apk into the /system folder of your phone.

    7.) CHANGE THE PERMISSIONS of the apk to match those of the original apk in /system/app.

    In this case, long press on the phone.apk, select permissions, and select the check boxes as follows- Owner: Read, Write; Group: Read; Others: Read. This matches the permissions of phone.apk in /system/app

    8.) Move the new apk into /system/app, and let it overwrite the original!

    9.) Restart your phone!

    Voila! Now when I call my credit card company and have to type in names, I can!

    2011-12-25103547.png
    1
    Well I cant use it:/ Anything I try I get Access Denied! Using Windows 7. Getting it with 7-zip and Winrar same error just access denied or storage full when trying to copy over a PNG.

    You need to copy the file to your SD card, no other place.. And when using Root Explorer, you have to make sure that when your in the System/app folder, you have to tap the button at the top of the screen that says "Mount R/W" and when you do, the button will change to "Mount R/O", that will allow you to modify things in that folder.

    ---------- Post added at 06:23 PM ---------- Previous post was at 06:15 PM ----------

    Here's my problem:

    I follow the instructions to the T, after changing the permissions of the file, i paste it in the System/App folder and immediately the phone app starts force closing, constantly non stop. I have to hold the power button to bring up the menu and mash the force close button as fast as i can until my finger ends up hitting the power off button that is underneath the force close button, than i can hit the ok button and restart. When i do that and the phone boots back up, some phone storage thing force closes a few times, then after a few minutes the phone app itself force closes, and regardless of anything, my modifications are never there!

    If i try to call anybody, my phone loads skype and calls, and if i try to call voicemail, i get ANOTHER force close, android.process.acore

    Also, my phone is stuck with no signal, probably why skype tries to load..

    I'm assuming this is because my phone is completely stock with root? I need to deodex it to do this stuff right?