Related
Hi all, I started this thread hoping that we can consolidate a list of files not to zipalign or optimize the PNGs within it. Personally, I use http://forum.xda-developers.com/showthread.php?t=560271 on my themes to optimize the apks within it.
So far:
VoiceSearch.apk - Do not optimize it using http://forum.xda-developers.com/showthread.php?t=560271, it will result in FCs. However, optimizing the PNGs, putting them back into the apk, and zipaligning it works fine (thanks to djengizz for testing). Probably due to the script repacking stuff wrongly?
HTC_IME.apk - Do not optimize it.
HTC_CIME.apk - Do not optimize it.
framework-res.apk - *May* cause problems. Did it myself with no issues but others are reporting it.
Other issues:
Settings.apk - Do not compress with highest compression using apkopt. Causes a problem with MetaMorph if you use it. Reported by djengizz. More info here: http://forum.xda-developers.com/showpost.php?p=5007059&postcount=17
Did you try to extracting the images, optimize them and put them back in the apk without repacking? I think repacking might be the problem here.
From my experience none of the Google apps like resigning so i only zipalign them. I haven't ran into any problems changing (or optimizing) the images in them as long as you don't repack.
djengizz: Have yet to try that, will do so when I'm taking a break from studying, exams soon . Thank you! I've optimized the rest of the Google Apps using the above script with no issues so far (except VoiceSearch).
I've just set the script to use the maximum compression (-mx9 instead of -mx5) and i get the same results. Everything is working fine except for VoiceSearch (FC's).
Transferring the optimized png's back to the original apk and zipaligning it (not signing) works and VoiceSearch doesn't FC anymore. You might want to try it using even less compression than -mx5 and maybe than it'll also work for VoiceSearch.
do not optimize framework and HTC_CIME. They can semi-brick your phone.
djengizz: Thanks for testing out and updating this thread! Does mx9 work much better than mx5?
JokerAce: Care to elaborate more? I've optimized framework with no issues so far...
Wysie said:
djengizz: Thanks for testing out and updating this thread! Does mx9 work much better than mx5?
Click to expand...
Click to collapse
Well, not much, a little bit.
The apk i used for testing went from 2.18 MB to 1.37 MB using -mx5 and to
1.34 MB using -mx9.
yeah- HTC_IME.apk didnt work for me either..
MontAlbert: Didn't work using the batch? How about optimizing the PNGs separately, putting them back into the zip, and then zip aligning them?
tried that and zipaligned it myself... but then somehow not all pngs went across so it isnt themed properly anymore..... it worked at least though.
Oh, when I optimized them, the phone was unable to load the system, and was stucked at the splash screen. When I installed by the previous file (before optimization) the phone was working again.
JokerAce: What did you optimize by "them"? Thanks !
MontAlbert: So does it work or not? Haha ^^.
"Them" refers to the framework_res.apk and HTC_CIME.apk
JokerAce: Ok, thank you. I honestly had no issues with framework_res.apk, and I've been doing some reading in the Dream themes forum. Most of them have optimized their framework_res.apk as well (although the method used isn't stated) with no issues. I'll still add it to the list, thank you!
Aww, I tried for the second time, to optimize the framework_res.apk, and it made my phone stuck at the splash screen. Guess, some phones can (like yours) and some phones can't (like mine).
I am recently changing loads of stuff in the apks and optimizing them. If I found anymore problems, I will contribute them over here.
Cheers
framework-res works perfectly for me every time.
I found another problem with apkopt.
I compress every apk in my theme using the highest compression except for VoiceSearch.apk and if i flash this everything works fine.
After applying a morph with MetaMorph on Settings.apk it got corrupted. I replaced the optmized Settings.apk with one that only contains optimized images and MetaMorph was working fine again.
For some reason something got corrupted when MetaMorph re-zipped the optizmized apk which doesn't happen when i don't use the high compression from the apkopt script.
BTW, this is not only related to MetaMorph: when pushing the apk manually it will also corrupt and Settings will give FC's whenever it's used. For some reason when you flash it, it does work...
djengizz: Interesting problem there! Thanks! Will update the first post. is there any chance it's related to MetaMorph and not apkopt?
Wysie said:
djengizz: Interesting problem there! Thanks! Will update the first post. is there any chance it's related to MetaMorph and not apkopt?
Click to expand...
Click to collapse
Nah, i don't think so cause manually pushing the optimized apk (without running MetaMorph) also gives FC's and the Settings item disappears from the launcher.
When i push the not optimized version it works fine.
Some new info:
Brut.all said:
BTW for all who are repackaging apks: don't use zip or jar commands for app packaging. Android is compatible with them only on a first sight, but in some cases, as above, it isn't. Use aapt instead.
And I haven't see such warning in Android docs :-/
Click to expand...
Click to collapse
Hope it helps . Taken from the Maps thread.
I have a Droid, 2.0.1 (Sholes ROM) and it is rooted. I have Metamorph installed, even loaded a couple of themes - worked great!
Then I found this place and this very long list of themes. Even found the file for metamorph themes. Problem is this:
I have no idea of what the rev/version is referencing:
CM
cyanogen
AOS1.6
etc, etc.
Can someone tell me what I am looking for???
I figure that AOS is the Android Operating System but I am at 2.0.1, not 1.6. Are there just no MM themes for 2.0.1 or is there another thing I should be looking for???
Marsha
CM
cyanogen
AOS1.6
etc, etc.
This is telling you that the theme works on Cyanogen Mods (for G1/Mytouch3g)... version 1.6 (Donut)
Things made for CM and most other arent going to really work for the Droid. We are running Android 1.5/1.6 and even with using eclair, our stuff is ported so we maintain only having a drawable folder, even if there is a themed eclair ROM, if the theme is made for the G1/My Touch, only the drawable-mdpi and drawable folders are themed, we wouldnt edit things in the drawable-hdpi folder since out phones don't use it. You on the other hand need the edits in the hdpi folder since the Droid is a higher res phone. MetaMorph would be a good opportunity for you to learn the basics of themes and use that to put them together for yourself. Of course, maybe a backup of your phone before applying.
I've decided to go ahead and make a tool mostly for themers to make their life of porting the endless amounts of pictures from rom to rom. Now, this doesn't mean users cant use this as well, but PLEASE make a nandroid before hand. It's in beta so don't expect it to be perfect. I have an auto updater with it as well so ill be updating it that way.
*** i had no idea there was a working theme porter on here untill after i made this. I tried i think 1.3 and it failed so i decided to make my own. I just came across the 1.0 posted last month.
WILL NOT PORT GAPPS IF ITS NOT IN THE STOCK ROM.
Im currently working on a fix for that, if you want gapps, throw them in the stock rom your self and then port it.
Notes:
This has only been tested on Motorola Droid.
Instructions:
1. Make a nandroid. I don't want to hear whining if it doesn't work and you lose everything. I'm also not responsible if this bricks your phone. Even if it does, you have recovery, then you have SBF.
2. Download, DO NOT simply just run if your using IE (Who uses IE anymore...?)
3. Select the theme as "Select Theme".
4. Select the STOCK rom you are running as "Select Stock Rom".
5. Hit port and sit back and watch.
Limitations:
Only supports Update.zip formats, for now. i may support Meta Morphs in the future.
Only moves .pngs to new rom, Meaning if the theme has custom .xmls in it, it WONT port.
Change log:
Code:
Version: 1.0:
Ability to port themes from one rom to another.
Progress bars on extracting / moving (Title of console window)
Output log on screen (Not great, will work on.)
Version 1.1:
Added Auto Updater.
Added some crash fixes.
Version 1.2:
Fixed bug where if theme has no themed /system/app's it would crash.
Version 1.5 (Initial Release):
Fixed Progress bar on extracting / moving to archive.
Implemented Suggestion/bug reporting system.
Some general bug fixes.
Added audio on port completion.
Version 1.5.1.0
Added options form.
-Change colors of output console.
-Save last used .zips (toggle)
-Play sound on port completion (toggle)
-Fade out on exit (toggle)
Download:
TheDeathly said:
Only moves .jpgs to new rom, Meaning if the theme has custom .xmls in it, it WONT port.
Click to expand...
Click to collapse
Hmm so it will port the default wallpaper xD
Did you heard about MetaMorph? From your description I think it does exactly the same and more and it's some kind of standard in theming world.
Brut.all said:
Did you heard about MetaMorph? From your description I think it does exactly the same and more and it's some kind of standard in theming world.
Click to expand...
Click to collapse
I've heard of people having lots of issues with metamorph over a standard update.zip, and at least in the moto droid community we use update.zip's over metamorph's especially since metamorph was buggy with Froyo for the longest time, I do not know if it still is or not.
C0mpu13rFr34k said:
Hmm so it will port the default wallpaper xD
Click to expand...
Click to collapse
Oops, i meant it'll only port over .pngs. sorry for the typo lol
Hey cool, haven't tried it but does it work for porting eclair/froyo themes to cupcake/donut roms ? and vice-versa ? A lot has changed since the firmwares (including some .9 being changed to .png and vice versa). Checkout the last beta i posted, it had support for that, u cud prolly use most of the schemes.
@Brut, correct this is a lot like metamorph but metamorph is firmware dependant whereas this isnt/shudnt be. For eg, title_bar in pre eclair/froyo roms was a .png and now is a .9 png. Metamorph just inserts images and hence would cause problems. This only brings over files if they match and in some cases like my script renames them to match the firmware's naming convention (eg, pre-eclair/froyo didnt have mdpi,hdpi, just plain drawable). Hope that clears the air.
Also another thing that makes these have the upperhand to metamorph is the capability to take a dump of ur phone, put the dump of a rom u want to try and BAM ur theme is ported to that rom. Whereas with metamorph, id have to go out and look for the individual morphs that helped me accomplish the look/feel of my phone.
Daneshm90 said:
Hey cool, haven't tried it but does it work for porting eclair/froyo themes to cupcake/donut roms ? and vice-versa ? A lot has changed since the firmwares (including some .9 being changed to .png and vice versa). Checkout the last beta i posted, it had support for that, u cud prolly use most of the schemes.
@Brut, correct this is a lot like metamorph but metamorph is firmware dependant whereas this isnt/shudnt be. For eg, title_bar in pre eclair/froyo roms was a .png and now is a .9 png. Metamorph just inserts images and hence would cause problems. This only brings over files if they match and in some cases like my script renames them to match the firmware's naming convention (eg, pre-eclair/froyo didnt have mdpi,hdpi, just plain drawable). Hope that clears the air.
Also another thing that makes these have the upperhand to metamorph is the capability to take a dump of ur phone, put the dump of a rom u want to try and BAM ur theme is ported to that rom. Whereas with metamorph, id have to go out and look for the individual morphs that helped me accomplish the look/feel of my phone.
Click to expand...
Click to collapse
Hey, i actually have not had a chance to look at donut/eclair themes. My first Android phone was the moto droid so ive never done anything with a donut rom. i will make sure to take a look into that though. Ill go take a look at your latest beta now and see what i can come up with. thanks
Edit: i just took a look at your script and very nice work i have to say also, i may in the future decide to add support to 1.6 and lower to 2.0 +. it'll port most of it over as is except for the .9 and everything that does get ported over wont be resized properly as it does in yours. This should port eclair to froyo fine. ive actually ported over a mdpi to hdpi just fine with this so im assuming it works fine. in anycase thanks for the heads up.
Daneshm90 said:
@Brut, correct this is a lot like metamorph but metamorph is firmware dependant whereas this isnt/shudnt be. For eg, title_bar in pre eclair/froyo roms was a .png and now is a .9 png. Metamorph just inserts images and hence would cause problems. This only brings over files if they match and in some cases like my script renames them to match the firmware's naming convention (eg, pre-eclair/froyo didnt have mdpi,hdpi, just plain drawable). Hope that clears the air.
Click to expand...
Click to collapse
Ahh, ok, thanks for explanation.
But I don't understand, how such tool would work so it'll be flexible and reliable. I mean... it would need to guess what to do. Human could look at files and say: "Ohh, this file was moved here, so I should rename it to xxx.", but what about the computer? How it will know how to port themes to other platforms? Of course you could implement hooks for specific situations as porting between eclair and froyo. But what about custom frameworks from manufacturers? What about changes made by themers? I could add, rename, remove anything I want, so how this tool will know, what I did and how to port my changes to other systems?
Maybe I don't understand something.
Correct its definately not perfect and apks modified more than theming ie smali\xml edit will have to be left out.
Also user must select which firmware theme is and which rom is.
Still its a step up from metamorph imho. In the end the user must recognize a products limitation and react accordingly.
Sent from my GT-I9000M using XDA App
help please.. i get this error....
Error: Could not find file 'C:\Users\Jason\AppData\Local\Temp\Rar$EX00.444\port\new\META-INF'.
Whats next
What do I need to do when finished it says my ZIP file is the final folder but it is just a folder not ZIPPED please help this is too cool to not use.
Edubyah said:
What do I need to do when finished it says my ZIP file is the final folder but it is just a folder not ZIPPED please help this is too cool to not use.
Click to expand...
Click to collapse
Just go inside of the final folder and zip all the contents with a winzip, and make sure it zips as a zip file and not a zipx. after you're done you can use a program to sign your zip like RegawMOD Zip Signer v1.0.
The supplied zip file is not flashable for some reason - have had to manually add them to a ROM.
Going to test this out tomorrow. Any success stories?
I'm giving this a run, but I'm trying to port an hdpi theme to mdpi... will let you know the results. All in all, this is really nice work!!!
Unfortunately for me, the theme I wanted to port is giving me issues because it's a UI rather than a theme. I was trying to get DarkEdge on my Eris. I did want to say though that every thing worked beautifully and this is really an incredible resource for the android community.
From me to you on Cyanogentazz [insert latest version here] Eris
This works great now that it get that instant update! Thanks for the work!
Hi to everybody!
I was tired to spend a lot of time to convert old MIUI themes to the new format.
Since many themes I like have not been yet converted, I decided to create a script which takes care to decompress, compress to the new format, extract icons from framework and compress them and so on.
It's quite simple to use it: just copy old themes into "Put_here_old_themes" directory, start batch convert file and you will find the fresh converted theme in "New_themes" directory. There you will find a preview folder with 1 to 4 previews for each converted theme (just for those with short memory!!)
You are free to edit and make it better. I just ask you to give me credits if you share it. Thanks!
Here the link:
MIUI old themes converter V2
PS: instructions inside the file are Italian only. I will translate it.
could you please reupp the prog? would be very nice. Grazie
miui theme converter
hi,
will old themes now work on miui v4?
Thank you for sharing
So, I'm a themer at heart, and I love MIUI. Sometimes making MIUI themes gets me confused, I have a nice compile script set up for .9.pngs but then the folders and zips and etc etc, sometimes I get a bit overwhelmed and I completely lose myself in what I was doing. So I decided to make a sort of kitchen, resembling dsixda's ROM kitchen.. currently it's still kinda far off, but that is the ultimate goal.
This is not a graphical tool. This is not an image manipulation tool.
Basically, you take the apks you want to theme and put them in their own folder. Using framework-res.apk and framework-miui-res.apk isn't 100% necessary, but if they're not included, there's a chance the apks will not decompile properly. It will install the two frameworks if they exist, and then decompile all the apks in the folder. It goes into the AndroidManifest.xml file to get the package name (ie com.android.mms) and changes the name of the folder to it. It takes colors.xml and turns it into a theme_values.xml. It then deletes all the extra files that are not needed for a theme, and creates a generic description.xml file. It tells you to edit your pngs, description, and theme_values and run the compiler.
The compiler runs in the same directory, and compiles all the .9.pngs in each separate folder, puts the zips of them with no zip extension into a new "theme" folder, then puts it all together into an mtz in that theme folder.
If you understand MIUI theming, I hope this makes sense. I have a little video showing it off:
http://youtube.com/watch?v=Xg6UHzNjrq8
I plan on prettying it up a little bit more and I want to make a menu to use for future versions.
-----------------------------------------------------------------------------------------------------------
How to use it:
Extract v4tk folder somewhere, and add it to your PATH
Create a new folder, copy and paste the apks you want to theme into it.
- framework-res.apk and framework-miui-res.apk from the same build as the apks you're trying to edit is essential unless you already have them installed with apktool
From terminal in this folder, run "mktemplate" - this makes all the magic happen, and it actually creates a description.xml based on your input.
Edit the pngs, delete the ones you don't edit, for .9.pngs make sure to leave the 1px border alone unless you know what you're doing
Edit the theme_values files, remove the lines you didn't make changes to. Make sure no @color:android/red or whatever are in them. Hex argb only.
Go back to your terminal, run "mktheme" - this compiles all the .9.pngs, packages everything up, and creates an mtz based off your input for a filename. The mktheme script also supports lockscreen, wallpaper, icons, and preview folders... The template does not create these, but if you make them, the mktheme script will package them into the resulting mtz.
For linux or possibly cygwin (should run fine in terminal on OSX - untested though) only currently. I'm afraid it's been over a decade since I've messed with batch scripting, and before I go through the hassle of putting together a windows version, I want to have a complete project.
Also, just wanted to say one of the main reasons I'm releasing this tool is because MIUI v4 is changing a lot week to week; sometimes there's new images, sometimes there are new colors in the theme_values. If I made a template, it'd be obsolete in two weeks time
Also, this will work with any* apk for your theming pleasure, not just MIUI apps.
*maybe there's an app it can't decompile. shouldn't be, but be warned
Finally.. Download: http://lz.gd/v4tk
You Sir are a stud! and not to bad a Miui either! lol
This looks very impressive!
Nice cant wait for it!
It looks great, I love it.
Wow, seems impressive!
A Gui intefarce to exploit pngs with preview would be awesome !
Think this is a huge work
Pretty Awesome. Cant wait
Looks really cool, nice job
This is what the MIUI community needed. NICE job.
I've uploaded it with some minor cosmetic changes. It's completely functional, but not quite where I want it to be yet.. OP has been updated with some basic instructions on how to use it, post here or come find me in #miuithemes on irc.freenode.net for any issues
You sir are awesome. Got the beta downloaded. Thanks so much for your hard work and efforts.
Anybody using this? Is it working well for you?
Report any issues please.
I have not used it yet, but I plan to directly after my rom is updated from 2.5.4
Sent from my DROIDX using XDA