[Q] How to add custom image to Notification Bar in GS2 ?? - Galaxy S II Q&A, Help & Troubleshooting

i have seen a featured article in which some one just pulls out the framework-res.apk from the phone, replaces the images and pushes the framework-res.apk back to system/framework to change a certain part of the theme..
i actually tried doing the same with the notification bar backround. i had to look for that file which is actually taking the backround of the notification bar.. which i m pretty sure is located in res/drawable-hdpi/status_bar_background.png
i have attached that png so that you can see for yourself that it is that image which shows up in the backround of the notification bar.. but! when i replace the png with my custom one and push it back to its directory, but! it still doesnt make any difference.. anyone knows how to do it? does it have anything to do with the attributes of the file? anyone??

I want to know the same, but, I'm pretty sure you have the wrong APK, because when I open de SystemUI.apk, I find a file called: status_bar_background.png, but I'm not pretty sure if we can just edit it and push the file back to the phone...

Viletung said:
I want to know the same, but, I'm pretty sure you have the wrong APK, because when I open de SystemUI.apk, I find a file called: status_bar_background.png, but I'm not pretty sure if we can just edit it and push the file back to the phone...
Click to expand...
Click to collapse
i m not sure if its wrong or not, its just not working.. the thread where i took this idea from, also had the same file i am talking about plus i also have the same file name in framework-res.apk as you have in you systemUi.apk .. there was a word about twframework-res.apk too. i tried that too but it didnt have that kinda of file..
other than that, what do you think about the image that i've attached? isnt it the backround we have on gs2's notification bar?
and about pushing it back after adding the image file with winrar, ppl have it working on other phones.. but i had no luck with gs2..

Hmm weird I looked at the same file you attached, and looked at the file name and I'm running lite ning pro, and in systemui.apk, I have a file with the same filename as your attahment, and it looks like the file we need. I will try tomorrow to change it.

Viletung said:
Hmm weird I looked at the same file you attached, and looked at the file name and I'm running lite ning pro, and in systemui.apk, I have a file with the same filename as your attahment, and it looks like the file we need. I will try tomorrow to change it.
Click to expand...
Click to collapse
i hope you are right X)
please update me with whatever you get..

ill update asap,

I got it!! I modified the status_bar_background.png in the SystemUI.apk!
Then added the modified png to the SystemUI.apk using Winrar,
then I pushed the file back to the phone and then I turned off the phone and after a minute I started it again
I have also attached the original modified file.

Viletung said:
I got it!! I modified the status_bar_background.png in the SystemUI.apk!
Then added the modified png to the SystemUI.apk using Winrar,
then I pushed the file back to the phone and then I turned off the phone and after a minute I started it again
I have also attached the original modified file.
Click to expand...
Click to collapse
THanks and you're the man! XD

No problem, I'm glad I could help

Viletung said:
No problem, I'm glad I could help
Click to expand...
Click to collapse
i made my own version of that png file.. check it out

Related

[Q] Need help modifying framework-res.apk or twframework-res.apk and services.jar

Hello, maybe this is the wrong thread but i seem to not be getting any help over at Q&A's... I'm porting a theme from the captivate forums and for some reason my dropdown notifications have a transparent background and the text is black as well for any popup window like when you long press the homescreen to get widgets, and wallpaper chooser, so i think i need to modify either the framework-res.apk or the twframework-res.apk but don't kno exactly what file to modify to either get the text to white or get a background on those things... if anyone would advice me i'd appreciate it... thanks
Also if anyone could guide me into modifying the services.jar to change the clock color i would also appreciate it...
THIS IS THE LINK TO WHAT IM WORKING ON
danalex0829 said:
Hello, maybe this is the wrong thread but i seem to not be getting any help over at Q&A's... I'm porting a theme from the captivate forums and for some reason my dropdown notifications have a transparent background and the text is black as well for any popup window like when you long press the homescreen to get widgets, and wallpaper chooser, so i think i need to modify either the framework-res.apk or the twframework-res.apk but don't kno exactly what file to modify to either get the text to white or get a background on those things... if anyone would advice me i'd appreciate it... thanks
Also if anyone could guide me into modifying the services.jar to change the clock color i would also appreciate it...
THIS IS THE LINK TO WHAT IM WORKING ON
Click to expand...
Click to collapse
you need to edit the .xml files.
for notification you need to edit statubar_expand.xml and files that has similar name to that xml. dont exactly remember what its called.
its in framework-res.apk/res/layout
the notification pulldown background is in
twframework-res.apk/res/drawable-hdpi
eunkipark92 said:
you need to edit the .xml files.
for notification you need to edit statubar_expand.xml and files that has similar name to that xml. dont exactly remember what its called.
its in framework-res.apk/res/layout
the notification pulldown background is in
twframework-res.apk/res/drawable-hdpi
Click to expand...
Click to collapse
Well for the notification pulldown background ive got the one i wanted... what im referring to is when u have a notification, for instance you downloaded something from the market and u get successfully downloaded that one notification has no background it is set to transpare t and the letters are black so i can really read what it says...
anybody wishing to help?
If it is an image you need to edit to be non-black/transparent the file I think you're looking for is called "status_bar_item_background_normal.9.png"
Change that to a totally opposite color and see if that's it?
If you mean editing the color of the letters then I do not know what to edit in the .xml file.
Hope I helped!
How can I modify the XML files? 'cause when I extract them from apk file, all of them are protected, I can't read any codes. Can anyone show me how to fully unprotected them?
P/s: I always get this error "An invalid character was found in text content. Error processing resource..." whenever I open xml file with IE.
vnthantai said:
How can I modify the XML files? 'cause when I extract them from apk file, all of them are protected, I can't read any codes. Can anyone show me how to fully unprotected them?
Click to expand...
Click to collapse
^^ +1.....
danalex0829 said:
^^ +1.....
Click to expand...
Click to collapse
they must be decompiled with apk manager
additionally when you recompile make sure to check the log as there will be several images that will be renamed from. 9.png to png you must use the draw9patch program found in the tools folder of the android ask to 9patch these images otherwise your apks will not compile correctly. Im on my phone now so I can't provide the necessary video link how ever simply go on youtube and search how to use draw9patch there is a very good beginners explanation (2 part) of what a 9 patch is and how to use the 9 patch utility
Sent from my AXURA powered Vibrant
are all of images in "res/drawable-hdpi" folder 9.png formated files? or just some of them?
vnthantai said:
are all of images in "res/drawable-hdpi" folder 9.png formated files? or just some of them?
Click to expand...
Click to collapse
it varies, they can be in any folder really, but generally speaking that is where you will find most of them. Just check the logs and you will know exactly where to find them and what they were named.
was anyone able to figure out to edit services.jar in order to change clock color?
aamir123 said:
was anyone able to figure out to edit services.jar in order to change clock color?
Click to expand...
Click to collapse
Here you go man. http://forum.xda-developers.com/showthread.php?t=940692
That thread will explain that part. Be careful with it though, and make a backup cas if you mess it up you'll get a boot loop as I did
am trying to edit the framework-res.apk
am trying to change the images of the slider (jog_dial_bg_rev.png) but when i save it and then install or move the .apk to system/framework folder
the phone crashes? has this got anything to do with the MD5?
all i wanna do is change the slider image based on the CM7 pro v20 ROM
my reason is because the black shadow covers the incoming call number
kashem58 said:
am trying to edit the framework-res.apk
am trying to change the images of the slider (jog_dial_bg_rev.png) but when i save it and then install or move the .apk to system/framework folder
the phone crashes? has this got anything to do with the MD5?
all i wanna do is change the slider image based on the CM7 pro v20 ROM
my reason is because the black shadow covers the incoming call number
Click to expand...
Click to collapse
Instead of extracting, Just open it with winrar or 7zip and drag and drop image in the 7zip window.
Sent from samsung vibrant

[Q] How do I edit systemui.apk?

Just wondering how to do it? I'm just trying to change the colour of the signal bars in the notification bar.
I'm running Lite'ning ROM 5.0 and I've replaced the .png files in systemui.apk with 7zip. I then use root explorer to copy into /system/app but the notification bar disappears after I reboot. I also tried editing with ninjamorph and resigning with signapktic with no luck.
Any idea what I'm doing wrong?
Cheers.
you need to decompile it, do changes, compile it an than copy it to the right folder.
decompiling can be done with tools like apk manager.
Great thanks! Will give it a go.
Actually for something as small as couple of image changes you don't need to de compile
You can just open the apk in 7zip add your files then put it in a flashable zip.
some things must change in the framework-res.apk too, or am i wrong?!
esk02k said:
Actually for something as small as couple of image changes you don't need to de compile
You can just open the apk in 7zip add your files then put it in a flashable zip.
Click to expand...
Click to collapse
As in a CWM update zip? Is there a program that can make it flashable?
Edit: Actually I got it all working with the app "Ninjamorph"

Need Help

Posted it here because i need a dev.
I pulled my Framework-res.apk and modified all the icons for everything. I decompiled using apktool.
My question is what steps do i take now (do i need to sign it, what a good tool to recompile it as apktool does and gives me a framework-res.apk but caused my phone not to boot up)..also someone said seomthing about resources.arsc or something..not sure where to go...thanks for your help.
Open ur new apk using 7zip (righr click>7zip>open archive) and do the same with ur old one. Delete the resources.xxxx(i dont know the name by heart lol) and drag and drop the one (by one i meant the resources.xxxx file) from the new zip to the old zip and adb push ur old frameworkres apk and reboot
Sent from my PG86100 using XDA App
kpkimmel said:
Posted it here because i need a dev.
I pulled my Framework-res.apk and modified all the icons for everything. I decompiled using apktool.
My question is what steps do i take now (do i need to sign it, what a good tool to recompile it as apktool does and gives me a framework-res.apk but caused my phone not to boot up)..also someone said seomthing about resources.arsc or something..not sure where to go...thanks for your help.
Click to expand...
Click to collapse
sounds more like a question. Use apk manager and or 7zip
how does just that one file carry over all the new pics and stuff i changed...
edited......
What exactly have you edited? If you just change non patch9 images... then you can just drag and drop the new images into the apk (may have to rename apk to zip).
If they are patch9's... you need to..
decompile framework-res.apk (apktool d framework-res.apk)
swap out images
recompile (apktool b framework-res)
Now take the newly compiled apk (in the /dist folder). Open it up and take the edited images (only the ones you need changed) and put them into your original apk.
No need to resign just push it to your phone and verify that it works
If you are editing xml files in /values* or /layout..
do the same as above, except after re-compiling, you're going to swap over the resources.arsc file to the original apk.
This is using apktool... in my experience apk manager doesn't do the job to my expectations... so i just do it manually with apktool.
Lemme know if u need anything more, or if i didnt touch on a specific situation.
Btw, maybe to combat the retarded comments about q&a and being in the right section... maybe turn the OP into a How-To?
preludedrew said:
What exactly have you edited? If you just change non patch9 images... then you can just drag and drop the new images into the apk (may have to rename apk to zip).
If they are patch9's... you need to..
decompile framework-res.apk (apktool d framework-res.apk)
swap out images
recompile (apktool b framework-res)
Now take the newly compiled apk (in the /dist folder). Open it up and take the edited images (only the ones you need changed) and put them into your original apk.
No need to resign just push it to your phone and verify that it works
If you are editing xml files in /values* or /layout..
do the same as above, except after re-compiling, you're going to swap over the resources.arsc file to the original apk.
This is using apktool... in my experience apk manager doesn't do the job to my expectations... so i just do it manually with apktool.
Lemme know if u need anything more, or if i didnt touch on a specific situation.
Btw, maybe to combat the retarded comments about q&a and being in the right section... maybe turn the OP into a How-To?
Click to expand...
Click to collapse
Thank you very much..finally...one last question, where do i put the wallpaper so when the system is fully booted it shows the wallpaper i want? Thanks.
kpkimmel said:
Thank you very much..finally...one last question, where do i put the wallpaper so when the system is fully booted it shows the wallpaper i want? Thanks.
Click to expand...
Click to collapse
There's an xml edit for it... but forgot it off the top of my head... quickest way is to replace system/customize/resource/shows_over.jpg with your image.
preludedrew said:
There's an xml edit for it... but forgot it off the top of my head... quickest way is to replace system/customize/resource/shows_over.jpg with your image.
Click to expand...
Click to collapse
Thanks you, sorry about the stupid framework-res question...i knew the answer but had been so long forget the simplest of steps....instead of normal compression i was using store instead.....duh.......thank you though for the reminder because 7zip will automatically restore the same it was decompressed with, unlike that crap winrar. Have a good one man and thank you again.

editing xml help, stuck in bootloop.

Hi everyone, i used to tommytomatoes linux software to work on framwork and com.htc.resource files and all seemed to go fine with tommy's tools. no errors.
i pushed them to my phone and then installed them using adb.
i restart the phone and end up in a bootloop.
all i did was edit the colors.xml file to change the color and nothing else, no images, not a thing.
is there a way to figure out what is wrong with the 2 apk's i edited?
Thanks for any and all assistance, xml editing is killing me.
what ROM is it from? odex or not?
i used the apk's from king cobras rom.
I can't quite remember (and it could be different on a GSM ROM but I doubt it) but I think if you edit xml you need to remove the arsc or dex from the apk before you recompile.
you can ask here - lots of great help there, including tommyt
http://forum.xda-developers.com/showthread.php?t=1320891
hackit said:
Hi everyone, i used to tommytomatoes linux software to work on framwork and com.htc.resource files and all seemed to go fine with tommy's tools. no errors.
i pushed them to my phone and then installed them using adb.
i restart the phone and end up in a bootloop.
all i did was edit the colors.xml file to change the color and nothing else, no images, not a thing.
is there a way to figure out what is wrong with the 2 apk's i edited?
Thanks for any and all assistance, xml editing is killing me.
Click to expand...
Click to collapse
If any .xml's are edited, before you recompile the .apk, you should remove the resources.arsc file. Then, compile.
^^^ that thanks, I couldn't remember lol.
pinky059 said:
If any .xml's are edited, before you recompile the .apk, you should remove the resources.arsc file. Then, compile.
Click to expand...
Click to collapse
il Duce said:
^^^ that thanks, I couldn't remember lol.
Click to expand...
Click to collapse
where is the resource.arc file i have looked in the decompiled apk and i dont see it, but i see it in one that i havent decompiled?
ok i keep getting stuck bootlooping.
I have removed the resources.arsc file and lef tit in and either way it's the same, all i'm editing is the colors.xml and nothing else.
If i post my colors.xml and the apk can you maybe try it and see if you can do it?
Thanks to anyone willing to take the time to do this.
Kev
dased14 said:
where is the resource.arc file i have looked in the decompiled apk and i dont see it, but i see it in one that i havent decompiled?
Click to expand...
Click to collapse
it build when you compile - then delete from "keep" or whatever before you "finish" (in apkmanager anyway)
hackit said:
ok i keep getting stuck bootlooping.
I have removed the resources.arsc file and lef tit in and either way it's the same, all i'm editing is the colors.xml and nothing else.
If i post my colors.xml and the apk can you maybe try it and see if you can do it?
Thanks to anyone willing to take the time to do this.
Kev
Click to expand...
Click to collapse
post your exact edits, and you MUST remove arsc when edited xml, and your apk here with what you're trying to do >>
http://forum.xda-developers.com/showthread.php?t=1320891

Question on designing custom battery icons?

If the battery icons are just png files, couldn't I create my own images in photoshop and replace the framework-res.apk files with my custom icons? If so, does anyone know the typical dimensions for the png images? I replaced my original battery with the ICS battery thanks to a suggestion of using NinjaMorph.
You can extract the framework-res. Apk from the system folder. Tinker around with what you find inside it. Use 7zip to modify the zip without having to resign it.
Now, flashing the update zip is not going to be easy without recovery. But you can assess png dimensions, and tinker with modding them meanwhile. It's a hobby of mine also
Sent from my HTC ThunderBolt using XDA Premium App
Sean Hicks said:
You can extract the framework-res. Apk from the system folder. Tinker around with what you find inside it. Use 7zip to modify the zip without having to resign it.
Now, flashing the update zip is not going to be easy without recovery. But you can assess png dimensions, and tinker with modding them meanwhile. It's a hobby of mine also
Click to expand...
Click to collapse
Thanks. I used the ICS battery info that I have now which was 25x25 png images and created my own battery images and animations, but when I use NinjaMorph to resign the apk nothing happens on reboot. Not sure if the sizing is off or what. So when you use 7zip you just flash the new zip in recovery? Can't seem to find the apk for 7zip
Click to expand...
Click to collapse
boyj600 said:
Sean Hicks said:
Thanks. I used the ICS battery info that I have now which was 25x25 png images and created my own battery images and animations, but when I use NinjaMorph to resign the apk nothing happens on reboot. Not sure if the sizing is off or what. So when you use 7zip you just flash the new zip in recovery? Can't seem to find the apk for 7zip
Click to expand...
Click to collapse
When you use NinjaMorph, make sure to 'finish' the project by clicking on the button, then on the project. Also, make sure the files were named exactly the same and were replaced. The battery icons used in the framework-res.apk were the ones names like such:
stat_sys_battery_bn_40.png
stat_sys_battery_bn_60.png
stat_sys_battery_bn_80.png
etc....
Click to expand...
Click to collapse
I'm piggybacking on this thread, but I have a question about replacing the battery images.
I've got the images (from this post: http://forum.xda-developers.com/showpost.php?p=21003708&postcount=10), but when I open the the image folder (with NinjaMorph) in framework-res.apk/res/drawable, I can't find the corresponding image files.
In that folder, where I thought the battery images were, I have a few .xml files (stat_sys_battery.xml, stat_sys_battery_bn.xml etc) and only 2 .png files (stat_sys_battery_charge_anim6.png and stat_sys_battery_charge_anim7.png).
Am I in the wrong place, or where have I messed up along the way? Thanks in advance for any replies.
as far as image sizes go mine are 38x38 png files and they work fine. i have used several different sets without fail. also to save time you dont have to change the images, just the ones with the "bn" in the name.
also if you are doing all this on a computer you can download metamorph from the market, there is a free and paid version, and you can create the file path to the images using correctly named folder in a zip file and use metamorph to auto install. i have not tried this method myself but it should work.
@topched in ninjamorph start a new project, go to system > framework > framework-res.apk > res > drawable-mdpi, scroll down till you see the battery images.
also if you wanted to create the metamorph the file path is framework-res > res > drawable-mdpi
and if you wanted to change your wifi meter to match your battery meter, like i do, the path is system > app > SystemUI.apk > res > drawable-mdpi
metamorph filepath would be SystemUI > res > drawable-mdpi
iirc its in drawable-mdpi
Edit: oops didnt see the last reply.
Sent from my HTC EVO 3D X515m using xda premium
Once you rezip the framework-res.apk, you can use adb to replace it as well.
adb devices
adb remount
adb push c:\location of apk file /system/framework/framework-res.apk
adb reboot
That will allow you to change the images without recovery. though I think nearly everyone has recovery now anyhow.
Also note, you want to replace the images into the framework-res.apk file without extracting it. open it with winrar or 7zip, navigate to the drawable-mdpi folder, drop images in and click ok on adding/altering the file. Then push it back.
Ok I finally got the icons replaced after tinkering and trying the suggested methods. Thanks for all of the input and direction. This is my Android battery. Pretty basic, but something I thought might look cool.
Know-Fear said:
Once you rezip the framework-res.apk, you can use adb to replace it as well.
adb devices
adb remount
adb push c:\location of apk file /system/framework/framework-res.apk
adb reboot
That will allow you to change the images without recovery. though I think nearly everyone has recovery now anyhow.
Also note, you want to replace the images into the framework-res.apk file without extracting it. open it with winrar or 7zip, navigate to the drawable-mdpi folder, drop images in and click ok on adding/altering the file. Then push it back.
Click to expand...
Click to collapse
i turn the zip into an apk and edit the images using ninjamorph
kcpaynev1 said:
i turn the zip into an apk and edit the images using ninjamorph
Click to expand...
Click to collapse
Ninjamorph has really been hit or miss with me. I have always used ninjamorph and metamorph before that with high rates of success. On the NT, it seems like it will work sometimes, and other times it does nothing. I noticed it mostly with the menu.background.png trying to alleviate the white on white issue. I replaced the image at least 20 times and it did nothing. Finally I just gave up on it and pushed the new .apk with adb and it was done.
Know-Fear said:
Ninjamorph has really been hit or miss with me. I have always used ninjamorph and metamorph before that with high rates of success. On the NT, it seems like it will work sometimes, and other times it does nothing. I noticed it mostly with the menu.background.png trying to alleviate the white on white issue. I replaced the image at least 20 times and it did nothing. Finally I just gave up on it and pushed the new .apk with adb and it was done.
Click to expand...
Click to collapse
Only time I have issues is when I forget to turn on usg debugging after a reboot
Sent from my Nook Tablet using Tapatalk
Know-Fear said:
Ninjamorph has really been hit or miss with me. I have always used ninjamorph and metamorph before that with high rates of success. On the NT, it seems like it will work sometimes, and other times it does nothing. I noticed it mostly with the menu.background.png trying to alleviate the white on white issue. I replaced the image at least 20 times and it did nothing. Finally I just gave up on it and pushed the new .apk with adb and it was done.
Click to expand...
Click to collapse
I was having this issue but used ninjamorph combined with 7zip on my pc and the two worked together flawlessly
boyj600 said:
If the battery icons are just png files, couldn't I create my own images in photoshop and replace the framework-res.apk files with my custom icons? If so, does anyone know the typical dimensions for the png images? I replaced my original battery with the ICS battery thanks to a suggestion of using NinjaMorph.
Click to expand...
Click to collapse
heres an example on how to edit the files in framework-res.apk.
what i did was extract the Battery.png's into a folder, then i edit them in paint, then i use photoshop to make the background transparent because paint saves them with a white background. im doing em 1 by one. its very time consuming. once i am done editing them, i will move them back into framework-res.apk (Hopefully overwriting the other files of the same name).. then from there, im still looking on how to create a flashable zip.
NOTE: i always save them with the same name as when they were extracted from framework-res.apk
funnyangrykid said:
heres an example on how to edit the files in framework-res.apk.
what i did was extract the Battery.png's into a folder, then i edit them in paint, then i use photoshop to make the background transparent because paint saves them with a white background. im doing em 1 by one. its very time consuming. once i am done editing them, i will move them back into framework-res.apk (Hopefully overwriting the other files of the same name).. then from there, im still looking on how to create a flashable zip.
NOTE: i always save them with the same name as when they were extracted from framework-res.apk
Click to expand...
Click to collapse
Let me know if you figure out the flashable zip. I've been wondering about that.
boyj600 said:
Let me know if you figure out the flashable zip. I've been wondering about that.
Click to expand...
Click to collapse
will do.
i found this. http://forum.xda-developers.com/showthread.php?t=732957 this is new to me so im gonna test it on my phone first before i share it.
funnyangrykid said:
i found this. http://forum.xda-developers.com/showthread.php?t=732957 this is new to me so im gonna test it on my phone first before i share it.
Click to expand...
Click to collapse
Sweet! I may give this a run when I get a chance. I'm trying to theme my HTC Rezound with a custom battery and anything else I can tinker with. Thanks.

Categories

Resources