# Adding a Theme Chooser theme to a ROM permanently (as default/system setup)



## Romified (Sep 20, 2011)

A quick question, I hope someone can point me in the right direction....

On Theme Chooser themes, how can I take a theme and integrate it into a ROM so it is the "default" of "system" theme. I know I can just migrate the graphics over to the proper files (framework-res and systemUI) but there are also quite a few xml files involved, and no easy way I can tell as to where to put these or how to use them as their filenames don't all match the original files in the ROM. When you apply a Theme Chooser theme, it does not effect the atcual framework files, correct? In other words, if you aplly the theme you can't just copy the frameowrk and systemUI files to capture it. I tested this and from I could tell, it did not work like that. I hope this makes sense, very much looking forward to any help someone experienced with this can offer.


----------



## HalosGhost (Jun 29, 2011)

I'm not sure what advantage would be garnered by doing this, and I'm not sure how I would go about doing this. But I would bet it would include making a metamorph style zip from the themechooser apk and flashing it with ZipThemer. I'm not that hot of a themer and I don't have a ton of experience with making metamorph zips, so I can't really help you much more than pointing you in that direction, but it'd be interesting to see how you/someone accomplished this.

All the best,

-HG


----------



## Romified (Sep 20, 2011)

I am wanting implement the theme into a custom Rom so when its flashed and loaded, the elements of the theme show up default.


----------



## HalosGhost (Jun 29, 2011)

Ahh, well that's certainly beyond the scope of my knowledge, but if that's what you want, the answer to your original question will not suffice. What you want to do is edit the .zip of the ROM you're flashing to include whatever theme you want as the default. It may be as simple as replacing files already found in the zip with those from the theme, but I doubt it.

I'd recommend you send a PM to one of the tons of talented themers here, they're much more likely to be able to help. Sorry I can't be.

All the best,

-HG


----------



## Turdbogls (Jun 7, 2011)

after looking through my system/app folder on CM7, it looks like there isn't a "system".apk file. my guess is that when "system" is applied through the theme changer, it just sets everything to the default framework-res.apk and systemUI.apk that are built into the ROM.

so this leads me to believe that you would have to take this theme chooser theme, unpack it, and replace all the images one by one and get the correct name to go along with them. not something that can be easily done. theme chooser apps are all named slightly different than default framework images. so to do this would take a LOT of time.

your best bet is to take the theme switcher theme.apk and put it into system/app of the ROM and make sure the permissions are rw-r-r. this will cause it to show up in the theme switcher right away just like the cyan and androidian themes in CM7. not exactly what you wan't but its not worth the time IMO. if it is, you now know how to do it.

i have a modified Honeycomb theme on my SD card. any time i wipe data and flash a CM7 ROM, i just boot into CM7, open root explorer, copy the file from my SD card, place it in system/app, change permission to RW-R-R and reboot and it is there. works like a charm, and takes about 3 minutes from start to finish.


----------



## Romified (Sep 20, 2011)

Turdbogls said:


> after looking through my system/app folder on CM7, it looks like there isn't a "system".apk file. my guess is that when "system" is applied through the theme changer, it just sets everything to the default framework-res.apk and systemUI.apk that are built into the ROM.
> 
> so this leads me to believe that you would have to take this theme chooser theme, unpack it, and replace all the images one by one and get the correct name to go along with them. not something that can be easily done. theme chooser apps are all named slightly different than default framework images. so to do this would take a LOT of time.
> 
> ...


No, it's not as easy as just copying the files into the proper framework files (framework-res and systemUI). There are all kinds of XML files as well in this one and they don't have a home in the frawework files anywhere, so the system must rely on these instead of the framewrok files when this theme is selected. I have questioned the develop of the theme as since they know Theme Chooser good enough to be able to develop a theme for it, they may have a solution. You can set defaults in some XML files in APKs (you can even do this in a ROM for settings like display timeout, sound profiles) but I can't find an XML in Theme Chooser that will let you set a default theme. If you could, I could just place the theme in /data/app of the ROM package and would be good to go. Just trying to avoid the step of a user loading a ROM and having to go into Theme Chooser to select a theme, I would much rather have it default. Besides, I'm tweaking much of the theme to my liking anyway. Looks like some trial and error time...that's always fun seeing what I can break.


----------



## DroidVicious (Jul 12, 2011)

Romified said:


> No, it's not as easy as just copying the files into the proper framework files (framework-res and systemUI). There are all kinds of XML files as well in this one and they don't have a home in the frawework files anywhere, so the system must rely on these instead of the framewrok files when this theme is selected. I have questioned the develop of the theme as since they know Theme Chooser good enough to be able to develop a theme for it, they may have a solution. You can set defaults in some XML files in APKs (you can even do this in a ROM for settings like display timeout, sound profiles) but I can't find an XML in Theme Chooser that will let you set a default theme. If you could, I could just place the theme in /data/app of the ROM package and would be good to go. Just trying to avoid the step of a user loading a ROM and having to go into Theme Chooser to select a theme, I would much rather have it default. Besides, I'm tweaking much of the theme to my liking anyway. Looks like some trial and error time...that's always fun seeing what I can break.


If you decompile the theme chooser apk let's say meizu theme or orion for example, the meta inf folder will hold the updater script which is telling and point those file in the direction they go... So if you break those theme apk's down it will look or it should look something similar to a framework-res apk so pretty much what you could possibly do is replace the .xml's from the according folder in to the framework-res that will be the custom rom's res apk, as far as the .9's that may be there or say the jpg's and or png's they will have names like for example sys_battery or something like that but in the theme chooser apk it will most likely be framework_sys_battery or systemui_sys_battery........ You may be able to take each file and rename them to just sys_battery and place them in the proper apk's for systemui and framework-res apk... I'm not a themer but from my time digging around and looking at and picking at stuff I would imagine as they are all properly assigned to the correct locations and the xml's are in there proper locations and when you recompile the apk's I would make sure you sign off on them even though rom manager supports unsigned files I would still sign off on them and merge in to the custom rom and flash... That's just a serious thought of it and educated guess that it may work??? Give it a shot.... LOL you are gonna be renaming files for a hot minute though LOL... Lemme know if you need anything!!


----------



## lmt1979 (Jul 1, 2011)

You basically download the vanilla CM7 extract it out. Using 7zip you choose "open the archive"on the .apk (framework-res.apk and settings.apk and systemui.apk will make the most effect) don't extract the apk it'll break the signing and you can inject the pngs inside the .apks. It'll probably be a good idea to run it though the UOT kitchen to fix xmls and such if you want special batteries and such. The /system/framework/framework-res.apk has a file in the drawables folder called progress_horizontal that colors the volume bars, as well. "USUALLY" the drawable-hdpi is where the icons/pictures are located that you will want to replace.

Mine looks like this I update it for new CM7 releases:

https://lh5.googleusercontent.com/-EITBW8WAZn4/TpM_tJoKjtI/AAAAAAAAAVU/_qog_K6kRKQ/s512/screenshot-1318272919169.png


----------



## DroidVicious (Jul 12, 2011)

lmt1979 said:


> You basically download the vanilla CM7 extract it out. Using 7zip you choose "open the archive"on the .apk (framework-res.apk and settings.apk and systemui.apk will make the most effect) don't extract the apk it'll break the signing and you can inject the pngs inside the .apks. It'll probably be a good idea to run it though the UOT kitchen to fix xmls and such if you want special batteries and such. The /system/framework/framework-res.apk has a file in the drawables folder called progress_horizontal that colors the volume bars, as well. "USUALLY" the drawable-hdpi is where the icons/pictures are located that you will want to replace.
> 
> Mine looks like this I update it for new CM7 releases:
> 
> https://lh5.googleusercontent.com/-EITBW8WAZn4/TpM_tJoKjtI/AAAAAAAAAVU/_qog_K6kRKQ/s512/screenshot-1318272919169.png


That's actually pretty F'n cool look'n lolol.... Some good knowledge to know though! You should put up a HOW-TO, people would absolutley respond to that notion!!!


----------

