Guest 用户名已经 Posted July 22, 2011 Report Posted July 22, 2011 (edited) I want to zipalign apks in "/system/app",so I modified the file "/system/etc/init.d/97" as the following #!/system/bin/sh # Automatic ZipAlign by Wes Garner # ZipAlign files in /data that have not been previously ZipAligned (using md5sum) # Thanks to oknowton for the changes # Changelog: # 1.1 (12/1/09) Switched to zipalign -c 4 to check the apk instead of MD5 (oknowton) # 1.0 (11/30/09) Original LOG_FILE=/data/zipalign.log if [ -e $LOG_FILE ]; then rm $LOG_FILE; fi; echo "Starting Automatic ZipAlign $( date +"%Y-%m-%d %H:%M:%S" )" | tee -a $LOG_FILE; for apk in /system/app/*.apk ; do zipalign -c 4 $apk; ZIPCHECK=$?; if [ $ZIPCHECK -eq 1 ]; then echo ZipAligning $(basename $apk) | tee -a $LOG_FILE; zipalign -f 4 $apk /cache/$(basename $apk); if [ -e /cache/$(basename $apk) ]; then cp -f -p /cache/$(basename $apk) $apk; rm /cache/$(basename $apk); else echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE; fi; else echo ZipAlign already completed on $apk | tee -a $LOG_FILE; fi; done; echo "Automatic ZipAlign finished at $( date +"%Y-%m-%d %H:%M:%S" )" | tee -a $LOG_FILE; see also http://forum.xda-dev...ad.php?t=860586 But It doesn't work. what's wrong? Edited July 22, 2011 by 用户名已经
Guest t0mm13b Posted July 22, 2011 Report Posted July 22, 2011 I want to zipalign apks in "/system/app",so I modified the file "/system/etc/init.d/97" as the following #!/system/bin/sh # Automatic ZipAlign by Wes Garner # ZipAlign files in /data that have not been previously ZipAligned (using md5sum) # Thanks to oknowton for the changes # Changelog: # 1.1 (12/1/09) Switched to zipalign -c 4 to check the apk instead of MD5 (oknowton) # 1.0 (11/30/09) Original LOG_FILE=/data/zipalign.log if [ -e $LOG_FILE ]; then rm $LOG_FILE; fi; echo "Starting Automatic ZipAlign $( date +"%Y-%m-%d %H:%M:%S" )" | tee -a $LOG_FILE; for apk in /system/app/*.apk ; do zipalign -c 4 $apk; ZIPCHECK=$?; if [ $ZIPCHECK -eq 1 ]; then echo ZipAligning $(basename $apk) | tee -a $LOG_FILE; zipalign -f 4 $apk /cache/$(basename $apk); if [ -e /cache/$(basename $apk) ]; then cp -f -p /cache/$(basename $apk) $apk; rm /cache/$(basename $apk); else echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE; fi; else echo ZipAlign already completed on $apk | tee -a $LOG_FILE; fi; done; echo "Automatic ZipAlign finished at $( date +"%Y-%m-%d %H:%M:%S" )" | tee -a $LOG_FILE; see also http://forum.xda-dev...ad.php?t=860586 But It doesn't work. what's wrong? Zip aligning afaik, requires a signed release key.
Guest 用户名已经 Posted July 22, 2011 Report Posted July 22, 2011 Zip aligning afaik, requires a signed release key. But why it can ziplign /data/app/*.apk?
Guest wbaw Posted July 22, 2011 Report Posted July 22, 2011 system is mounted read only, you'd need to remount it rw. there is really no point though, it only needs doing once & it should already have been done.
Guest 用户名已经 Posted July 23, 2011 Report Posted July 23, 2011 system is mounted read only, you'd need to remount it rw. there is really no point though, it only needs doing once & it should already have been done. done
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now