I'm trying to compile a theme with apktool, all went well and installed without error, but when I try to apply it, it says "This theme was improperly compiled and cannot be applied"
would anyone have any idea what went wrong there?
edit: just see where the problem might be, when apktool recompile the files, it never compiled the 9 patch files correctly
Is this for desire hd any chance of u putting the theme up for us all
Sent from my Desire HD using XDA Premium App
it is, just a test on making a new theme, its pink version of honeycomb theme maybe not for everyone but the misses thinks its nice, just need to get it to compile properly, once this is all working I will be working on more themes.
and this is to be use only with cm7 theme chooser for now
ok its not the image or anything at all, its apktool, I decompiled a working theme apk then did nothing to it just recompile with apktool, not working anymore.
anyone have any idea?
got a bit more success, using Apk Manager, it will install and can be applied, but preview image is not showing and theme_name is not showing, instead it says @string/theme_name, I can edit that out to make the name showing, but couldnt get the preview to show, also when applying, a message comes up says "sorry this theme is missing assets for your device's screen size".
any help out there? not one single themer like to help ???
there was no help but its sorted,PinkHoney for the misses
Just noticed your thread, I don't know if you were able to sort it out and have your preview image, but my problem came from putting the preview.png in the drawable-hdpi folder, when I put it in the drawable folder, then the preview would be used and the theme applied properly.
I still have no preview showing not sure why, but went a very long route and got the theme to work. its only for the misses so not too important as to rather preview shows or name of the theme shows. I did put the preview in drawable to try as well but didnt work, but thanks for the reply.
Missing assests I got this on a few themes don't know why but still everything worked
Sent from my Desire HD using XDA Premium App
Related
I remember when I had my myTouch, you could essentially pull the framework-res.apk file, modify it using a program like 7zip which keeps the file verified, then push it back to the phone.
It was nice and easy changing the graphics. Was wondering if anyone's tried this with their Slide so far? I know sometimes (only if done wrong) it could cos infinite boot = nandroid. Not sure I want to try it just yet, anyone out there doing any themeing so far? If so, how'd you do it?
android007 said:
I remember when I had my myTouch, you could essentially pull the framework-res.apk file, modify it using a program like 7zip which keeps the file verified, then push it back to the phone.
It was nice and easy changing the graphics. Was wondering if anyone's tried this with their Slide so far? I know sometimes (only if done wrong) it could cos infinite boot = nandroid. Not sure I want to try it just yet, anyone out there doing any themeing so far? If so, how'd you do it?
Click to expand...
Click to collapse
there is a theme forum for this phone, please post this in there(there is also already a post in there full of people trying)
android007 said:
I remember when I had my myTouch, you could essentially pull the framework-res.apk file, modify it using a program like 7zip which keeps the file verified, then push it back to the phone.
It was nice and easy changing the graphics. Was wondering if anyone's tried this with their Slide so far? I know sometimes (only if done wrong) it could cos infinite boot = nandroid. Not sure I want to try it just yet, anyone out there doing any themeing so far? If so, how'd you do it?
Click to expand...
Click to collapse
Im working on one right now...i got the red slide but it has no red themes to speak of...the Fuzzy_Kittens one has a kindof a red theme to it, but all the selectors and highlights and button_press's are all still blue, and its UGLY. so im working on eradicating all the blue, in favor of red.
For the most part its the same as themeing for the G1. There's a LOT more apks in /system to make changes to, and ive found that theres TWO frameworks to take care of, the normal android framework-res.apk, and the also in /system/framework there is com.htc.resources.apk, which is apparently htc's version of framework-res. it contains all kinds of images called common_<whatever>.png and this is where i found the files that make up the default "Nest" theme. all the other themes that you can choose for the Slide are in .apk form and up until we had root i was modifying and installing the apk's to theme this puppy, but i could never find the .apk for the default theme...well thats why, the default theme is in com.htc.resources.apk, and its the default espresso theme, not a tmobile theme.
Im still working on my theme, its not ready yet, i just had yesterday to work on it, and ive made some progress, but i still have to get a generic 2.1 ROM to build so i can extract the xmls from it to inject into the ROM to change colors that are coded like progressbars, white backgrounds, etc. so whenever i get time for that ill be rollin...then i wanna try to get colorchange.jar to work on SlideMEROOT2 so i can change the clock and notif. text and stuff...alll in due time!
-BMFC
You have to de-odex the framework-res and the com.HTC.resources to theme
-------------------------------------
Sent via the XDA Tapatalk App
thatguythatdid said:
You have to de-odex the framework-res and the com.HTC.resources to theme
Click to expand...
Click to collapse
Sorry, but im afraid you're wrong...i didnt de-odex anything, and my theme is working fine...i can upload screenshots if you dont believe me.
-BMFC
bmfc187 said:
Sorry, but im afraid you're wrong...i didnt de-odex anything, and my theme is working fine...i can upload screenshots if you dont believe me.
-BMFC
Click to expand...
Click to collapse
even though you sound like a di*k. Good find I had been theming using de-odexed files but I'll give this a try.
Sorry, but im afraid you're wrong...i didnt de-odex anything, and my theme is working fine...i can upload screenshots if you dont believe me.
-BMFC
Click to expand...
Click to collapse
even though you sound like a di*k. Good find I had been theming using de-odexed files but I'll give this a try.
Click to expand...
Click to collapse
Honestly you're kinda right, I do come off sounding like a **** a lot...sorry didn't mean for it to come out that way...
anyway yeah you can do it without deodexing, I'm just using winrar to extract the whole ROM to a folder, then I go into and extract all .apks using 7zip (winrar doesn't recognize .apk files, you hafta rename them to *.apk.zip, but 7zip works on .apks without renaming them at all). Then I just modify or replace whatever images then inject them into a copy of the ROM .zip and resign and reflash...works great for me!
-BMFC
-------------------------------------
Sent from my ROOTED MyTouch3G Slide
If anyone can help, please take this zip and make it compatible for the Hero. right now it's for the Droid running Cm6. http://www.multiupload.com/BHME414DUC
Thanks
abu_noah said:
If anyone can help, please take this zip and make it compatible for the Hero. right now it's for the Droid running Cm6. http://www.multiupload.com/BHME414DUC
Thanks
Click to expand...
Click to collapse
Its not something you do in a few minutes.
He's been working on it for a bit, think he needs help with the finishing touches
Sent from my HERO200 using XDA App
MrSpradlen said:
He's been working on it for a bit, think he needs help with the finishing touches
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
I have been working on this for a bit, but this is just the Full on flashable zip, made for the Droid. I got three kids and not alot of time to resize every image to mdpi. plus this is coming from the a droid theme, so I'm not sure what to do with the drawable-nodpi images and other if any nopi images. anyway, i'm just asking for help, not for "I can't help you" or "Alot of work" answers. I know it's alot of work as i have driving myself crazy on how to do it. Thanks.
I tried using the theme porter to save time but it will not recognize 9.pngs and I'm pretty sure that's why it's not porting.
abu_noah said:
I tried using the theme porter to save time but it will not recognize 9.pngs and I'm pretty sure that's why it's not porting.
Click to expand...
Click to collapse
What errors are you getting, what issues are you having? sorry to be so coarse.
ASimmons said:
What errors are you getting, what issues are you having? sorry to be so coarse.
Click to expand...
Click to collapse
I have converted the hdpi to mdpi now I think. before I used the theme porter, but it kept saying system file cannot be specified. well i got the pngs converted and the folders renamed, but I don't have a hero to test it on. I use my wife's when she's here. Don't know if this will work or not.
I also need to know if the images in the framework-res are the only thing I need to change, and then I can flash that same package that was meant for the droid or if I need to transfer those over to the Hero's framework-res?
abu_noah said:
I have converted the hdpi to mdpi now I think. before I used the theme porter, but it kept saying system file cannot be specified. well i got the pngs converted and the folders renamed, but I don't have a hero to test it on. I use my wife's when she's here. Don't know if this will work or not.
Click to expand...
Click to collapse
I almost positive you cant just rename folders like drawable-hdpi to draw-mdpi as theres more in the apk that specifies that the apk is built for an hdpi phone.
This is how I do it (short version cause I'm working out kinks). basically just copy over the pngs from the hdpi folders to the mdpi folders. Basically the difference in size from hdpi to mdpi is about 66% the size of an hdpi png so in the process of copying them I also shrink them. 9 patch pngs are a alot harder to get right and I currently working through some ways to port those now, but for a basic port you can just leave them as is. If you wanted to fix the 9 patch you basically have to decompile the apk and then use the 9patchDrawable tool in the android sdk and gimp to shrink them and then redraw the patch borders.
Your problem is most likely trying to rename the file folder. The port should only bring over the pngs and maybe ( i never do) some minor xml tweaks and put those in the rom your porting to you can't use anything from the ported rom except the pngs unless you want a buncha headaches.
READ THIS FIRST:
The original post is here alot of questions have been answered, here browse around there first.
UPDATE 9 PATCH TWEAKS:
This new version will port your favorite hdpi theme to an mdpi rom... yes 9 patch resizing. I want to be the first to say this is not 100% and it probably never will be, and over the next couple of days we can discuss this.
What it will do is resize every 9 patch in a rom and move it over to the mdpi theme. Yes this is the same method I used for all my hdpi ports.
What it might not get is the 9 patching data correctly, which means that it might get stretched incorrectly, most times you won't noticed but others it will be obvious. This will happen anywhere from 1% to 30% of the 9 patch pngs in a port, but all you will need to do is redraw them using the 9 patch draw tool in the adb folder.
My next version will have this included along with some instructions, along with font and boot animation porting.
Please respect other peoples work. If you port a theme using this and repost it don't just link back to the op... mention the author and give them props.
Also want to say I spent a looooong time trying to figure this out, and I tried many different ways, and I'm open to others suggestion on making this better
Oh and don't forget to to install Image Magick, its included and the HDPI to MDPI will not work without this.
This tool will take your favorite theme and inject it into your favorite rom... provided they are compatible with each other (might work if they aren't but thats for later). I did this cause alot of themers and people who like themes are always waiting for the nightly theme to get applied, well this will do it for you.
You can think of this as almost a theme installer.
INSTRUCTIONS by Norm12:
1. Download and extract.
1.5 Install image magick from the image magick folder... just run the installer and its ready to go. This is important the hdpi to mdpi will not work without it.
2. Copy both the theme and rom into the 1 click folder---the extracted one.
3. Open the 1-click folder and you should see your theme, rom, lib folder, and the injector script.
4. Doubleclick on the injector script----if you did everything correct it will open a cmd prompt
5. Enter the names of the rom and theme when asked...I did use the exact names and added ".zip" to the end.
5.5 Answer y if this is an hdpi to mdpi port otherwise n.
6. Hit enter and wait. When it is really done it will auto-close the cmd prompt. This may take 15 minutes.
7. Your newly themed rom will be in the same folder as the unthemed rom and theme zips. If it worked it should be slightly larger than the original rom. Enjoy
!!!IMPORTANT... BECAUSE 7ZIP SHOWS OUTPUT IGNORE THE "EVERYTHING IS OK" LET THE SCRIPT FINISH WHEN ITS DONE IT WILL CLOSE ITSELF IF YOU DOUBLE CLICKED IT OR IT WILL RETURN TO COMMAND PROMPT!!!
Ignore any errors your seeing while it runs, this is normal like before let it run completely through till it closes out.
Run time could be up too 20 minutes (60 with HDPI to MDPI) on a big theme/rom, but faster that waiting!
You must now install Image Magick if you would like to use the hdpi to mdpi resizing!
ISSUES:
There also seems to be an issue with the gallery3d.apk and the differences in the mdpi and hdpi version. For now remove this from the theme your porting otherwise it won't come out right.
Update 4:
HDPI to MDPI porting!!!!!
Update 3:
Removed verbose but added optopng verbose just let it run. It works but you have to let it finish, the cmd window will close it self.
Update 2:
Added verbose output so that you guys will know to close it out before its done...even tho 7zip says everything is ok... just let it do its thing.
Update 1:
Had the optimization stuff commented out... sorry its back on.
Script will clean up now after it finishes.
JAVA CLASSPATH:
Its needed for the signer to work properly goto a command prompt and type in java -version. if you get and error back java is not in your classpath and needs to be.
just right click on my computer, then goto properties, then click on the advanced tab, at the bottom click on the "Environment Variable" button.
Now click on the new button... the one on the bottom for system variable and put in this
variable name: JAVA_HOME
variable value: C:\<path-to-where-java-is>
Now click ok and select the path system variable and then click edit. IMPORTANT only append to the end of the value this... ;%JAVA_HOME%\bin
then click ok and ok out of all those windows and open a new command prompt and type java -version you should get no error if you do your path to java was wrong follow the steps above again and make sure the path is correct.
WHAT THIS WON'T DO:
It won't port over xml or smali edits.
It wont port over what it can't find... so if your theme has a facebook widget or something but the rom does not then it will ignore that.
It will not port over fonts or anything other than the framework-res.apk and all the themes apks in the system/app folder. If this is popular Maybe other stuff can get included.
WHAT THIS WILL DO:
Shrink a 9 patch from HDPI size to MDPI size.
Push over all the themes pngs from the apk with it to the roms matching apk.
Optimize every png in the theme you are porting over.
Zip align all the apks in your newly themed rom.
Sign the newly themed rom.
Give me feed back.
I might make this easier and make the injector steal the apks for injection right from your phone and then inject and make a flashable to put right back on... tell me what you think.
New HDPI to MDPI version with 9 patch porting download
reserved 10char..
Nice work
Sent from my HTC Desire using XDA App
TheRedDrake said:
Nice work
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
Thank you. hasn't caught on in this forum yet i guess.
I'll try this out now, this seems easier than the theme porter that's already on the forum.
Looks promising! I will try it out right now!
dl and try after work
will this work for porting themes to the HTC Tattoo?? does it rescale the theme to suite the phone?
vura said:
will this work for porting themes to the HTC Tattoo?? does it rescale the theme to suite the phone?
Click to expand...
Click to collapse
This will port any theme to any rom... provided they are compatible. So while you can go from a sense theme and inject it into a AOSP rom, it probably won't catch everything since it works off of matches. It also does not have any scaling included.
The biggest thing with this is that the theme and rom have to have a same file structure so all rom come and the have the system/app folder and the system/framework/framework-res.apk, this is what the injector looks for. So honestly you could build a theme from a buncha different apks from other themes it will inject that into your rom and give you back a flashable zip. So a good theme structure example would be Gommarah's Black Mod in the HERO CDMA forum.
I do however have a way to port HDPI theme to and MDPI ROM but its not 100%... if I get enough request I'll put it in its just the process I use to accomplish this is very complicated and requires some extra software, its also adds a significant overhead to the script run time (and 3x longer to run) It works in the since the it will shrink the HDPI 9patch png but the 9 patch data is wrong about 10-20% of the time. This won't cause the roms to force close but will just make some of the 9patch pngs to stretch wrong and would require a simple edit in the 9patch draw to fix it.
+1 for hdpi to mdpi scaling!
Any others want the hdpi to mdpi scaling? I've considered releasing it.
Sent from my PC36100 using XDA App
Just curious if I did this right as I am still fairly new to this whole scene and this whole process seemed to work way to easy. But basically I got both the rom and theme converted and then signed both zips. Does that mean that I can now successfully flash the new theme? Thanks in advance!
theu2621 said:
Just curious if I did this right as I am still fairly new to this whole scene and this whole process seemed to work way to easy. But basically I got both the rom and theme converted and then signed both zips. Does that mean that I can now successfully flash the new theme? Thanks in advance!
Click to expand...
Click to collapse
There is no need to sign anything, the injector will sign the final output zip. Take your theme zip and your rom zip and place it in the folder next to the script. Then just run the script when its finished you will get a a new zip called themed-<roms-name>.zip.... this is ready to flash (optoed, align and signed).
ASimmons said:
Any others want the hdpi to mdpi scaling? I've considered releasing it.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Can I vote multiple times?
Ill try and get it ready for this weekend and see what you think.
Sent from my PC36100 using XDA App
First of all,great software worked as a charm...
I subscribe to the resizing,all the best themes are for HDPI...would make this the best theming tool out there for android
thanks that did it!
what if the rom needs has a seperate gapps.zip with it? thanks!
theu2621 said:
what if the rom needs has a seperate gapps.zip with it? thanks!
Click to expand...
Click to collapse
Just put the gapps system/app files into your ROM's system/app files. Then inject your theme, the tool does the rest
thanks again for the help! yall really helped, and rather quickly too!
Hello,
i found a really nice theme for my CM7 install and really like it except one thing, it has a skinned Market app which I don't like and I would like to remove the skin for Market.
So i went to decompile the theme with apktool and with what I read in this forum, I've come to conclusion that it would be enough to remove the coresponding line from redirections.xml. However, when I recompiled the theme, resigned it and installed it, Theme chooser says it's been incorectly compiled.
Is there anything I'm missing here? Running apktool on Windows with correct framework-res.apk if that matters.
Thanks!
As everybody knows, in our android smartphone from 4.0 there is a possibility to switch between holo light and holo dark theme...but without selector on settings, only change some value on system.
Reading around, I have found that maybe we have to modify "androidmanifest.XML" but every apk have one, and I don't know which edit.
I tried to edit from "framework-res.apk" but when I finished and recompiled again, and replace with existing one, I have only a boot loop.....
Someone can help me to understand which file I have to edit for switch from holo.light to holo.dark???
Thanks to everybody....
Inviato dal mio U8800pro con Tapatalk 2
no one can help me to understand??
Maybe I have explained so bad, or really nobody knows how to change the theme?
Well there is no straightforward answer. Some apps declare their theme in the styles.xml inside the values folder. Others do it in the manifest. That's what you need to change. It's app specific. The framework has nothing to do with it
Sent from my One S using Tapatalk 4 Beta
Thanks for your answer, i explain you one thing to understand better:
The same ROM has been created in white (holo.light) and in dark gray (holo.dark). If i explore all the System apk, in androidmanifest.xml there is the value "holo.light" in white rom, and "holo" in dark version....
You can tell me to replace the androidmanifest.xml with existed one, but if i do it, i have a bootloop, i have tried to edit it, and i have the same problem, but if i change the entire apk, it work perfectly and change the apk theme color.....why this???
And finally, all the applications i download from the market, are not personalized with a single theme, it turns white or black depending on a value that tells him to become white or dark, which is the same, in my opinion, that runs the Rom in white or dark.
Which is this value, and where i can find it???
Don't change the whole manifest. Only that line. And remember, there WILL be parts of the app which will not look right.
Sent from my One S using Tapatalk 4 Beta
You would need to go through all the .xml files in systemui.apk and framework-res.apk and change all the image redirections. Or make a cm theme apk
Sent from my Droid Incredible using xda premium
Chris95X8 said:
Don't change the whole manifest. Only that line. And remember, there WILL be parts of the app which will not look right.
Sent from my One S using Tapatalk 4 Beta
Click to expand...
Click to collapse
I have tried both replacing the entire "AndroidManifest.xml", and change only the individual lines where it was written "HOLO.LIGHT" and made him "holo" (deleting the word "light"), but the result is always the same: with the "framework-res.apk" does not start the rom, with any other apk (settings.apk for example) I do not install the apk.
Shakes27 said:
You would need to go through all the .xml files in systemui.apk and framework-res.apk and change all the image redirections. Or make a cm theme apk
Sent from my Droid Incredible using xda premium
Click to expand...
Click to collapse
You think is a redirections problem??? The images there are all on "res/drawable-hdpi" and cheking both xml files (ROM HOLO AND ROM HOLO LIGHT) there are not differences except the lines where is writed "Holo" on dark theme, and "holo.light" in white theme.
If someone want help me, i can send in private the same apk you want, version dark, and version white, so you can help me to understand......
Is there anyone????
cuvetto said:
Is there anyone????
Click to expand...
Click to collapse
what you are asking to do is very very complicated. there isn't an easy answer. you would have to retheme every single app on your phone. plus changing manifest won't work....especially if an app is only coded for holo dark...but the major problem is that no developer follows google style designs 100%, not even google at the moment.
cuvetto said:
Is there anyone????
Click to expand...
Click to collapse
after pushing framework-res.apk into your phone, go to recovery and try fixing permissions.
Check this thread
http://forum.xda-developers.com/showthread.php?t=2220549