yashsingh1/xdaforums huggingface dataset:
[Epic 4G Themes] amosher13:
I'm really digging these guides as I really want to get into theming and eventually (with any luck!) cooking ROMs. i'm a self made techie and pick things up pretty quick, so I thought theming was a good place to start off.

any chance you'd consider a writeup on extracting a theme from a themed ROM, pitfuls and things to know/watch out for etc... i think that would be a helpful supplement to see how themes are implemented in ROMs and know what certain files affect. maybe even a list of what parts of a theme/ROM are in what files (such as lockscreen i think is android.policy.jar etc...)

thanks again for your time and effort into putting this out there
[Epic 4G Themes] dreamsforgotten:
No doubt, there is definitely more write ups to be done my goal was to get some guides out that just touch on the basics so people who never tried before can begin to get their get wet.

Do as thou wilt be the whole of the law
[Epic 4G Themes] amosher13:
hey so i wanted to come back and thank you again for these. i've read but havent dived into editing .9.pngs just yet, but i've really been playing with the rest of the stuff to mostly modify existing themes that i like most of, tweaking a bit. its really cool and i cant wait to actually start putting some of my own stuff together. i know the threads havent gotten a lot of love but its appreciated!
[Epic 4G Themes] decalex:
Hey, this is amazing, thx so much for it.

I'm running into a prob and wondered if you could assist.

I've already modded (only replaced/changed some png colors on photoshop), and have flashed it successfully to my phone with no problems. However, when I pull the framework res back out, decompile (with no problems), then try to recompile immediately (as instructed), that part seems to fail. It errors, then asks if it is a system apk (yes?)...then creates a temp folder and asks me to delete the resource.asc if I've modded an xml. Even though it errors, I made a change to the strings xml, compiled, with same error, then signed and flashed- it seems to work fine, but the change I made to the xml didn't hold.

any ideas or suggestions?

Thx again so much.

sent from my RAZR
[Epic 4G Themes] amosher13:
i "think" thats because you are recompiling edited images. i think thats what he mentions elsewhere in these threads, always compile with stock images, then drag and drop your edited images. so you probably want to start with a stock framework, not one that already has edited images in it. i'm learning too though so dont quote me.

EDIT: hey dreamsforgotten, getting an error exporting: Failed to export NineFiles: C:\eclipse_workspace\Nine Files\bin\NineFiles.apk doesn't exist!

EDIT2: looks like somehow my ADB got wiped out from the tools folder so Eclipse couldnt find it, reinstalled, pointed to it in Eclipse preferences, works like a charm.
[Epic 4G Themes] decalex:
I think you are correct.. Ive just gotten so far away away from the original.. On my (own) 5th revision :). That's cool though. I did try decompiling and re compiling immediately on an untouched framework, and it did in fact work.

sent from my RAZR
[Epic 4G Themes] useruser25:
hey i was wondering if you have already posted your 2nd tutorial? If not is there going to be one anytime soon?
[Epic 4G Themes] amosher13:
see above bro! each one has a link to the next, if your a little tech savvy they should be enough to get you started, i learned off of them so if you have any questions feel free to ask!
[Epic 4G Themes] chris378:
Noob Questions- I'm new to theming but i catch on very quick. I just have a few questions tho..I'm running on the Midnight ROM (CWM3)..I like the DK28 Gingerbread Theme 1.8 but would like to change the text colors a lil..So I Decomplied and recompile with zero errors..i ended up with a smaller file and it was named unsignedframework-res.apk..So i changed the name to framework-res.apk and put it back into the DK28 Gingerbread Theme zip so that i could flash it..I tryd to flash it in CWM3 but it told me it was aborted bc it was a bad file..so my two questions are how to get a theme to be CWM3 compatible and what im a doing wrong when it comes to decompiling and recompiling? Any advice would be greatly appreciated Thanks in advance
[Epic 4G Themes] dreamsforgotten:
I haven't made a cwm3 zip yet but for a short cut you can find a theme created for it and copy the files from your theme in leaving the meta inf folder alone. I've noticed in the past as well when I recompile the file gets smaller and smaller according to the pc but that end up flashing all the same. Hope that helps.
[Epic 4G Themes] MysteryEmotionz:
You can't decompile and recompile a framework with different images. The .9s will show funny

You need a edify script for cwm 3

Sent From Da Hood.
[Epic 4G Themes] shane6374:
If you'e using windows just use apkmanager, it's easier than apktool just make sure you select no when it asks you if it's a system file.
[Epic 4G Themes] LASuxs:
thanks i'll give it a try

edit....

tried apk manager, every time i say its not a system apk it doesnt compile anything. i'm trying a regular compile. and btw the files that show up in the "keep" folder seem to be the original ones. not the one i edited, and when i delete them from the "keep" folder they end up missing in the "framework.apk"
[Epic 4G Themes] shane6374:
Are you looking in the files to be modded folder for the unsigned apk?
[Epic 4G Themes] LASuxs:
Yes i've taken the unsignedframework.apk, decompiled it and saw that the xml files and values didn't seem to be changed. and sometimes it will only decompile the assest
[Epic 4G Themes] silverxbv2:
Are you getting any errors when compiling?

From the mobile command center
[Epic 4G Themes] LASuxs:
looking at the log i'm getting these

"red here is not defined.

C:\Users\Edwin\Desktop\apk_manager_4.9\other\..\projects\framework-res.apk\res\v

alues\public.xml:4029: error: Public symbol drawable/zzz_unlock_default_cd_image

declared here is not defined.

C:\Users\Edwin\Desktop\apk_manager_4.9\other\..\projects\framework-res.apk\res\v

alues\public.xml:4030: error: Public symbol drawable/zzz_unlock_disk_background

declared here is not defined.

C:\Users\Edwin\Desktop\apk_manager_4.9\other\..\projects\framework-res.apk\res\v

alues\public.xml:4031: error: Public symbol drawable/zzz_unlock_disk_close decla

red here is not defined."
[Epic 4G Themes] shane6374:
Clean out your log, run it again, then post the entire log in a code box here. One of use will be able to look at it and tell you exactly what your error is.
[Epic 4G Themes] dreamsforgotten:
Are you compiling a framework with edited images for a theme?
[Epic 4G Themes] spdwiz18:
Correct me if im wrong. But I believe that you can not theme an allready themed apk. You will Ned to ask the themer for the source and compare it to the original with winmerge (not that hard, just time consuming because you have to make his edits plus yours) or ask the orginal themer to make the edits for you. though I might be wrong. Anyone?
[Epic 4G Themes] dreamsforgotten:
Here's a short cut to doing this. Take your stock deodex ROM our theme template. Pull the drawable-hdpi folder from it. Copy the fodder from the framework your working on to back those images up and replace the entire drawable-hdpi with the stock one in your apk manager project folder. You cannot compile edited images in apk manager look at your log every .9 png is erroring
[Epic 4G Themes] shane6374:
Agreed, I have one apkmagager folder set up with completely stock images just for compiling xml edits.
[Epic 4G Themes] spdwiz18:
I could have saved my self ot of headaches had I thought of this. Lol.
[Epic 4G Themes] LASuxs:
Wow, now in retrospect it looks so easy. Thanks a lot, and everybody that helped.

Now just need to find a deodoxed system ui
[Epic 4G Themes] shane6374:
If you're looking for 10 lock, use the one from maddoggins mod.
[Epic 4G Themes] LASuxs:
pretty much any one that apk manager accepts. but gonna have to wait till i figure out what in my latest framework broke the Email, Music Player and Task Manager
[Epic 4G Themes] LASuxs:
So every time i use a framework i've modified with apk manager it ends up crashing android.process.acore . which means my contacts, phone and a bunch of other important apps wont work. All i edited was colors, mainly text colors. In xmls ijn the layout and colors in the values. Any way to fix this? The apkmanager didnt log any errors in decompiling or compiling of the file
[Epic 4G Themes] dreamsforgotten:
Did you sign any system apps?
[Epic 4G Themes] LASuxs:
hmm, i never personally signed them. can i just sign them with apk manager? where do i go from here?

I tried signing them with apk manager, and still seem to get the same force closes
[Epic 4G Themes] dreamsforgotten:
No I was saying if you sign them with apk manager you will get fc. If you are getting a fc without signing then you will need to run logcat to find out what's going on
[Epic 4G Themes] KennyG123:
I tried to get the plug-ins for eclipse using both links in the OP but getting a 404 site not found error :(

I just want to change the color of an existing 9.png....is there another way?
[Epic 4G Themes] dreamsforgotten:
404? Are you typing that address in a web browser or in the menu inside of eclipse where you install the packages from?
[Epic 4G Themes] KennyG123:
I kept getting errors about file not found in ECLIPSE so typed it straight into a browser and got the 404.
[Epic 4G Themes] dreamsforgotten:
Alright I'm on the road I'll check it when I get back to the office
[Epic 4G Themes] the1dynasty:
first off, thanks for posting this... i've got a good handle on editing the .png and .9.png files and putting them into someone else's theme and getting that to work just fine... i wanted to start looking into actual theming and the part that messes me up is the .xml editing and using the APK Manager program... i'm completely lost in those areas and all the videos i find either don't explain this well or they aren't "talking" just typing and this is hard to follow while trying to do what's being described in the video...

let's say something simple like inverting sms/mms apk... i can do the "visuals" fine, but the "word color" needs to be edited in the xml files which i'm not understanding how to do that... any help? thank you!!
[Epic 4G Themes] dreamsforgotten:
For colors just edit rgb code which looks like #ff000000 that is code for solid black.
[Epic 4G Themes] shane6374:
I'm assuming you're trying to invert the mms.apk for the ICS roms on the Nexus S. I've got mine completely inverted for the theme I'm about to release so if you need any help hit me up.
[Epic 4G Themes] the1dynasty:
thanks for the answers... sorry, i should've clarified a bit on what i was asking... i was having trouble with APK Manager and understanding how to use it... i got it working now with the exception of being able to decompile a SystemUI.apk file... can anyone help with this one??
[Epic 4G Themes] shane6374:
Make sure that you have the correct resources in your apktool folder.

On your PC at C:\User\apktool\framework there should be 2 files, 1.apk & 2.apk. 1.apk is your framework resources & 2.apk is the systemui resources.

For anyone else looking at this, this is how it's set up for AOSP ICS builds not Touchwiz. Just though I'd mention that since this just happens to be in a forum for a touchwiz device.
[Epic 4G Themes] the1dynasty:
the framework-res.apk decompiles just fine... the systemui.apk doesn't want to play nice... it makes a folder that has a smali file in it... i think i read those are something to do with odex files or similar... i'm totally lost on that part... this is the one thing holding me back from digging deeper into theming >:-o
[Epic 4G Themes] shane6374:
Nope, the smali folder is basically the code that make the apk work. It really has nothing to do with odexed or deodexed. I think (95% sure) that the issue is the resource files. Also, make sure you have the lastest API level of sdk installed.
[Epic 4G Themes] bigimac78:
Just wanted to say thanks for all the info guys
[Epic 4G Themes] the1dynasty:
so with the help of shane6374 i was able to add an image to my pulldown notification... now the other issue i'm running into with that is, even tho the image is there, the original semi-transparent background is still there and covers my image... how do i edit this to remove it completely since i'll be using images for this sort of background? which xml to look in?
[Epic 4G Themes] dreamsforgotten:
What OS
[Epic 4G Themes] the1dynasty:
sorry, i'm running oICSv43 on my NS4G... keep in mind i'm still a newb to editing XML so try not to get complicated lol
[Epic 4G Themes] dreamsforgotten:
Status bar tracking.xml? Is that where you pointed to an image? There is another file in smali that keeps the image from being translucent status bar view.java
[Epic 4G Themes] the1dynasty:
yes, i added the image to "status_bar_tracking.xml"

i read somewhere about editing that smali and java stuff but that seems much more complicated than just editing xml?? i learn pretty quick but i need direction!!
[Epic 4G Themes] dreamsforgotten:
Smali is very difficult if you are figuring it out for yourself but a mod that's already done, it's just changing a value in a file. When you use apk manager go in the folder src, that's smali
[Epic 4G Themes] the1dynasty:
i see the "smali" folder but not sure where to go from there!?
[Epic 4G Themes] shane6374:
Its in the drawables.xml in the values folder. Change the transparency value to 00.

Sent from my Nexus S 4G
[Epic 4G Themes] the1dynasty:
thanks... what do i add for transparent? or do i just remove a line in that xml?
[Epic 4G Themes] shane6374:
Change the color value to #00000000

Sent from my Nexus S 4G
[Epic 4G Themes] the1dynasty:
and i don't suppose you can tell me which line that value goes to? :)
[Epic 4G Themes] shane6374:
notification_tracking_bg

Wasn't on my computer earlier to look.
[Epic 4G Themes] the1dynasty:
thanks... now my image disappeared lol :D but at least it's completely transparent now!!
[Epic 4G Themes] shane6374:
I bet I know why! Does your image by chance have the same name of that string you changed to transparent?
[Epic 4G Themes] the1dynasty:
i edited the "res/values/drawables.xml" file and only edited the "notification_tracking_bg" to "#00000000" like you said...

i added the code for the image to the "res/layout/status_bar_tracking.xml" file... this is what it looks like... and my image is named "shade_bg"

<LinearLayout android:orientation="vertical" android:background="@drawable/shade_bg" android:layout_width="fill_parent" android:layout_height="fill_parent">
<FrameLayout android:background="@drawable/notification_tracking_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<com.android.systemui.statusbar.phone.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:layout_gravity="bottom" android:paddingBottom="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/status_bar_close_on" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</LinearLayout>

i hope that makes sense lol
[Epic 4G Themes] shane6374:
<LinearLayout android:orientation="vertical" android:background="@drawable/shade_bg" android:layout_width="fill_parent" android:layout_height="fill_parent">
<FrameLayout [COLOR="Red"]android:background="@drawable/notification_tracking_bg"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<com.android.systemui.statusbar.phone.CarrierLabel android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:layout_gravity="bottom" android:paddingBottom="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</FrameLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/status_bar_close_on" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</LinearLayout>

You could play around with the part I marked in red. What I do know is that the shade_bg wasn't meant to be used as the background for the pulldown. In mine I do this with the 1st line.

android:background="@drawable/pulldown_bg" android:layout_width="fill_parent" android:layout_height="fill_parent">

Then made an image named pulldown_bg and put it in the hdpi folder.
[Epic 4G Themes] the1dynasty:
GOT IT!!! it was so simple too lol... all i did was delete everything i edited originally on that xml back to original... then i edited that red line you suggested to read like this

android:background="@drawable/[COLOR="Red"]shade_bg[/COLOR]"

and it works perfectly... i guess since i removed the "notification_tracking_bg" part of that xml, the code in the other xml doesn't need to color anything anymore!?! not sure if that's true but it makes most sense to me :)

thank you very much shane!!

*edit* i'll edit my names to reflect that area better... i just went with "shade_bg" b/c that's what it was named in the theme i was learning to edit with!!
[Epic 4G Themes] monstaX:
noob question: is there any way we can use these methods in an actual ROM. zip file? i would love to edit my current ROM without applying a whole theme. If we can is it a similar process?
[Epic 4G Themes] shane6374:
Yes, you can use these methods all over to make big or small changes.
[Epic 4G Themes] monstaX:
wow this is amazing. Thank you so much. one more question. so i can unzip a ROM, or a theme, edit the png's, rezip, then flash it and presto? and will this in anyway be able to mess up the device? by mess up i mean completely mess up, like destroy it by accident

. not like just brick it or get stuck in a boot loop.
[Epic 4G Themes] shane6374:
It's not as simple as that. The best way is to decompile and recompile but that takes some setup time an know how to do. On any apk's that are NOT SIGNED you can just extract the images you want out, edit, and then copy them back into the original zip, the exception being any image that is a .9.png. Those must be decompiled to edit and can be a pain for the n00b. If you touch any apk that is signed you will have to resign it before it will install.

Don't want to scare you away from it. It's not hard, but it's not super easy either.
[Epic 4G Themes] monstaX:
ok. thank you very much. i just finished trying it. i had the CM9 ICS zip and i copied and extracted and edited a png file in gimp. But i couldnt change colors? so i just colored some black spots.(green android person when connect usb cord to computer) I saved then made everything into a zip again. i flashed it and it worked perfectly. the only downside was that the pic of the android person was kind of pixelized around the edges, it was my 1st try so im going to get better at it.

but i am a n00b for now -.- but i will learn very soon.:).
[Epic 4G Themes] dreamsforgotten:
Good deal, I'm glad your getting it! Keep us posted if you run into anything else.
[Epic 4G Themes] monstaX:
Wow. This is so fun.:). I am skipping school today just to learn more about this. Ok so I got the terms compile and decompile. Now when I decompile an apk in the manager how can I edit it? I saw how it said image editing but when I in input the number nothing really happened. Also, what does SIGNED really mean? Thanks everyone I appreciate the help.

Edit:

OK I know what signed and all that stuff means. Now how can I compile/decompile a framework-res to edit the png 's and 9.png's? I believe it can't be done through apk manager. So what program can I use?
[Epic 4G Themes] dreamsforgotten:
It is done with apk manager, the .9 files must be edited with a different app called drawn9patch in the sdk. Those instructions as well are included with this guide, goto the op and scroll down to get to other guides the first post is only the first guide.
[Epic 4G Themes] the1dynasty:
a little trick i learned form denverg is that .9.png's can be edited with any editing program out there, i use gimp... the process is as follows...

decompile apk

open folder with png & .9.png and select the image you wish to edit

edit with image editing software of your choice. be sure to LEAVE the 1x1 black pixels ALONE!!

save your work

compile apk

flash to your phone :)

this has worked on all the apks that i've edited... no need to learn/use draw9patch or eclipse to draw out the process... i would only use that method if i'm creating a .9.png from scratch and need to figure out where to put my 1x1 pixels... hope this helps!!
[Epic 4G Themes] zanderman112:
Are you serious? I didn't know that. I should try it sometime lol

Sent from CM9 EpicMTD.
[Epic 4G Themes] the1dynasty:
yep... lmk how it works for you!!! :cool:
[Epic 4G Themes] dreamsforgotten:
As long as the lines or black dots are retained, yes it works but that is if you are retaining the original image. One point to make on this method, if you are just adding transparency to an image, in your image editing software select the region around the image and apply the transparency. If you add any at all to those guide lines, it will break them.

Thanks dynasty for mentioning the short cut, I usually change so many I never get to do it this way :(
[Epic 4G Themes] the1dynasty:
true... most of my themeing has been using stock images and just editing the colors!!
[Epic 4G Themes] monstaX:
But how can I decompile?:(.
[Epic 4G Themes] shane6374:
That trick Dynasty mentioned works, I've been using it for months. @zander, you still have to recompile after or the images will not work right.

Download and install android sdk v16. Then download apkmanager, I use version 5.0.2, and extract it where ever you want to do your work. In the apkmanager folder there will be a folder named "other", copy the framework-res.apk from the rom you are theming for into it. Also replace the aapt.exe with the one I've attached (future proofing). Open a cmd widow and navigate to the others folder and type "apktool if framework-res.apk". This will set your correct framework resource. If you're building a touchwiz rom you will need to do the same with the twframwork-res.
[Epic 4G Themes] monstaX:
ive done as you said and decompile finishes but when i recompile I get a java error in the Manifest.xml file and i didnt even edit it. Any suggestions
[Epic 4G Themes] shane6374:
Make sure you have the latest java jdk installed.
[Epic 4G Themes] monstaX:
i did have it installed. however u think it might be because im trying to edit the framework from CM9 ICS which is MTD? would that have anything to do with that?
[Epic 4G Themes] shane6374:
Nope, I've already released a theme for it. As far as java goes, you need to make sure you have the most recent version installed.
[Epic 4G Themes] monstaX:
i got the decompiling down now when i edit a strings.xml file and recompile and put it in a rom zip file it doesnt startup. i only get to the bootanimation. what am i doing wrong. am i not suposed to edit the strings.xml file.

im changing it to say instead of Your phone will shut down. i want it to say Your phone will self-destruct
[Epic 4G Themes] shane6374:
I would think it has to be something other than that.
[Epic 4G Themes] monstaX:
The thingnim trying to do should work. But I just can't get it to recompile. And this is just with frameworks. Is there anything special I have to do with frameworks before I recompile? I've tried everything! Even Googling the errors im Getting
[Epic 4G Themes] shane6374:
Paste bin your error logs so one of us can look at them.
[Epic 4G Themes] monstaX:
My log is in the here http://pastebin.com/VrH2TQ7b

---------- Post added at 02:02 AM ---------- Previous post was at 01:59 AM ----------