One Click Rom/Theme Optimizer and Signer

Search This thread

ASimmons

Retired Recognized Developer
May 4, 2010
1,003
112
Tampa Bay
This tool will open any AOSP based rom or theme (as long as the file structure is correct) and optimize and zip align everything.

Simply grab your rom or theme and place it in this folder (should work from anywhere but you need to full path from where the cmd file is run). Now click on the reopto_runner.cmd and it will ask you where the rom is (name) that you want to optomize, type the name of the rom and hit enter, it will do the rest.

Final output of the re-optimized (double pass with 2 different png optimizers) rom will be named rom-optoed-signed-finished.zip this will be exactly the same rom except the script will optomize every png in every apk found in the system/app and system/framework-res.apk. It will also zipalign all these same apks and finally will sign the zip file. When its done just rename the rom-optoed-signed-finished.zip to what ever you want and its ready to flash.

What this won't do is make your zip file (rom, theme, update zip) flashable unless its already set up to be flashable... meaning you'll still need your update-script in the com.google.android folder to be there. Its does sign your zip file for you though.

I put this out there as its some of the scripting and tools I have made to help me in theming and rom hacking.

Feel free to use any part of this to help you in any scripting you do.
 

Attachments

  • opto_signer.zip
    867.1 KB · Views: 1,091

ASimmons

Retired Recognized Developer
May 4, 2010
1,003
112
Tampa Bay
Sweet, you are the man. Going to try it out now.

I'm going to try this on the MIUI ROM!

I have only tried this method on AOSP based roms the script should work on any rom or theme or update zip that follow this structure in the top level. system/app/*apk and system/framework/framework-res.apk, which is pretty much all of them.

The script takes about 10 minutes or so to run on cm6 rom and is really quick on most of the themes here. So for instance you could use it to make sure or re optimize a theme or roms.

feel free to tire it apart and use it in other fashions. I can guarantee it will shave some about of space of any rom or theme along with the zip aligning of every apk. If its a short request I'll post some more automated tiny scripts to todo various stuff.
 
Last edited:

vampir4997

Senior Member
Jul 18, 2010
1,505
248
Little confused. I run any aosp rom through this and it makes it compatable with the hero? ( sorry for the newb question)

Sent from my Hero CDMA using XDA App
 

jschill31

Senior Member
Jul 14, 2010
827
184
Midwest
Hello,
New to the "kitchen", items like this help us out! Thank you and looking forward to your other scripts. Any desire to do a "how to port a theme/rom" guide? Love the Screaming Droid, I laugh every time I boot up one of my 2.2 roms. I also use your R2 boot but I have yet to get sound on 2.1? Anyway a big thanks goes out to you!
 

ASimmons

Retired Recognized Developer
May 4, 2010
1,003
112
Tampa Bay
Hello,
New to the "kitchen", items like this help us out! Thank you and looking forward to your other scripts. Any desire to do a "how to port a theme/rom" guide? Love the Screaming Droid, I laugh every time I boot up one of my 2.2 roms. I also use your R2 boot but I have yet to get sound on 2.1? Anyway a big thanks goes out to you!

Thank you for the praise, wife been complaining about doing stuff for free so I might have to post my pay pal account with a wife complaining button.

I might just release a script that does it for you. mdpi to mdpi (or hdpi to hdpi) no matter what rom is fairly easy todo. Of course it can only theme what it can match but it will do it for you.

For a more in depth description would take some time so I'll probably have to do it some time later.
 

jschill31

Senior Member
Jul 14, 2010
827
184
Midwest
Thank you for the praise, wife been complaining about doing stuff for free so I might have to post my pay pal account with a wife complaining button.

I might just release a script that does it for you. mdpi to mdpi (or hdpi to hdpi) no matter what rom is fairly easy todo. Of course it can only theme what it can match but it will do it for you.



I totally understand, my wife and I have our first child on the way. I am always around so take your time. BTW, I think you would get some clicks your work is solid. I wish XDA had a "thanks" button!
 

ASimmons

Retired Recognized Developer
May 4, 2010
1,003
112
Tampa Bay
Thank you for the praise, wife been complaining about doing stuff for free so I might have to post my pay pal account with a wife complaining button.

I might just release a script that does it for you. mdpi to mdpi (or hdpi to hdpi) no matter what rom is fairly easy todo. Of course it can only theme what it can match but it will do it for you.



I totally understand, my wife and I have our first child on the way. I am always around so take your time. BTW, I think you would get some clicks your work is solid. I wish XDA had a "thanks" button!

Thanks, congradulations... get ready for no sleepy time for about 4 months after the new born. Got 2 girls myself kids are awesome especailly when I just a nig kids myself :)

Thanks for your hard work. Going to check it out.

Your welcome, feel free to alter and use whats in the script. If u have questions I can give you some more pointers on ways to make similar scripts.
 

ASimmons

Retired Recognized Developer
May 4, 2010
1,003
112
Tampa Bay
Thank you I got a new project on the way think it might be something use full to themers and people that use themes are like two switch allot. In a week or so...

Sent from my HERO200 using XDA App
 

LiquidSolstice

Inactive Recognized Developer
Jan 17, 2008
5,182
5,181
So in theory I could run this on one of Jaybob's Froyo builds and make it even faster than it is right now?
 

ASimmons

Retired Recognized Developer
May 4, 2010
1,003
112
Tampa Bay
So in theory I could run this on one of Jaybob's Froyo builds and make it even faster than it is right now?

maybe but he should have done the png opto and zipaligning already. I do add another png opto that most people dont do which will squeeze out another couple of kb, was able to shrink cm6 by 16 or so kb, which doesnt seem like alot but every bit counts.

You could use it to just see, like whenever you d/l a new rom run this on it and compare the file size, or load the rom and run a linpack and then opto it and then reload it and then do a linpack and see what you get. Some themers don't zipalign there themes and don't opto there pngs, and I have yet to see anyone use optipng and the other png opto program i use as a double pass system of optimizing pngs.

I like to use it for my themes or roms as it automates the hole process. Try it out if you use it on a rom it will give you a new optoed copy that is already sign and ready to flash... one click:)
 

LiquidSolstice

Inactive Recognized Developer
Jan 17, 2008
5,182
5,181
maybe but he should have done the png opto and zipaligning already. I do add another png opto that most people dont do which will squeeze out another couple of kb, was able to shrink cm6 by 16 or so kb, which doesnt seem like alot but every bit counts.

You could use it to just see, like whenever you d/l a new rom run this on it and compare the file size, or load the rom and run a linpack and then opto it and then reload it and then do a linpack and see what you get. Some themers don't zipalign there themes and don't opto there pngs, and I have yet to see anyone use optipng and the other png opto program i use as a double pass system of optimizing pngs.

I like to use it for my themes or roms as it automates the hole process. Try it out if you use it on a rom it will give you a new optoed copy that is already sign and ready to flash... one click:)

Sounds good :). Of course, when you say "every rom" you only mean AOSP roms, right? I'd suppose it wouldn't be able to rip, for instance, Nfinite's latest rooted Stock ROM apart and png optimize/zipalign it? If it could, holy crap. On top of the fact I use Odex, that would be amazing.
 

ASimmons

Retired Recognized Developer
May 4, 2010
1,003
112
Tampa Bay
Sounds good :). Of course, when you say "every rom" you only mean AOSP roms, right? I'd suppose it wouldn't be able to rip, for instance, Nfinite's latest rooted Stock ROM apart and png optimize/zipalign it? If it could, holy crap. On top of the fact I use Odex, that would be amazing.

should work on that to since it only looks at pngs and apk. it will onyl zip align the framework-res.apk and the system/app apk's. Actually try it out I never have but it should work.

remember to nand before you flash it but you should be a ok, as I can't see any reason why it would work.
 

LiquidSolstice

Inactive Recognized Developer
Jan 17, 2008
5,182
5,181
should work on that to since it only looks at pngs and apk. it will onyl zip align the framework-res.apk and the system/app apk's. Actually try it out I never have but it should work.

remember to nand before you flash it but you should be a ok, as I can't see any reason why it would work.

Hmm. But will I see a difference? Doesn't HTC have their own specific framework-res apk? I'd love to get into ROM themeing, so I've been poking around the ROMs for some time now.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Its not finding the file... the path is relative, so if the apk is in the same dir as the script then it should be framework-res.apk if its one dir back then ../framework-res.apk.

    Trust me the script works

    Sent from my PC36100 using XDA App
    1
    ok now only 1 more ?, promise lol

    i keep getting boot loops on a custom framework, is this a signing issue?

    Nope... if your apk isn't signed correctly it won't flash (for flashable zips) or won't work on the market updates or be marketable.

    If your just working with a framework apk it doesn't need to be signed. Don't mix frameworks between ROMs that will cause boot loops.... I always install frameworks through a flashable zip.

    Sent from my PC36100 using XDA App