diff --git a/tools/squisher b/tools/squisher index 9a4b0bd5..250a248d 100755 --- a/tools/squisher +++ b/tools/squisher @@ -53,10 +53,25 @@ cd $REPACK/ota printf "Unpacking $OTAPACKAGE..." unzip $QUIET $OTAPACKAGE echo -cd $REPACK/ota/system/framework -$OPTICHARGER framework-res.apk -cd $REPACK/ota/system/app + +# Move all apks to the same directory so xargs can +# use also with framework-res.apk. This allow process +# framework-res.apk in parallel with other apks +mkdir -p $REPACK/parallel +cd $REPACK/parallel +cp $REPACK/ota/system/framework/framework-res.apk . +cp $REPACK/ota/system/app/*.apk . + +# Do optimization in parallel find ./ -name \*.apk | $XARGS $OPTICHARGER + +# Move optimized apks to repack directory +mv -f $REPACK/parallel/framework-res.apk $REPACK/ota/system/framework/framework-res.apk +mv -f $REPACK/parallel/*.apk $REPACK/ota/system/app/ + +# Return to directory +cd $REPACK/ota +rm -rf $REPACK/parallel ) # Fix build.prop