FORUMS
Remove All Ads from XDA

[APP] Zipalign binary and script - Optimize installed applications

383 posts
Thanks Meter: 32
 
Post Reply Email Thread
5th December 2009, 02:19 AM |#11  
djluis48's Avatar
Senior Member
Flag Santo Domingo
Thanks Meter: 232
 
More
Quote:
Originally Posted by garz

so anyone wanna bless me with a terminal code to install the script?

Read, its on the first post....xD
 
 
5th December 2009, 02:21 AM |#12  
LucidREM's Avatar
Senior Member
Flag Baltimore
Thanks Meter: 5
 
More
Arrow ZipAlign
Quote:
Originally Posted by garz

so anyone wanna bless me with a terminal code to install the script?

# lucid -z
5th December 2009, 05:53 AM |#13  
Senior Member
Brooklyn, NY
Thanks Meter: 48
 
More
yeah so su? then #lucid -z? cause that did nothing for me...
5th December 2009, 05:54 AM |#14  
wesgarner's Avatar
Senior Member
Flag Birmingham, AL
Thanks Meter: 62
 
More
Cool
Quote:
Originally Posted by LucidREM

i do not even know what zipalign does .. but i did add this to my script

# lucid -z

so .. what does it do exactly?

I put a quick explanation of my script on my ROM page: here ya go (rough explanation)
Quote:

Zip Align reduces the amount of RAM used during processing running for a major speed increase in dex-opt and running the apps, along with the RAM hack and a CC (or your userinit) boots speeds incredibly and better usability of apps (boot and system) in Android: http://developer.android.com/guide/d.../zipalign.html
Most developers have not used this yet (CM does ZipAlign his apps), but this does for the system apps provided from the now old Google Apps

5th December 2009, 07:38 AM |#15  
BrooklynAvi's Avatar
Retired Recognized Developer
Flag Brooklyn
Thanks Meter: 75
 
More
Quote:
Originally Posted by senab

Since the 1.6 SDK was released, the ADT does this automatically on APK export. Therefore any app which has been updated since ~September (and was developed using the ADT Eclipse plugin) will be zipalign'd. I was more surprised that 12 out of the 43 apps on my phone weren't aligned!

Agreed. The Market won't let non-zipaligned apps be uploaded.
5th December 2009, 07:49 AM |#16  
wesgarner's Avatar
Senior Member
Flag Birmingham, AL
Thanks Meter: 62
 
More
Quote:
Originally Posted by AndroidAppCritic

Agreed. The Market won't let non-zipaligned apps be uploaded.

it will really, it doesn't detect the diff
Also, SDK4 didn't really include an enforced ZipAlign like SDK5 (eclair) does
Plus I built the ZipAlign from source from eclair - so this script may not update them all perfectly
5th December 2009, 10:25 AM |#17  
senab's Avatar
OP Senior Member
Flag London, UK
Thanks Meter: 32
 
Donate to Me
More
Quote:
Originally Posted by garz

yeah so su? then #lucid -z? cause that did nothing for me...

Unzip the files to your SD Card, then:

Code:
su
mount -o remount,rw /system
mv /sdcard/zipalign /system/bin
mv /sdcard/zipalign_apks /system/sd/zipalign_apks.sh
chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
mount -o remount,ro /system
5th December 2009, 11:43 AM |#18  
Senior Member
Thanks Meter: 14
 
More
Post deleted becoz it was redundant
5th December 2009, 12:47 PM |#19  
Senior Member
Thanks Meter: 195
 
More
can someone make a script for windows or a bat file that can zipalign a batch of apks? I am not that ofay with line commands and when i create a new theme (which i often do), i then have to go and zipalign every single apk i have altered 1 at a time..... i do:

Code:
zipalign -f -v 4 E:\app\theapp.apk E:\app\theapp.apk.out
5th December 2009, 01:04 PM |#20  
turboyo's Avatar
Senior Member
Flag Miami
Thanks Meter: 2
 
More
Quote:
Originally Posted by senab

Unzip the files to your SD Card, then:

Code:
su
mount -o remount,rw /system
cp /sdcard/zipalign /system/bin
cp /sdcard/zipalign_apks.sh /system/sd
chmod 755 /system/bin/zipalign /system/sd/zipalign_apks.sh
mount -o remount,ro /system

This isnt working for me bc of the .sh after zipalign_apks .. do i rename the zipalign_apks to zipalign_apks.sh after unzipping?

edit:that worked THANKS!
5th December 2009, 02:37 PM |#21  
senab's Avatar
OP Senior Member
Flag London, UK
Thanks Meter: 32
 
Donate to Me
More
Quote:
Originally Posted by turboyo

This isnt working for me bc of the .sh after zipalign_apks .. do i rename the zipalign_apks to zipalign_apks.sh after unzipping?

edit:that worked THANKS!

My bad, i've updated the first post with a fixed adb push command. I thought I had renamed it to .sh in the zip but I obviously hadn't.
Post Reply Subscribe to Thread

Tags
1.21 gigawatts!

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes