Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
dmullins80
Old
#1  
Senior Member - OP
Thanks Meter 0
Posts: 103
Join Date: Mar 2010
Default .png question

Is there a way i can change png files on my phone from my phone? I want to change the calling icon in the framework-res.apk. i found out a way to change it with an app in the market. But i dont know how to put it back in the apk. Help please.
 
stephan1
Old
#2  
stephan1's Avatar
Member
Thanks Meter 0
Posts: 81
Join Date: Apr 2009
Location: Wolfpassing near Tulln
find the picture --> backup it --> put in your picture with the same name and exactly the same bigness (pixels) --> bingo

cheers, stephan1
Htc Touch Pro II

 
dmullins80
Old
#3  
Senior Member - OP
Thanks Meter 0
Posts: 103
Join Date: Mar 2010
its not that easy. any other ideas anybody please.
 
jballz0682
Old
#4  
Member
Thanks Meter 1
Posts: 41
Join Date: Dec 2008
Location: Chicago
Well if the file is a .9.png then it won't be that easy because these files are compiled to binary. (correct me if I'm wrong devs) You will need to do a little more reading to figure this one out. Also, you can't just "unzip" an apk and mess around with the pics and think that it's going to work when you zip it backup. My understanding is that you have to place the file that you are replacing into the compressed(i.e. zipped) apk.

Once again, Devs, correct me if I am wrong but all my info comes straight from using the search button...Try it out

Verizon Wireless

HTC Thunderbolt - Rooted

ASUS Transformer Prime [ICS] - Rooted / Locked Bootloader
(Thanks to Voodoo OTA RootKeeper)
 
.mak
Old
(Last edited by .mak; 20th May 2010 at 12:33 AM.)
#5  
Senior Member
Thanks Meter 6
Posts: 510
Join Date: Mar 2008

 
DONATE TO ME
Quote:
Originally Posted by jballz0682 View Post
Well if the file is a .9.png then it won't be that easy because these files are compiled to binary. (correct me if I'm wrong devs) You will need to do a little more reading to figure this one out. Also, you can't just "unzip" an apk and mess around with the pics and think that it's going to work when you zip it backup. My understanding is that you have to place the file that you are replacing into the compressed(i.e. zipped) apk.

Once again, Devs, correct me if I am wrong but all my info comes straight from using the search button...Try it out
You're right, and wrong. You can unzip an .apk and mess with the images, then rezip it back up and rename it to (yourapk).apk from (yourapk).zip, you just need to sign it when you're done.

I haven't messed with anything entitled ".9.png", but if it's binary then hex editing it is probably the quickest way to edit it, otherwise there is a program called 'apktool' that can decompile apk's and is pretty effective, I've used it a few times


Quote:
Originally Posted by dmullins80 View Post
its not that easy. any other ideas anybody please.
Pull framework-res.apk from your phone, to your computer's desktop. Use Winrar, or a similar archive extracting program, to open the file, then click Extract -> (some folder on your desktop that has nothing else in it)

Find the picture you want to change, make sure your new picture is the same dimensions (e.g; 320x480) and is the same type of file (e.g; .png) and replace the stock image with your custom image.

Once that's done, highlight all files and folders in the root of the folder you extracted framework-res.apk to -> (if using Winrar) Right-Click -> Add to archive -> Change archive type to .zip and click OK -> Right click on your newly created framework-res.zip and change the extension to .apk (you might need to open a windows explorer window and select tools->folder options->view tab->uncheck 'hide extensions for known filetypes).

Once that's done, you'll need to sign your new framework-res.apk. You can do that with EasySign. Download EasySign to your desktop, extract the archive and open a Windows Command Prompt (Start->All Programs->Accessories->Command Prompt). You'll need the Java JDK installed.

Drag your newly created framework-res.apk file into your EasySign folder on your desktop and down the following;

Type the following, assuming you have Windows 7 or Vista:
Code:
cd C:\Users\(your username on your PC)\Desktop\EasySign
You should now see the following;
Code:
C:\Users\(your username on your PC)\Desktop\EasySign>
You should now type the following;
Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 framework-res.apk framework-res_signed.apk
It'll take a moment, then you'll see;
Code:
C:\Users\(your username on your PC)\Desktop\EasySign>java -jar signapk.jar testkey.x509.pem testkey.pk8 framework-res.apk framework-res_signed.apk

C:\Users\(your username on your PC)\Desktop\EasySign>
...and you should now have framework-res_signed.apk in your EasySign folder on your desktop.

Pull it to your desktop and rename it framework-res.apk and put it back where you got it, most likely using adb (if using adb, put it in C:\(your androidsdk folder)\tools and type the following;

Code:
adb remount
adb push framework-res.apk /system/framework
adb reboot
Alternatively, you can place it on your sdcard and use a program like Astro to move it to /system/framework and immediately reboot your phone for the changes to take effect.

Enjoy, it took me like 10 minutes to type this

-mak
HTC Apache (Qwest)-> HTC Mogul (Qwest) -> Blackberry 8330 (Verizon) -> HTC Vogue (Verizon) -> HTC Touch Pro 2 (Verizon) -> HTC Droid Eris (Verizon) -> LG Ally (Verizon) -> Moto Droid (Verizon) -> Moto Droid X (Verizon) -> Palm Centro (Sprint) -> Palm Pixi (Sprint) -> Evo 4G (Sprint) -> HTC Arrive (Sprint) -> Moto Cliq -> MyTouch 4G (T-Mobile) -> LG G2x (T-Mobile) -> Nexus S 4G (Sprint) -> Epic 4G (Sprint) -> Evo 3D -> iPhone 4 (8GB) -> iPhone 4S (64GB) -> Epic Touch 4G -> Galaxy Nexus
 
jadesdan
Old
#6  
jadesdan's Avatar
Senior Member
Thanks Meter 7
Posts: 408
Join Date: Jun 2008
Thanks for the wirte up, (i've been try to do something simaler to this for a while). I got to the end but then I get this error in the cmd window. Any thoughts?


'java' is not recognized as an internal or external command,
operable program or batch file.
 
.mak
Old
#7  
Senior Member
Thanks Meter 6
Posts: 510
Join Date: Mar 2008

 
DONATE TO ME
Quote:
Originally Posted by jadesdan View Post
Thanks for the wirte up, (i've been try to do something simaler to this for a while). I got to the end but then I get this error in the cmd window. Any thoughts?


'java' is not recognized as an internal or external command,
operable program or batch file.
Sorry, I should have mentioned you'll need the Java JDK installed.
HTC Apache (Qwest)-> HTC Mogul (Qwest) -> Blackberry 8330 (Verizon) -> HTC Vogue (Verizon) -> HTC Touch Pro 2 (Verizon) -> HTC Droid Eris (Verizon) -> LG Ally (Verizon) -> Moto Droid (Verizon) -> Moto Droid X (Verizon) -> Palm Centro (Sprint) -> Palm Pixi (Sprint) -> Evo 4G (Sprint) -> HTC Arrive (Sprint) -> Moto Cliq -> MyTouch 4G (T-Mobile) -> LG G2x (T-Mobile) -> Nexus S 4G (Sprint) -> Epic 4G (Sprint) -> Evo 3D -> iPhone 4 (8GB) -> iPhone 4S (64GB) -> Epic Touch 4G -> Galaxy Nexus
 
dianeofarcadia
Old
#8  
dianeofarcadia's Avatar
Senior Member
Thanks Meter 157
Posts: 410
Join Date: May 2008
Location: Northern Michigan
.mak is that the same one by Stericson?
here
sorry if that is slightly OT, just rebuilding the PC setup and need the files, so not sure which one I want to use - his worked last time for me well.
thanks~
 
.mak
Old
#9  
Senior Member
Thanks Meter 6
Posts: 510
Join Date: Mar 2008

 
DONATE TO ME
Quote:
Originally Posted by dianeofarcadia View Post
.mak is that the same one by Stericson?
here
sorry if that is slightly OT, just rebuilding the PC setup and need the files, so not sure which one I want to use - his worked last time for me well.
thanks~
EasySign? I'm not sure, I've only downloaded it from grdlock's site. The one you linked to actually looks easier to use..
HTC Apache (Qwest)-> HTC Mogul (Qwest) -> Blackberry 8330 (Verizon) -> HTC Vogue (Verizon) -> HTC Touch Pro 2 (Verizon) -> HTC Droid Eris (Verizon) -> LG Ally (Verizon) -> Moto Droid (Verizon) -> Moto Droid X (Verizon) -> Palm Centro (Sprint) -> Palm Pixi (Sprint) -> Evo 4G (Sprint) -> HTC Arrive (Sprint) -> Moto Cliq -> MyTouch 4G (T-Mobile) -> LG G2x (T-Mobile) -> Nexus S 4G (Sprint) -> Epic 4G (Sprint) -> Evo 3D -> iPhone 4 (8GB) -> iPhone 4S (64GB) -> Epic Touch 4G -> Galaxy Nexus
 
Magnum72
Old
#10  
Member
Thanks Meter 1
Posts: 45
Join Date: Apr 2010
when you re-zip the file after editing do you use normal compression or store?

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Xposed Framework Module for the AT&T Galaxy S 4

Got yourself a brand new Galaxy S 4? Are you looking for some fun mods to make it truly your … more

Job Interview Prep: Phone Screen Part 1 – XDA Developer TV

XDA Developer TV Producer Jayce has been very busy creating videos to help … more

Auto Test Your Android Apps with Robotium

You’ve just finished coding your very first app, but before you release it to the wild, you … more

Open Source CPU Info App for Windows

So you’re playing with your shiny new Windows 8 tablet PC, when one of your like-minded geeky … more