Changing icons in taskbar... - Hero CDMA Themes and Apps

What .apk do I need to modify to change the icons in the taskbar? Like battery, signal etc etc...I thought it was in framework-res.apk and i found some icons, but not all...Any ideas? Help...

Nevermind, I figured it out and changed some icons around...

Share the procedure with the rest of us noobs. i would like to give it a try.
Thanks

I'll try and write something up when I get a chance. Im getting busy here at work...ugggh.

Ok, what I did was pulled two files from my phone... com.htc.resources.apk and framework-res.apk. Make sure you download 7-Zip and make a backup of both files just in case. What I suggest is doing a nandroid backup prior to changing around any files. This way it CYA in case something happens. Again, be VERY CAREFUL!! I am NOT responsible for anyone screwing up their phone. DO A NANDROID BACKUP!!! LOL
1. Make sure Android SDK is installed. I have mine installed at c:\android-sdk-windows
2. I extracted both files to the android-sdk-windows\tools folder...like this. Open your command prompt and cd to where SDK is installed...
c:\android-sdk-windows\tools>adb remount
remount succeeded
c:\android-sdk-windows\tools>adb pull /system/framework/com.htc.resources.apk c:\android-sdk-windows\tools
(This should automatically pull the file into your tools folder.)
3.Next I pulled the framwork-res.apk file...
c:\android-sdk-windows\tools>adb pull /system/framework/framework-res.apk c:\android-sdk-windows\tools
(This should automatically pull the file into your tools folder.)
4. Next I opened com.htc.resources.apk with 7-Zip.
- Navigate to the res folder. Then navigate to the drawable-480x320 folder. Lets say you want to change the signal icon, well that icon happens to be cdma_sys_signal_0 - 6.png. You'll see them in the folder. What I did was grabbed some icons from other ROMS and I extracted them and copied them to the .apk. After I copied the icons over I then pushed the file back to my phone like this...
5. c:\android-sdk-windows\tools>adb push com.htc.resources.apk /system/framework/com.htc.resources.apk After a few seconds you'll see that its pushed over.
In the framework-res.apk file the folder you want to look in is \res\drawable\ it has the battery indicators as well as the charging of the battery etc etc...The files in the .apk start with stat_ You pretty much do the same thing like you did with the other .apk. Make sure you push it back to your phone. After you push both files back make sure you reboot by doing the following command...
6. c:\android-sdk-windows\tools>adb shell reboot
Its really easy to do...I had no issues...Have fun. Let me know if you need any assistance.

Your the man, thanks.

Related

[Guide] Hacks and mods: Three tutorials for modifying your x10 OS aesthetically

Updated: July 24/2010 Go to the X10 Theme repo for a listing of uploaded themes.
Thanks to everyone that is helping out and contributing. I also apologize if I rip anything off. If I do please post it and I will definitely correct it.
The usual disclaimer goes with this... Use at your own risk and backup your system before making any changes. You know what to do if you run into problems
I think this is important...
Links for various stuff:
framework-res.apk
/system/app/ folder
startup show (boot animation)
Mms.apk
Phonebook.apk
apps2sd-work in progress?
http://forum.xda-developers.com/showthread.php?p=7037044#post7037044
Many visual aspects of the os and system apps can be changed and surprisingly easily. By default when opening an apk you should look around the res-drawable folders for the pngs to edit. If you have noticed, there are some png's that look like xxx.9.png. To modify these files easily, remove the 9 from the filename and open with your preferred editor. When you are done editing the files save them, open the command prompt and type draw9patch. This should open a window with an arrow in it. Drag your file there and I'm pretty sure it goes into the same folder. That's it.
If you are using a mac use betterzip and take a look here.
You can also use root explorer (I havent tried this myself)
Step 1:
Connect phone to pc, enable usb debugging and open adb. Type:
adb pull /system/framework/framework-res.apk framework-res.apk
That will pull your framework-res.apk to whatever folder is displaying in your command line.
Step 2:
Find the framework-res.apk on your hard drive, right click and open with 7zip.
Step 3:
Use png's here or create your own and dump into the appropriate folder within framework-res.apk.
Step 4:
When you are done editing the files open up adb and type the following command:
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push framework-res.apk /sdcard/framework-res.apk
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
That will put the new framework-res.apk on your phone. It should automatically reboot (if not reboot it) and your changes should be applied!
When running the script above you can replace framework-res.apk with whatever you want. For example, Timescape.apk
Remember, it is CASE sensitive I made this problem many times)
If you would like to pull an entire folder put a slash at the end of the last word. For example, adb pull /system/etc /etc"/" (no " in actual script )
Courtesy of corruptfate is the steps to modify the startupshow (post #207)
step 1: open adb shell
step 2: type "adb shell"
step 3: type "su"
step 4: type "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system"
step 5: type "mkdir system/etc/semc/startupshow"
step 6: exit and redo step 1 - 4
step 7: type "mkdir system/etc/semc/startupshow/default"
step 8: exit and open command prompt again, this time type "ddms"
step 9: look for the default folder in system > etc > semc > startupshow > default
step 10: push the images into that folder
Possible reasons your phone won't boot after modifications:
images anren't stored properly, right format, right size etc.
unpacked apk improperly, use 7zip, it doesn't mess anything up
you signed the package before pushing it- unless you know what you're doing follow the directions to a tee and you should be fine
pushed the package to the wrong directory, /system/framework-res.apk XX, /system/framework/framework-res.apk
I'm sure many other reasons, these were the only ones I encountered
How to get past boot screen:
Use backup framework-res.apk and push that one to your phone. Remember to place that one where the modified one is.
To see if adb sees your phone type adb devices, if a serial number pops up try pushing your original, if not...
Flash your phone again from scratch . Sorry, I don't know any better way yet.
Please post your themes and download themes from the X10 theme repo
The basics:
http://forum.xda-developers.com/showthread.php?t=502010
http://developer.android.com/index.html
http://developer.android.com/guide/developing/device.html
Some Links:
Notification background color
Status bar clock color
Notification font color
Notification bar shortcuts
Edit 9.png's
Install mobile defense as system app through terminal (I haven't tried this yet)
Resigning apps
http://forum.xda-developers.com/showthread.php?t=549109
http://androidforums.com/developer-101/8665-how-signing-roms.html This is the one I have been using. I just noticed its for roms
http://code.google.com/p/android-apktool/ Figured it out but no need for it as of yet
How to modify notification background colors
Some of the files; not sure which is the top band displaying carrier(semc_avctivity_title.9.png??):
statusbar_background.png
status_bar_background.png
status_bar_close_on.9.png
status_bar_header_background.9.png
status_bar_item_background_normal.9.png
They should be in res/drawable-240dpi. Once you find them open them and modify as you wish. Once completed save your changes.
Getting FLAC working, I was wrong, mixed up file folders. Apparently meridian pioneer works. Havent gotten a chance to test for sure yet. I am now trying to manually add flac support to mediascape
Second tutorial: Busting open apks so you can edit xml's!!
So has anyone tried opening up an xml file on their phone to edit only to find incoherent coding. Well I have. So I have stumbled upon a tool called apktool. The tool somehow breaks down the apk into readable xml files. I haven't gotten so far as to test out an edited xml because I wanted to post this so I don't forget how to do it.
1. follow instructions on installing apktool. Unzip the files into your android-sdk-windows/tools folder
2. Put a copy of your framework-res.apk into the same tools folder
3. from command type: java -jar apktool.jar if framework-res.apk
4. Put whatever apk you want to edit into tools folder and type this: java -jar apktool.jar d xxx.apk
5. Look in your tools folder and voila there will be a folder named with whatever apk you worked with.
Third tutorial: Use smali/baksmali to edit services.jar and services.odex
1. follow instructions on downloading and installing smali/baksmali
2. pull these files from your phone and place them into the same folder as smali (should be android-sdk-windows\tools):
code.odex
ext.odex
framework.odex
android.policy.odex
There may be other ones needed that Im missing so if you find this out please let me know
3. place the odex you want to modify into the same folder (android-sdk-windows\tools)
4. from the command line type java -jar baksmali-1.2.3.jar -x services.odex
your pc will work a little bit and when its finished will just show your directory again.
5. minimize that screen and go into the folder you put everything in there should be an out folder. Open it up and all the files to edit will be there!
I haven't recompiled yet but when I do Ill finish this tutorial.
COMMON PROBLEMS:
These are some problems I ran into because I am a noob. I figure it may help a couple people out
1.unable to access apktool.jar/baksmali-1.2.3.jar
Im pretty sure you are in the wrong directory
from the command line type: cd C:\whatever\directory\leadsto\android-sdk-windows\tools\the.jarfileyouaretryingtoaccess
2....
Modification requests:
Custom boot screens-- find your startupshow folder=== SOLVED
custom response to invalid password
Ad hoc support
Disable slide lock
App drawer categorization=== THERE'S AN APP
map hardkeys
cool, gonna try and change the battery indicators
I was able to replace framework-res while the phone was running, but now the phone wont boot.. good thing I made a backup of the original one
xxsashixx said:
I was able to replace framework-res while the phone was running, but now the phone wont boot.. good thing I made a backup of the original one
Click to expand...
Click to collapse
Thats where I'm stuck too. Did you resign the package after modifying it? Im going to try that in a bit.
Does anyone know of a good n00b guide to emulating our phone in eclipse?
@microkiwi can you post how it went?
I did make some new icons in PS, but unfortunately I wasn't able to boot the phone after pushing my new files to it
I also tried to sign it with the autosign (testsign.java) application but no luck...
mikrokiwi said:
I did make some new icons in PS, but unfortunately I wasn't able to boot the phone after pushing my new files to it
I also tried to sign it with the autosign (testsign.java) application but no luck...
Click to expand...
Click to collapse
Cool thanks, hey have you seen an app called metamorph? I just noticed it right now but it seems like stericson automated and simplified the process. Heres a link
http://forum.xda-developers.com/showthread.php?t=591329
Have you tried that app yet?
Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons
Any other metamorph themes that we can install?
I think for 1.6 only
gavriel18 said:
http://code.google.com/p/android-apktool/ Looks cool I just wish I knew how to use it
Click to expand...
Click to collapse
Apktool is just for everything else but signing ;-)
mikrokiwi said:
Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons
Click to expand...
Click to collapse
Could you please upload the theme, I'd like to learn how theming works. In the AndroidThemes thread I found only themes for custom roms. THX !
mikrokiwi said:
Yes, I have made a metamorph theme now and everything seems fine, the theme shows up and I can apply it and everything.
But after reboot the phone is still using the old icons
Click to expand...
Click to collapse
Could you please post the .png files from the framework pull? I would like to change the colors and then try to replace them with files in a theme that I found that might work with our phone. The only issue is the resolution of the theme that I had in mind. If this works then we can all make custom themes for our X10 using that theme as a template. Not sure if it will work, but I would like to try.
pietropizzi said:
Could you please upload the theme, I'd like to learn how theming works. In the AndroidThemes thread I found only themes for custom roms. THX !
Click to expand...
Click to collapse
Unfortunately it does not work at the moment, but when I get it to work I will upload it for everyone to use
troyjamz said:
Could you please post the .png files from the framework pull? I would like to change the colors and then try to replace them with files in a theme that I found that might work with our phone. The only issue is the resolution of the theme that I had in mind. If this works then we can all make custom themes for our X10 using that theme as a template. Not sure if it will work, but I would like to try.
Click to expand...
Click to collapse
http://www.mediafire.com/file/kkmhmnyhgyw/framework-res.apk open it with 7zip
Thx man!
mikrokiwi said:
Unfortunately it does not work at the moment, but when I get it to work I will upload it for everyone to use
http://www.mediafire.com/file/kkmhmnyhgyw/framework-res.apk open it with 7zip
Click to expand...
Click to collapse
Tack så mycket!
@microkiwi Thanks for the upload, do you mind if I post that link in the first post?
@brut.all Does it work the same way as autosign? I followed the instructions properly on installing it but when I try to open it a command line pops up for a second (too fast for me to read) and then closes. Am I missing something?
Also do you know if framework-res.apk needs special signing? I'm just trying to figure out why the phone gets stuck at boot after pushing the modified apk.
@pietropizzi I have made one as well it doesn't work but I'll upload it right away. Check out the metamorph thread for some tutorials on theming. It is surprisingly easy.
On another note has anyone gotten to move their apps to the sdcard? I've tried but with no luck..
heres a post I made about it:
http://forum.xda-developers.com/showthread.php?p=7037044#post7037044
Cool ,I'm going to try it tonight. Mind if I add it to the list at the top?
BTW did anyone know mediascape supports wav audio Swwweeeeeetttt

How to: Transparent Notification/Window Shade in Froyo -

Transparency MOD:
If you want to have a transparent notification window (the window shade), you can follow these steps:
Required:
- a working adb connection (you will need a PC because of the executable below)
- a transparent status_bar_background.png (if you do not have your own, the one i used is attached)
- xUltimate-TP.exe (attached)
- a file archiver (i used WinRAR)
Note: This should work on any Android phone running Froyo.
Firstly, you need to copy services.jar and framework-res.apk from the Android Phone to your PC
1.) Reboot into Recovery (fake-flash, Unrevoked, or adb recovery, they will all work)
2.) adb shell
mount /system
adb pull /system/framework/services.jar c:\
adb pull /system/framework/framework-res.apk c:\
3.) Optional: Copy the framework-res.apk and services.jar files to a separate directory.
4.) Copy xUltimate-TP.exe to the same directory the files mentioned above are located in.
Run xUltimate-TP.exe and wait for it to say it is finnished (it takes about 2 minutes to complete)
5.) Open framework-res.apk in WinRAR and go -> res -> drawable-hdpi-v4
Copy your status_bar_background.png into this folder inside WinRAR by dragging it over the window.
Close WinRAR
6.) Copy the patched services.jar and framework-res.apk to c:\
7.) adb shell
rm /system/framework/services.jar
rm /system/framework/framework-res.apk
**CTRL+C (to exit back to the windows shell)
adb push c:\services.jar /system/framework/services.jar
adb push c:\framework-res.apk /system/framework/framework-res.apk
adb reboot
And that's it.
I have attached my patched services.jar and framework-res.apk
If you are running Defrost 2.0+, using them may work for you (I am using DeFrost 2.4).
Major props to:
http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
as it is his executable that patches the transparency.
Josh.
fllash said:
Hi there,
I apologize if this seems to be the incorrect sub forum to post in, however the thread i made in Themes has no responses after a week or so.
On to my question.
I have flashed many froyo roms for the desire, but they all have one thing in common - they do not have a transparent window shade/notification thingo.
I dismantled a few themes with transparent windowshades, copied them across to my framework-res.apk file and pushed it back to system/framework, but nothing changes. Well, a couple of the png's i have overwrote in the framework-res file caused the window shade to change colour (for example in the theme where the windowshade had a dark transparent background, the background turned black).
Is there a limitation somewhere preventing desire users of froyo to change transparency?
Or is there another file that needs to be edited?
Thanks for readin'
Josh.
Click to expand...
Click to collapse
I've asked the same thing and no one has replied, I assume you mean the notification drawer?
Changing the png file alone doesn't add transparency, it only does on the notification bar, there must be an xml file in framework-res.apk which handles transparency for it, but I'm so inexperienced in xml I haven't tried looking and there's so many xml files it would take days to convert each one to "readable" xml and find which line of code among thousands controls it
I haven't tested it, didn't have the chance, but you can check here
http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
Look for xUltimate Froyo Transparency Fix
Yeah, i mean the notification draw - that you drag downwards.
Thanks for the link, im checking it out right now.
phunkycow said:
I haven't tested it, didn't have the chance, but you can check here
http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
Look for xUltimate Froyo Transparency Fix
Click to expand...
Click to collapse
I tried patching the service.jar with it but it doesn't seem to work.. anyone else have tried too?
sckc23 said:
I tried patching the service.jar with it but it doesn't seem to work.. anyone else have tried too?
Click to expand...
Click to collapse
Did you make sure the background image of the "notification drawer" is transparent? Or applied it using the stock framework-res?
phunkycow,
You are a Genius,
It worked like a charm!
For anyone who is interested, the steps i followed were:
1.) Reboot into Recovery
2.) adb shell
mount /system
adb pull /system/framework/services.jar c:\
3.) Download the Transparency patch (I've attached it if that makes it easier)
4.) Copy the services.jar from c:\ to a folder (i used the desktop), and make sure that the Transparency fix executable (xUltimate-TP.exe) is in the same folder.
5.) Run xUltimate-TP.exe and wait for it to say it is finnished (it takes about 2 minutes to complete)
6.) Copy the patched services.jar (it overwrote the one in the folder) to c:\
7.) adb shell
rm /system/framework/services.jar
**CTRL+C (to exit back to the windows shell)
adb push c:\services.jar /system/framework/services.jar
adb reboot
And that's it.
I have also attached my patched services.jar, and framework-res.apk with a transparent status_bar_background.png.
If you are running Defrost 2.0+, using them may work for you (I am using DeFrost 2.4).
Now, you MAY NOT notice any transparency straight off the bat because your theme may not have a transparent status_bar_background.png.
If you find that it isnt transparent, i have attached a transparent status_bar_background.png
You need to add this to your framework-res.apk.
Major props to:
http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
as it is his executable that patches the transparency.
Josh.
Glad I've helped, even a little. I was lucky enough to bump to that thread accidentally after looking for ways to deodex! You may want to edit the original post with the steps to apply transparency, and maybe edit the title as well? I'm sure other people might be interested as well
phunkycow said:
Did you make sure the background image of the "notification drawer" is transparent? Or applied it using the stock framework-res?
Click to expand...
Click to collapse
I did. I took the background image from Amer v4 (which is transparent) and flashed both the patched service.jar and new image to the phone. The notification panal ended up solid black.
Anyway will definitely try it again to see if i have any luck this time=)
Can someone post a screenshot? I could have sworn I have tried all this already to no avail.
edit: also, I thought that the services.jar patcher mentioned above was for the notification bar. Does this only make the notification bar transparent, or the actual background of the shade (where not covered by notifications)
This method did not work for me, however this one did
http://forum.xda-developers.com/showpost.php?p=7739623&postcount=53
Glacier with Gr8gorillas desire HD port 2.2

Creating a new theme, but how to create a usable update.zip (or other easy methods)

I started a theme the other day, and I'm moving through the files pretty quickly but without context it's hard to know which graphic is which. So I want to flash or apply the current work I'm doing so I can see where things are and how they look.
Right now I'm working through a deodexed version of Froyo so all the files should be in order. Assuming that I strip out all files but the graphics, how do I create a update.zip for it or use any other method? I'm new to Android so any help would be appreciated.
I'm guessing you already have the sdk installed?
chocmatic said:
I'm guessing you already have the sdk installed?
Click to expand...
Click to collapse
Yup. SDK + Eclipse.
Emulator? no?
you can either figure out how to make them Metamorph compatible (sorry, can't give you advice on that, never done it)
Or you can put the images in the correct folder of whatever .apk they go in and make a flashable update.zip, basically replacing the existing .apk's with the full complete modded ones.
You'll need to put all the modded .apk's into a file structure that mimicks where they would be on the phone and zip that structure up with an update_script and sign the update.zip.
I would highly recommend you unzip some small flashable .zip and poke around in it to see the structure and look at the update_script.
This is a download link to a transparent tray mod I did. It replaces ONE .png but because I chose to make it a flashable .zip it requires replacing the framework-res.apk. Except for the actual .apk's you'll need to put in it, this .zip would be perfectly suitable to use as a base for your mods (and you're welcome to use it). If you did use it you would put your .apk's in the system/framework folder, delete the 3 cert files in the META folder, zip the system and META folders into "update.zip" and sign it using an autosign script.
fire away with any questions
ps, you don't need eclipse or the sdk for any of this but you will need an auto-sign script which is one of the tools in Avabox
AFAIK you couldnt use the emulator in the SDK to preview this stuff anyways because you can't get Sense running on the emulator, not to mention the emulator runs SOOOOO SLOOOOWWWWW. Even if you could get Sense running on the em I would bet you would spend less time making a nand, flashing your mods, checking them out and restoring your nand if you didn't like them than using an emulator to preview this stuff.
Award Tour said:
Yup. SDK + Eclipse.
Click to expand...
Click to collapse
Download the attached file and save folder in your tools directory. Then look at sign.txt to sign files
chocmatic said:
Download the attached file and save folder in your tools directory. Then look at sign.txt to sign files
Click to expand...
Click to collapse
Nothings attached.
nebenezer said:
you can either figure out how to make them Metamorph compatible (sorry, can't give you advice on that, never done it)
Or you can put the images in the correct folder of whatever .apk they go in and make a flashable update.zip, basically replacing the existing .apk's with the full complete modded ones.
You'll need to put all the modded .apk's into a file structure that mimicks where they would be on the phone and zip that structure up with an update_script and sign the update.zip.
I would highly recommend you unzip some small flashable .zip and poke around in it to see the structure and look at the update_script.
This is a download link to a transparent tray mod I did. It replaces ONE .png but because I chose to make it a flashable .zip it requires replacing the framework-res.apk. Except for the actual .apk's you'll need to put in it, this .zip would be perfectly suitable to use as a base for your mods (and you're welcome to use it). If you did use it you would put your .apk's in the system/framework folder, delete the 3 cert files in the META folder, zip the system and META folders into "update.zip" and sign it using an autosign script.
fire away with any questions
ps, you don't need eclipse or the sdk for any of this but you will need an auto-sign script which is one of the tools in Avabox
AFAIK you couldnt use the emulator in the SDK to preview this stuff anyways because you can't get Sense running on the emulator, not to mention the emulator runs SOOOOO SLOOOOWWWWW. Even if you could get Sense running on the em I would bet you would spend less time making a nand, flashing your mods, checking them out and restoring your nand if you didn't like them than using an emulator to preview this stuff.
Click to expand...
Click to collapse
Thanks a lot. Seeing the file, it makes sense. In your simple example you modded the framework res APK -- did you have to sign that single APK or was it taken care of when you signed the update.zip? I've modded some apps already and I know that with single APKs you have to sign them so it can be installable again. Don't know if that is needed once you sign the update.zip.
BTW, I can't wait to release this theme. It makes Sense look substantially better.
Award Tour said:
Thanks a lot. Seeing the file, it makes sense. In your simple example you modded the framework res APK -- did you have to sign that single APK or was it taken care of when you signed the update.zip? I've modded some apps already and I know that with single APKs you have to sign them so it can be installable again. Don't know if that is needed once you sign the update.zip.
BTW, I can't wait to release this theme. It makes Sense look substantially better.
Click to expand...
Click to collapse
Actually signing the .apk's is not necessary. If all you're doing is swapping out images just open the .apk's archinve with 7zip (or similar program) and drop the new .png's into the correct folder (almost always res/drawable-hdpi)
Signing the .zip makes it flashable, the .apk is usable whether you sign it into a .zip or not. Actually when you're testing stuff out I find it's much quicker to just push the modified .apk to the phone via usb, I don't make a flashable .zip until it's ready for sharing
If you push a framework file to the phone ADB REBOOT immediately.
Also, don't be surprised if some of your wallpaper gets reset to stock and your google account gets wiped out after reboot, comes with the territory
nebenezer said:
Actually signing the .apk's is not necessary. If all you're doing is swapping out images just open the .apk's archinve with 7zip (or similar program) and drop the new .png's into the correct folder (almost always res/drawable-hdpi)
Signing the .zip makes it flashable, the .apk is usable whether you sign it into a .zip or not. Actually when you're testing stuff out I find it's much quicker to just push the modified .apk to the phone via usb, I don't make a flashable .zip until it's ready for sharing
If you push a framework file to the phone ADB REBOOT immediately.
Also, don't be surprised if some of your wallpaper gets reset to stock and your google account gets wiped out after reboot, comes with the territory
Click to expand...
Click to collapse
Oh okay, I think I'd prefer using ADB too. What command would I use to push the files?
Award Tour said:
Oh okay, I think I'd prefer using ADB too. What command would I use to push the files?
Click to expand...
Click to collapse
this:
Code:
adb remount
adb pull /system/framework/framework-res.apk c:\
then I make my changes to the .apk and:
Code:
adb push c:\framework-res.apk /system/framework
adb reboot
nebenezer said:
this:
Code:
adb remount
adb pull /system/framework/framework-res.apk c:\
then I make my changes to the .apk and:
Code:
adb push c:\framework-res.apk /system/framework
adb reboot
Click to expand...
Click to collapse
Cool, just so it's clear, and I'm sorry to bug, but I'd have to pull (remove I guess)
the file before pushing the new one in?
Award Tour said:
Cool, just so it's clear, and I'm sorry to bug, but I'd have to pull (remove I guess)
the file before pushing the new one in?
Click to expand...
Click to collapse
meh, you can use another compatable copy. I always just pull it first for 2 reasons: 1) I know its the one I'm using at the moment and 2) if you're gonna be using adb it's just convenient to have it right on c:\, less typing
Award Tour said:
Oh okay, I think I'd prefer using ADB too. What command would I use to push the files?
Click to expand...
Click to collapse
adb push <filename> </target dir/targetfilename>
Read this guide, very informative on ADB
SteelH said:
Nothings attached.
Click to expand...
Click to collapse
oops my bad...it's attached now
nebenezer said:
you can either figure out how to make them Metamorph compatible (sorry, can't give you advice on that, never done it)
Or you can put the images in the correct folder of whatever .apk they go in and make a flashable update.zip, basically replacing the existing .apk's with the full complete modded ones.
You'll need to put all the modded .apk's into a file structure that mimicks where they would be on the phone and zip that structure up with an update_script and sign the update.zip.
I would highly recommend you unzip some small flashable .zip and poke around in it to see the structure and look at the update_script.
This is a download link to a transparent tray mod I did. It replaces ONE .png but because I chose to make it a flashable .zip it requires replacing the framework-res.apk. Except for the actual .apk's you'll need to put in it, this .zip would be perfectly suitable to use as a base for your mods (and you're welcome to use it). If you did use it you would put your .apk's in the system/framework folder, delete the 3 cert files in the META folder, zip the system and META folders into "update.zip" and sign it using an autosign script.
fire away with any questions
ps, you don't need eclipse or the sdk for any of this but you will need an auto-sign script which is one of the tools in Avabox
AFAIK you couldnt use the emulator in the SDK to preview this stuff anyways because you can't get Sense running on the emulator, not to mention the emulator runs SOOOOO SLOOOOWWWWW. Even if you could get Sense running on the em I would bet you would spend less time making a nand, flashing your mods, checking them out and restoring your nand if you didn't like them than using an emulator to preview this stuff.
Click to expand...
Click to collapse
This was very helpful to me as well; thanks!
Actually I just thought of a question. After you sign the file and it becomes update_signed.zip can you rename it to something else like BlahBlah.zip and have it still flash properly?
Tried twice and it failed. It would create to Meta files and not find the update script. Followed the directions but that still happened; any advice?

[Q] Problems applying changes to framework-res.apk

I have been trying to edit some images in framework-res.apk. I have read dozens of guides and I seem to be the only one with a problem. Here are the steps I am taking
Step 1: adb pull /system/framework/framework-res.apk
Step 2: Open without renaming framework-res.apk with winrar and copy new images over (I am editing the clock so I am just replacing those images).
Step 3: adb restart recovery
Step 4: adb push framework-res.apk /system/framework/framework-res.apk
Then I restart the phone. The phone boots up fine but no changes have been made. I also followed a guide on writing an update.zip. After a few tries it no longer boot looped, but still the changes were not made (I tested this by pulling the apk again and checking). Interestingly if I push the changed apk while booted and then restart the change seems to take effect. But if I do it this way I have to re-associate my phone with my Google account before I can use the market or any other Google app or get any of my contacts back. This is a bit of a pain so any ideas what is going on?
Don't you sign the .apk after changing it? That might be the problem. You can use this for example:
https://market.android.com/details?id=kellinwood.zipsigner&feature=search_result
Also .. using adb is too much of a hassle for me so I just replace the framework-res.apk in the .zip of my rom and just flash the rom again with CWM

[HOWTO] Theming your framework / apps for newbies ;)

It's not much, but I thought everyone should be able to theme their Framework
Requirements: WinZip(or any other zipping program), Android SDK, testsign, some graphics editor...
NOTE: This will work with theme apk's as well !!!
So what you need to start with is your framework files:
framework-res.apk, com.htc.resources.apk ... both are located in SYSTEM:framework/
These files are just renamed zip files, so rename them back to .zip and extract them (you can also edit them inside WINRAR or something, but it is more comfortable if you extract them)
In these, images are usually saved in res/drawable-mdpi or such, but you have to think here, allways modify all files from one resource
Now locate the images you want to edit but I only know how to edit .png files (.9.png files are for a different howto, probably not by me as I've never really mastered it)
Pick those you want to edit, and edit them (I'm not gonna tell you how here, I usually use photoshop to do that )
Once you have edited those images, it is recomended to optimize those png's (Firstly to make them smaller, but more importantly, most of the times the png's from Windows graphics editor didn't work for me...)
To optimize png's you can use:
OptiPNG: DOWNLOAD This one is drag'n'drop batch conversion capable...
Pngcrush: DOWNLOAD Command line utility, but it has more settings
...or something else, but I find these two the best
Once you have these optimized, copy and re-write them to folders you took them from to edit...
Now you need to zip these back, for framework files I was told it is usual to zip them as "store", but correct me someone if I'm wrong.
After you have zipped those, they will have to be re-signed. To do this, use testsign from code.google.com
Then run this in cmd line (or create a .bat file as I did, it's much easier):
Code:
java -classpath testsign.jar testsign [COLOR="DarkRed"]file.zip[/COLOR] [COLOR="DarkRed"]file-signed.zip[/COLOR]
Now that you have signed it, it is recomended to zipalign it:
(zipalign.exe is located in /tools in your SDK)
Run this in cmd line:
Code:
zipalign 4 [COLOR="DarkRed"]infile.zip[/COLOR] [COLOR="DarkRed"]outfile.zip[/COLOR]
(4 is alignment in bytes)
Now that you have aligned the .zip, rename it to the original name and then you just need to push it back to your phone:
Code:
adb shell mount /system
adb push [COLOR="DarkRed"]com.htc.resources.apk[/COLOR] /system/framework/[COLOR="DarkRed"]com.htc.resources.apk[/COLOR]
or
adb push [COLOR="DarkRed"]framework-res.apk[/COLOR] /system/framework/[COLOR="DarkRed"]framework-res.apk[/COLOR]
And you're done
I hope this helps someone! Enjoy!
note: This way you should be able to modify any apk I think
Very good.
Good initiative, thank you.
Lets hope that others will follow your example and contribute in this community,we need it.
Sent from my HTC Desire S using XDA Premium App
One question... can i change the framework if i'm s-on? And if yes how? flash it through recovery or how?
LE: Thx for the info. I found out how to edit themes... i will create a cool one to upload here. I could edit the framework.....but i am s-on so no use for that.
Unfortunately, when you're unrooted, you can't push files to your system...
But this will work for those Theme apk's too... so grab a theme you like and you can edit it as easily as you would your framework It has a limited potential, but it's something for you S-ON users
Hmm, I skipped the push part and copied the file back over the one in the phone. Now my phone is stuck in a continuous loop on the "quietly brilliant" screen.
Any help? Where do I get a stock rom to flash?
rogbese said:
Hmm, I skipped the push part and copied the file back over the one in the phone. Now my phone is stuck in a continuous loop on the "quietly brilliant" screen.
Any help? Where do I get a stock rom to flash?
Click to expand...
Click to collapse
Just enter recovery & factory reset,wipe, then wipe dev cache, then reflash your rom that you were using before the bootloop.
You can even swap icons in the framework of your rom then just flash (if you try to swap framework.apks or dialer.apks using a file manager you will delete or swap the file but this will cause loads or errors & force closes & then result in your bootloop!) Then just swap via a computer within the zip file then just flash in recovery as normal & if done right you wont get bootloops

Categories

Resources