[Q] How do I change notification bar icons? - T-Mobile LG G2x

I am running the CM7 nightly rom on my G2X. I prefer the notification icons, and other PNGs, on the Bionix rom. What is a good way to change the framework-res.apk to get these PNG files to work correctly?
I tried to copy all PNG files from the drawable-hdpi and drawable-land-hdpi on Bionix and placed them in the same folders on the CM7 framework-res.apk. This partially worked. I also copied over AndroidManifest.xml thinking it had the info for image count and other stuff, but same results.
Any thoughts?

slackerlack said:
I am running the CM7 nightly rom on my G2X. I prefer the notification icons, and other PNGs, on the Bionix rom. What is a good way to change the framework-res.apk to get these PNG files to work correctly?
I tried to copy all PNG files from the drawable-hdpi and drawable-land-hdpi on Bionix and placed them in the same folders on the CM7 framework-res.apk. This partially worked. I also copied over AndroidManifest.xml thinking it had the info for image count and other stuff, but same results.
Any thoughts?
Click to expand...
Click to collapse
Try JUST copying images over and make SURE you arent accidentally adding extra images. You can also try the UOT theme kitchen for a more automated method

Images you can drag and drop. xml files you can't. You have to decompile the apk edit the xml and then recompile the apk.

Related

[THEME] [HELP] Working on a modded theme, running into problems.

Everything seems to work fine so far, but I've hit a snag.
Here's what happens. I've made some changes to my rom. I'm on modaco's latest, I have theme with the battery percentage mod installed (can't remember which), but everything runs perfectly with no hiccups or hangups.
The problem I'm running into is with the battery icons.
Here's what I do.
1) Pull framework-res.apk from device(to keep my changes)
2) Pull battery icons from framework-res
3) Modify icons
4) Put icons back into framework-res
5) Push framework-res back to device
As soon as I push this back to the device, everything starts force-closing. Phone, gmail, launcher, contacts...everything.
I've made changes like this before and this has never happened. Am I doing something wrong here? Any help would be appreciated. I would like to eventually release this as a theme that people can flash.
try pushing the modded files while in recovery...
..never pushed framework-res.apk.
In recovery sounds good..
But why not makin a morph?..or you could do an update.zip.
i am assuming you rebooted after pushing the new framework-res.apk across?
Did you zipalign before pushing? I know CM zipaligns on boot after changes in recovery but can't remember for stuffed pushed across- i either just zipalign it myself or the easiest and best thing to do is what rori~ said- just make a metamorph- that way when the rom gets updated you dont have to change anything at all (assuming there are no xml changes)..
eg. i have been using the same CM metamorph theme i made since about 5.0.X and it still works on every nightly- i have had tyo remove xml edits etc as CM now does that itself but it makes it all so easy.
instead of using adb, try doing it the easy way with Metamorph. Basically you'll need to create custom pngs with the same name as the ones you want to replace in the framework-res.apk.
So get a copy of your framework-res.apk and rename it to .zip and unzip it. Erase all the folders where you have no custom images to push. You'll prob just end up with some nested folders like "framework-res-->res-->drawable-hdpi" or a similar last folder. Place the custom images in there, then just reuse this attached xml file, making sure to change the pertinent information such as the file structure to be the correct path so the images push to the correct folder when you apply it with Metamorph. Be sure to save the xml file with a reasonable name, then zip the xml and framework-res folder containing your custom images together. Make sure the zip has the same name as the xml file only with .zip extension or you may get an error.
From there install Metamorph. Load the zip you created onto your sd card inside the "android themes" folder. Launch Metamorph, grant su, then "unzip new theme", and "apply all".
Hope this is helpful. A bit longer than I pictured it, but easy to do. If you run into trouble just DL a couple ones other people did and it should become easier to figure out.
^^^ what they said
made life even easier ......
here is a blank framework-res morph drag drop your desired pngs in the drawable-hdpi folder within the zip and morph away
http://www.mediafire.com/file/d1zr12fke13i61l/Framework_res_obama.zip
icegad said:
^^^ what they said
made life even easier ......
here is a blank framework-res morph drag drop your desired pngs in the drawable-hdpi folder within the zip and morph away
http://www.mediafire.com/file/d1zr12fke13i61l/Framework_res_obama.zip
Click to expand...
Click to collapse
Awesome! Thanks a ton! I'll report back my findings...
Sorry, no such luck. Endless force closes and reboots. Bummer. I'll have to sleep on it for a day or two and come back to it.
If anyone has any ideas, please let me know.
If u like u can upload the images and ill try to morph it on my phone and see what causes the fcs if any
icegad said:
If u like u can upload the images and ill try to morph it on my phone and see what causes the fcs if any
Click to expand...
Click to collapse
That would be great, thanks!
morphed the icons onto my phoneno fc or bootloops here
see screenshot....(i have a black status so it maybe hard to see your icons )
only thing i can think of is.... dont know if you were putting your folder within the drawable-hdpi folder that can cause errors..put the standalone images only
and i went ahead and put the icons in the morph you so you can jus morph this zip >>>
http://www.mediafire.com/file/9ldnfsf4t894kz6/Framework_res_obama.zip

Solved - Modifying Rosie.apk

Wasssup fellas! Ok so I'm no themer but I've started to delve into your world a little bit. I'm looking to draw on the experience of any of you that have successfully modified the Rosie. So here's my set up
I've got Apktool set up in Ubuntu before you ask I downloaded 1.3.1 not 1.3.2
I have all the dependencies in place
I've installed the framework (apktool if com.htc.resources.apk)
Rosie.apk decompiles with no errors (apktool d Rosie.apk out)
I've modified /res/value/colors.xml to add transparency to the app drawer? (This may be my issue)
Compiled (cd out/ .......apktool b) compiles with no errors
I've tried this signing Rosie.apk, Not signing it, Copying out the "Res" and "Resource" file and going into the original Rosie.apk with Ark Manager without extracting the archive and dropped in the "Res and "Resource" files.
Same result each time when I push the file via ADB or put it in a flashable zip the phone boots goes through the animation capacitive keys light up then the phone gets stuck on the last frame of the boot animation and just hangs there forever no boot loops just hangs there?
Any help would be more than appreciated, thanks guys!
Lou
gtalk @ RedemptionRom
email: [email protected]
Rosie in my sky raider theme is working great. And I modified the png's inside it. Didn't need to do all of the things you did. I just themed the png's, zipped it up in an update.zip and then flashed it through recovery.
But I did not edit the colors.xml like you did. I left that alone.
[¦] mobile [¦]
Be sure to use the same com.htc.resources.apk and framework-res.apk from the ROM you took Rosie from.
HeyItsLou said:
Wasssup fellas! Ok so I'm no themer but I've started to delve into your world a little bit. I'm looking to draw on the experience of any of you that have successfully modified the Rosie. So here's my set up
I've got Apktool set up in Ubuntu before you ask I downloaded 1.3.1 not 1.3.2
I have all the dependencies in place
I've installed the framework (apktool if com.htc.resources.apk)
Rosie.apk decompiles with no errors (apktool d Rosie.apk out)
I've modified /res/value/colors.xml to add transparency to the app drawer? (This may be my issue)
Compiled (cd out/ .......apktool b) compiles with no errors
I've tried this signing Rosie.apk, Not signing it, Copying out the "Res" and "Resource" file and going into the original Rosie.apk with Ark Manager without extracting the archive and dropped in the "Res and "Resource" files.
Same result each time when I push the file via ADB or put it in a flashable zip the phone boots goes through the animation capacitive keys light up then the phone gets stuck on the last frame of the boot animation and just hangs there forever no boot loops just hangs there?
Any help would be more than appreciated, thanks guys!
Lou
gtalk @ RedemptionRom
email: [email protected]
Click to expand...
Click to collapse
This means sense failed to load. The phone booted but sense does not work. If you have a back up launcher it would have defaulted to that. Good way to test is to install lp or launcher 2 so next time it will still load in.
synisterwolf said:
This means sense failed to load. The phone booted but sense does not work. If you have a back up launcher it would have defaulted to that. Good way to test is to install lp or launcher 2 so next time it will still load in.
Click to expand...
Click to collapse
Great idea!!! Doing that makes testing much easier fairly obvious don't know how I missed that one.
Berzerker7 said:
Be sure to use the same com.htc.resources.apk and framework-res.apk from the ROM you took Rosie from.
Click to expand...
Click to collapse
The Rosie is part of the theme I'm using which comes with both the Framework-res.apk and com.htc.resources.apk. Am I correct in using this set of framework files or should I be using the Rom's original framework?
What exactly are you trying to modify in rosie? Is it just the app drawer background? I can tell you that rosie has little to do with framework-res. The app drawer background colors are located in launcher.xml and allappsgridview.xml.
deficitism said:
What exactly are you trying to modify in rosie? Is it just the app drawer background? I can tell you that rosie has little to do with framework-res. The app drawer background colors are located in launcher.xml and allappsgridview.xml.
Click to expand...
Click to collapse
I mentioned the framework because apktool requires you to install it to decompile rosie.apk. I will check those xml's out. The failed boot may be because I edited the /res/values/colors.xml file. I don't have my virtual machine fired up but I did edit one of the all_apps strings in there from #ff000000 to #80000000 on the advice of a themer. This may be what f'd me up.
HeyItsLou said:
I mentioned the framework because apktool requires you to install it to decompile rosie.apk. I will check those xml's out. The failed boot may be because I edited the /res/values/colors.xml file. I don't have my virtual machine fired up but I did edit one of the all_apps strings in there from #ff000000 to #80000000 on the advice of a themer. This may be what f'd me up.
Click to expand...
Click to collapse
Yeah don't worry about the colors.xml. just those 2 xmls I mentioned.
deficitism said:
Yeah don't worry about the colors.xml. just those 2 xmls I mentioned.
Click to expand...
Click to collapse
Will do, thanks man.
deficitism said:
Yeah don't worry about the colors.xml. just those 2 xmls I mentioned.
Click to expand...
Click to collapse
What changes should I make to the XML's for transparency? Also after I compile Rosie what do you recommend for a process in getting the new changes implemented? To clarify, should I rip the resources file and classes.dex out of the new compiled version and replace the ones in the stock Rosie? Ive tried about 20 different methods and I get force closes each time...thanks man!
Sent from my ADR6300 using XDA App
If it compiled correctly you should be able to push the compiled version to /system/app with no trouble. There are 2 possibilities:
1) The apk got signed with whatever tool you are using and system apk's can't be signed this way. I think APKManager signed with the test cert automatically.
2) The changes in the xml's may not be correct for which we need to wait for deficitism to verify what was changed. Typically changing color attribs won't cause an FC though.
One thing you can try is to just extract the res folder, where the changes are, in the new Rosie to your PC and open the original with 7zip and drag that folder to the 7zip window. Then push that.
NilsP said:
If it compiled correctly you should be able to push the compiled version to /system/app with no trouble. There are 2 possibilities:
1) The apk got signed with whatever tool you are using and system apk's can't be signed this way. I think APKManager signed with the test cert automatically.
2) The changes in the xml's may not be correct for which we need to wait for deficitism to verify what was changed. Typically changing color attribs won't cause an FC though.
One thing you can try is to just extract the res folder, where the changes are, in the new Rosie to your PC and open the original with 7zip and drag that folder to the 7zip window. Then push that.
Click to expand...
Click to collapse
Thanks dude, I actually figured it out no more help needed.
HeyItsLou said:
Thanks dude, I actually figured it out no more help needed.
Click to expand...
Click to collapse
Cool, glad you got it working.
So what was the cure?

[Q] Editing more than just images in Phone / contacts apks

Howdy all,
I am wanting to kno if there is anything special about editing certain system apps, do they all need to be signed with the same keys. i think i read this somewhere.
cause when i decompile the phone.apk then recompile with no changes / or with changes, signed it with autosigner or APK-Manager, it just FC's on the phone and i cant make sence of the logs...
oh and i tried pushing the file with adb and x10 mod tool, tried in the emulator, still no joys.
been googling for hours... and i feel i am searching for the wrong things...
Thanks in advance
Pvy.
you can use 7zip to browse the apk as an archive and replace png's and .9.png's inside the drawable folders.
you wouldn't have to resign the apk this way, but i would recommend zip-aligning the apk after you replace the png's.
i would also make sure you know how to work with .9.png's before replacing them. not doing .9.png's correctly will break the app.
I have edited the pngs there is no prob there I can put all the images in.
I am editing the xmls and the manifest... I tried drag and drop but it seems to break the apk...
Thanks tho.
Sent from my X10i using XDA App
Go ahead and compile with apk manager, say yes to 'is it a system apk?'.
Then open the new apk with 7zip and pull out the xmls, etc. you changed.
After that open the original apk w/7zip and drag in the compiled xmls along with your images.
That should work.
So I did this,
compiled phone.apk chose system app when it asked.
drag and dropped the 3 pngs I modded, and a few xml files, and the modded androidmanifest.xml to the original
Pushed it to my phone, rebooted...
But it wont install.
It appears the signing breaks.
Pvy
AyDee said:
Go ahead and compile with apk manager, say yes to 'is it a system apk?'.
Then open the new apk with 7zip and pull out the xmls, etc. you changed.
After that open the original apk w/7zip and drag in the compiled xmls along with your images.
That should work.
Click to expand...
Click to collapse
Sent from my X10i using XDA App
Changing default image
I wondered if anyone could help me out with this
Many thanks
pvyParts said:
So I did this,
compiled phone.apk chose system app when it asked.
drag and dropped the 3 pngs I modded, and a few xml files, and the modded androidmanifest.xml to the original
Click to expand...
Click to collapse
My suggestion is after doing this add the now modded original .apk into a flashable.zip and use xRecovery/FreeXperiaRecovery to install the app.
If you don't know how to make a flashable.zip just use 7zip to replace the phone.apk in a theme update.zip and delete any other folders/.apks that you don't want being reinstalled (framework-res etc.).
Not sure if this will work because I haven't tried this after modding .xml files, but it works after I make any other changes, even changing .9.pngs.
Best of luck, hope this works.
nope that didn't work either... took me a while but once i figured out the update.zip i got it going. and still no joy.
thanks heaps guys for all your help, i think i must have to compile from source or something silly like that...
I'll keep at it and let you all kno how i go...

[Q] stat_sys_battery_charge.xml issue

I have been making my own battery mod for the sensation ICS Robo rom.
I use apk Manager 5.02 to decompile the framework-res.apk file and it decompiles successfully. I then change the 200 png files and then changed the stat_sys_battery_charge.xml to suit. I am making a battery icon that shows up purely as text so if it 100% it will show up as 100
I want the charge XML to show a green number when charging and a white number when not charging. When I compile the framework-res.apk file it compiles with out any errors. I then sign the file, rename it framework-res.apk and flash it.
It works ok, but makes the status bar at the top much bigger and throws the rest of the rom out. Any ideas were I went wrong?
Here is a copy of the xml file - it has been renamed from .xml to .txt so I can upload!
Found out what was wrong. I was using the wrong version of apktool.jar. Downloaded the correct version and now can edit my own ICS fies

Adding my own 1% battery icons

So as in my earlier thread I have moved back to eagles blood 4.0.4 AOSP rom. One of the drawbacks is that the hdpi drawable folder in my systemui does not have 1% icons. I've read a few tuts on how to make my own....or add them from a downloadable zip.
My question to those who are more knowledgeable about development is this: will opening the drawable hdpi folder from my systemui.apk with 7-zip and replacing all my stock sys_batt PNG images with the custom 1% images and then saving those to the folder and pushing the systemui.apk back to my phone do the trick?
Sent from my LG-P999 using xda premium
Pain-N-Panic said:
So as in my earlier thread I have moved back to eagles blood 4.0.4 AOSP rom. One of the drawbacks is that the hdpi drawable folder in my systemui does not have 1% icons. I've read a few tuts on how to make my own....or add them from a downloadable zip.
My question to those who are more knowledgeable about development is this: will opening the drawable hdpi folder from my systemui.apk with 7-zip and replacing all my stock sys_batt PNG images with the custom 1% images and then saving those to the folder and pushing the systemui.apk back to my phone do the trick?
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
Should add long as those are referenced (I think in the xml, but then, I have never done this myself). Would need a nandroid for sure .
-- The noob says:
From first-hand experience, a smartphone is incapable of making you smarter!
Nope, they're not. I have to manually reference them in the sys_bat icon XML file located in drawable folder. Then I have to swap in the images in the drawable hdpi folder once they're referenced. However, I'm having issues. Once I extract the files from the apk with 7zip, specifically the drawable folder to get to the sys_bat icon XML file, I cannot open it in notepad++ to edit it. I'm getting an error. Any ideas mansa?
Edit- LOL nandroid was the first thing I did!
Now I have to crank out this stupid paper for class so I can continue tinkering with my Android lol
Sent from my LG-P999 using xda premium
Ok, So I've come to learn that in order to edit XML files within the APK, that the APK needs to be decompiled with APK Tool, not simply extracted using 7zip. I downloaded APK tool and set everything up according to this tut----> http://forum.xda-developers.com/showthread.php?t=1989533
I have the APKTOOL folder placed on the root of my C:/ drive. Inside that folder I have placed the following aapt (the apktool exe or application file), apktool (batch file), apktool.jar, and my framework-res.apk (I know I need to use systemui.apk, I'm just using this as I follow the tutorial on how to get this program working before I try anything on my own files). When I get to the command c:\apktool>apktool if system.apk to install the APK on my system so I can decompile I get an error saying it's not a recognized command. Any ideas dev-friendly users?
So I realized I didn't have the JDK installed on my pc since I did a system wipe on it the other day. Reinstalled it but it's still not working. Very frustrating. I'm also using win 8 if that means anything.
Giving up on apktool as I cannot seem to get a way around the error. However, apk manager seems much more user friendly and have seen tuts using the program specifically for ics roms. I've only seen tuts for apktool using jelly bean roms so maybe that's the issue. I won't be home until late tonight as I have class. If anyone has any tips/suggestions please let me know.
Sent from my LG-P999 using xda premium
Not that many people are in here anyway but I figured I'd give it a shot. So I went to use apk manager instead of apk tool which seemed to be a much more "newb friendly" program. I can successfully decompile my framework-res.apk but cannot decompile my systemUI.apk afterward. I get an error....here's my log if anyone can help me with it:
EDIT- deleted log as I was able to decompile systemUI with a different apk program. That was a huge headache getting it to decompile. Now editing the XML should be no problem, along with swapping out the PNG's. Recompiling on the other hand will most likely be another headache!

Categories

Resources