[Help] How do I theme .png from apk - Samsung Galaxy Nexus

I'm trying to theme some images from mms.apk, stat_notify_sms.png, I've decompiled the apk using apktool and they come out .png some 9.png. I load it into photoshop this is what I get
http://i42.tinypic.com/35isq3t.jpg
In every tutorial I've read on editing 9.png's or png's from an apk they just say there's a simple black line on either side and to not touch them but this has them all around and there's extra white pixels there too that when colored and essentially going around the black borders on the sides it looks like there's a colored border around the image and the overall image just looks like crap after saving. The image comes out looking pixelated.
How do I fix this? obviously I'm not doing it right and I can't find an in-depth tutorial that wasn't written for someone who already knows what they're doing.

Its only 9.png's that have that border. It just marks up which parts of the image can be stretched and which can't. If the image size is changed to fit a different size space.
You dont need to decompile to change normal .png's in the apk's. Just unzip to get the images then drag and drop the modded images into the apk with winrar etc..
Are your png's still bad if you open them with gimp?
Sent from Mobile..

Welp I just downloaded GIMP and it opens up the png without all the black borders so now I can edit them just fine. I always use photoshop and I wish it would have worked in it but this will have to do. Thank you.

no problem
when i used to theme my desire, photoshop used to do some strange things to my png's. gimp or paintshop pro work fine though.

dev/null/ said:
Welp I just downloaded GIMP and it opens up the png without all the black borders so now I can edit them just fine. I always use photoshop and I wish it would have worked in it but this will have to do. Thank you.
Click to expand...
Click to collapse
If you decompile and edit .9 pngs, you need to run them through draw9patch before recompiling, else they will look rubbish when stretched. draw9patch is included in the sdk.

Related

what is the best image editor?

I have some images that are 128x128 and over, I would like to resize them to smaller sizes. I have tried ACDsee and Microsoft Digital Image 2006 to resize those images. I was able to produce a smaller size images, but those images always have a white box outside of the image.Please see attach. It there a program that I can use to resize image without producing white outer box? And how do you edit image without have a white box?
thank all
10507
Hi,
You can use Paint.net is free and works great, to create transparent backgrounds save it as png and select the color to be transparent.
gimp is great and also free tons of plugins and online tutorials
Both of the above and IcoFX
Empel1960 said:
Hi,
You can use Paint.net is free and works great, to create transparent backgrounds save it as png and select the color to be transparent.
Click to expand...
Click to collapse
i'll swear by paint.net
I use Photoshop, Corel, PictureToIcon (make icons(ico, bmp,png) from pictures(jpg, jpeg, ico, bmp, png, exe, dll, ocx, scr, gif, cur, wmf). Can make 32bit icons), Falco Icon Studio. For different tasks i use different progs.
i use photoshop for everything i do
Thank you everyone for sharing your valuable information.

CM7 Status Bar Messed Up

Is it just me or is this a bug in the rom? I did do some systemui and framework editing but i cannot solve this. Basically the headers "ongoing" and "notifications" is given a space too large and the color is not showing up. also, beneath notifications where it is supposed to be transparent, it is not. I have played with the statusbar files but I may be mistaken. Can someone tell me what files corresponds to these issues?
I'm also having a problem with the contact pictures. There is a really ugly white frame around it. How can i get rid of this? Thanks for your help
From what I can see, you have selected a theme, either from the theme manager or from flashing a theme. If it was from the theme manager, revert to the system theme, I'm sure it will fix your notification issue. It's most likely a bug in the theme. Also, the area below the notifications on the stock system theme is 100% opaque, it's a google thing. It isn't transparent anymore. The framework editing you did probably further screwed up some UI stuff. Especially if you edited .9 png's without decompiling framework-res.apk, you could have some distorted images.
If selecting the system theme in the theme manager doesn't work, then wipe & reflash the ROM, whether it be RC1 or the latest nightly.
As for the contact frame, it's part of gingerbread. I'm sure it's a framework png in framework-res.apk somewhere, and if you can find it, and it doesn't have a .9 or a .9.png ending to the filename, then open it up in your favorite image editing tool and make the entire image transparent (as in raise the alpha of the layer). If it DOES have a .9 on the end of it, leave it alone, chances are, you'll only screw it up.
If I remember correctly, the contact frame, being a frame, is a .9 image, so you should probably live with it. If you REALLY know what you're doing, then you can decompile the apk, raise the alpha of the layer to 100% and redraw the .9patches with the draw9patch.bat included in the android sdk, or the executable draw9patch script in the linux version.
If you had no idea what I just said, then don't attempt it.
I actually am using system theme. I guess i can recheck all the statusbar files. They are the same ones I used in my cm 6.1 theme. I'll try searching for the frame in framework-res. I was looking in phone.apk and contacts.apk and couldn't find it.
edit: found the frame as quickcontact in framework-res but if i change that to be transparent, there will be a weird gap. the contact picture will not actually be larger.
So what happened was the 9patch file for the status bar headers didn't have any 9patch data. As for the background on the pulldown, i found out in cm7 it uses a new file "shade_bg" and that is working fine as well. Also the quickcontact frame was an easy fix. I just used transparent files for that and it doesnt show up and the contact pictures are bigger as well so everything is fine now
Ah, glad you found the culprit. Yeah, those 9patch pngs suck. I ran into major issues with them when making a theme for the stock rom, had to redo a lot of it after realizing I had to decompile the apk first.
Sent from my T-Mobile myTouch 3G Slide

Help with Mms theme. I am calling upon talent.

I'm looking to have this .9 png change to a slightly darker color. I have tried to do it with apktool and apk manager, but both always have errors when I decompile the Mms.apk and once I change the .9 png, I can never recompile it.
Here is the old .9
http://imageshack.us/photo/my-images/718/messageconversationothe.png/
and here is the .9 in the new color as I would like it to be, but has been messed up, because it wasn't "saved" properly in the true .9 format (in GIMP) and is now screwy on my app.
http://imageshack.us/photo/my-images/594/messageconversationothe.png/
If anyone could help me out with that, I'd be greatful!! Making it a darker blue, helps stand out the two parties in the convo.
oh, and if someone can find the .png to the background of the Mms app, it would be a lot nicer in BLACK. Would make the white bubble (us), and the Darker blue bubble (them) stand out much better then white!
First of all if ur just changing PNG and 9 files there is no need to decompile the apk. Pull the Res file out of the apk and make ur changes. Then put it back in the apk. I use 7zip to open my zips and apks.
Next if editing 9 files then u can edit them in gimp or Photoshop. Save them and then use draw9patch that is found in the tools folder of ur android sdk and then fix the 9 file. If u don't know how to use it just let me know ill explain. Its real easy. Then u can use a program called xultimate. Google it. There is a thread here on xda somewhere about it. It explains how to use it. It will recompile the 9 file and make it usable.
If ur editing XML or smali file that's cool. Decompile the apk and do ur edits. U can replace the individual PNG and 9 files afterwards. Just don't forget that the XML files r kept in the Res folder as well so don't replace them if uve already edited them.
jonfitch said:
I'm looking to have this .9 png change to a slightly darker color. I have tried to do it with apktool and apk manager, but both always have errors when I decompile the Mms.apk and once I change the .9 png, I can never recompile it.
Here is the old .9
http://imageshack.us/photo/my-images/718/messageconversationothe.png/
and here is the .9 in the new color as I would like it to be, but has been messed up, because it wasn't "saved" properly in the true .9 format (in GIMP) and is now screwy on my app.
http://imageshack.us/photo/my-images/594/messageconversationothe.png/
If anyone could help me out with that, I'd be greatful!! Making it a darker blue, helps stand out the two parties in the convo.
oh, and if someone can find the .png to the background of the Mms app, it would be a lot nicer in BLACK. Would make the white bubble (us), and the Darker blue bubble (them) stand out much better then white!
Click to expand...
Click to collapse
ok.... so ...when you de-compile .9 files expand the pic as far out as you can when your working on them . you will see black borders on them. do not break them black lines. that means colorizing them too. just isolate everything inside the black lines of the .9 png's and change the color. once againg make sure the black lines stay black.any mis hap, one pixel or oops into the black lines will throw errors. let me know if this helps . just pm me or just post on here . ill check back.
EDIT did you install your resorces for apktool?

Question about theme mod's

Hi there I have just got my SGSII
i've been able to root it and install TW4.5 and pretty much have the device exactly how I want it with just one gripe
The drop down of the notification bar is way too dark especially for notifications with black fonts.
Can anyone point me to any kind of guide or way of changing the the background graphic for this drop down?
Thanks in advance
Everything you'll ever need to know
forum.xda-developers.com/showthread.php?t=916814
dully79 said:
Everything you'll ever need to know
forum.xda-developers.com/showthread.php?t=916814
Click to expand...
Click to collapse
Hey man thans very much for the resources they helped me find what I needed.
however the methods of editing seemed very complex for my needs ....
Since I only wanted to change some of the png graphics slightly (just to lighten them up) I opened the framework-res.apk and the systemui.apk in winrar extracted the png's I wanted lightened them up with irfanview dropped them back in the still open apk in winrar and then copied the apk's back where the originals were (renaming the originals .bak first).
I didn't change any .odex or .jar files in any way and I have kept backups of all the originals just in case so I only have one question for you.
can you think of any reason my simple method, for graphics only, would have caused any harm?
it doesn't seem to have after a reboot it seems to have had the desired affect on the notfication bar (which was to make all notifications readable whether they had black or white fonts)
There are 2 kinds of PNG files. Ordinary PNG files can be edited without any problems, but to properly edit .9 png's, you need to decompile the apk first, make changes and then recompile.
To do that, you need to use apktool/apk manager.
Sent from my GT-I9100 using Tapatalk
sileshn said:
There are 2 kinds of PNG files. Ordinary PNG files can be edited without any problems, but to properly edit .9 png's, you need to decompile the apk first, make changes and then recompile.
To do that, you need to use apktool/apk manager.
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
ok so if I have edited one of the .9.png and I think I might have done and simply dumped it back in the apk with winrar what harm might I have done and what symptoms might I see?
Sometimes you can get away with editing .9' s the way you have if the black border around the outside stays completely black, any slight discoloration and its force close city on a one way ticket courtesy of systemui.
It seems you my have gotten away with it......this time.
Thanks to everyone who has repsonded to me on this thread you have all been very helpful. This is a truely wonderful phone I cant believe how big a step up this is from my old SGS. I tired all sorts of custom roms and mods on that to get features on that, with this I have it pretty much exactly where I want it simply by rooting and installing a the custom Touchwiz 4.5 (I have other lauchers but find myself going back to that all the time)
So the only remaining thing was the fact that some notifications were in black and the backgrounds on the notification drop down were too dark to read some app's notifications in black with a simple glance so your help with finding the right pngs and files (systemui.apk and framework-res.apk) were very very helpful. Not sure if this was the simplest way to achieve what I needed but it worked so I am happy.
Thanks again one and all.

[Q} Editing a non-png image

Hey fellow themers out there! So one of the things that's preventing me to call my theme complete is this gray background image on my themed MusicPlayerWT.apk (see picture). It shows up under the track info and only in landscape mode. I looked and looked for a png file that makes up that image but I just can't find it. There ain't many png files in the drawable folders for me to keep missing so it just leads to conclude that is not a png file I'm after. It's similar to the grey notification bar on the notifications dropdown in the SystemUI.apk or the white dialer background in the Phone.apk. They are not png files that you could swap or edit. I really want to either make it completely transparent or black. If anyone out there could give me a hand with this I would appreciate it (link to apk file below). Thx ahead.
mrrobc97 said:
Hey fellow themers out there! So one of the things that's preventing me to call my theme complete is this gray background image on my themed MusicPlayerWT.apk (see picture). It shows up under the track info and only in landscape mode. I looked and looked for a png file that makes up that image but I just can't find it. There ain't many png files in the drawable folders for me to keep missing so it just leads to conclude that is not a png file I'm after. It's similar to the grey notification bar on the notifications dropdown in the SystemUI.apk or the white dialer background in the Phone.apk. They are not png files that you could swap or edit. I really want to either make it completely transparent or black. If anyone out there could give me a hand with this I would appreciate it (link to apk file below). Thx ahead.
...
Click to expand...
Click to collapse
It's <color name="music_player_header_bg">#ff191919</color> in res/values-land/colors.xml my friend.
Tip: When you are looking for some background to change look what's on the foreground. In your case it took me 1 min to find it - first found that allshare button icon in drawables, then searched for the png name in /res -> found the button xml, then searched in layouts for the button xml name and found that head layout which has the background color I gave you. Simple, right...?
nijel8 said:
It's #ff191919 in res/values-land/colors.xml my friend.
Tip: When you are looking for some background to change look what's on the foreground. In your case it took me 1 min to find it - first found that allshare button icon in drawables, then searched for the png name in /res -> found the button xml, then searched in layouts for the button xml name and found that head layout which has the background color I gave you. Simple, right...?
Click to expand...
Click to collapse
Wow thx!:thumbup: It shows how much there is still to learn. Thx for the tip. I wish I could give u more thank yous but you know how that goes...
...anyways...why now do we have background images generated from xml files? Unless I'm mistaken, I don't remember running into that on previous Android releases.
Sent from my Blutiful Note3

Categories

Resources