#!/bin/sh
#
# Super-mega opticharger of doom
# Shrinks apks by running pngcrush or optipng or pngout on png images
#
# Point APKCERTS at the full path to a generated apkcerts.txt file, such as:
# /home/shade/dev/sources/android-cm-eclair/out/target/product/dream_sapphire/obj/PACKAGING/target_files_intermediates/cyanogen_dream_sapphire-target_files-eng.shade/META/apkcerts.txt
#
# cyanogen - shade@chemlab.org
# ChrisSoyars - me@ctso.me

set -e
QUIET=1
BASE=`pwd`
BRUTECRUSH="-brute"
TMPDIR=/tmp/opticharge-$$

if [ -z "$BRUTE_PNGCRUSH" ]
then
    BRUTECRUSH=""
fi

if [ "$APKCERTS" = "" ];
then
    if [ "$TARGET_BUILD_VARIANT" = "userdebug" ]; then
       TARGET_BUILD_VARIANT="eng"
    elif [ "$TARGET_BUILD_VARIANT" = "user" ]; then
       TARGET_BUILD_VARIANT="eng"
    fi

    APKCERTS=$OUT/obj/PACKAGING/target_files_intermediates/$TARGET_PRODUCT-target_files-$TARGET_BUILD_VARIANT.$USER/META/apkcerts.txt
    if [ ! -f "$APKCERTS" ];
    then
        echo "Set APKCERTS to the path to your apkcerts.txt file"
        exit 1;
    fi
fi

if [ ! -f "$APKCERTS" ];
then
    echo "Invalid path to apkcerts.txt, set APKCERTS to the correct path."
fi

if [ "$(which pngcrush)" != "" ];
then
    optimize_png () {
        pngcrush -q ${BRUTECRUSH} $1 ${1}.out 1> /dev/null 2> /dev/null
        mv ${1}.out ${1}
    }
elif [ "$(which optipng)" != "" ];
then
    optimize_png () {
        optipng -o7 -quiet $1 1> /dev/null 2> /dev/null
    }
elif [ "$(which pngout-static)" != "" ];
then
    optimize_png () {
        pngout-static $1
    }
elif [ "$(which pngout)" != "" ];
then
    optimize_png () {
        pngout $1
    }
else
    echo "Please install pngcrush, optipng, or pngout"
    exit 1;
fi

if [ "`which aapt`" = "" ];
then
    echo "Please ensure aapt is in your \$PATH"
    exit 1;
fi

if [ "`which zipalign`" = "" ];
then
    echo "Please ensure zipalign is in your \$PATH"
    exit 1;
fi

if [ -e "$1" ];
then
    NAME=`basename $1`;
    echo "Optimizing $NAME...";

    if [ "$2" != "" ];
    then
        CERT=build/target/product/security/$2.x509.pem
        KEY=build/target/product/security/$2.pk8
        if [ ! -f "$ANDROID_BUILD_TOP/$CERT" ];
        then
            echo "$CERT does not exist!";
            exit 1;
        fi
    else
        APKINFO=`grep "name=\"$NAME\"" $APKCERTS`;
        [ $QUIET ] || echo "APKINFO: $APKINFO";
        if [ "$APKINFO" = "" ];
        then
            echo "No apk info for $NAME";
            exit 1;
        fi
        CERT=`echo $APKINFO | awk {'print $2'} | cut -f 2 -d "=" | tr -d "\""`;
        KEY=`echo $APKINFO | awk {'print $3'} | cut -f 2 -d "=" | tr -d "\""`;
        if [ "$CERT" = "" ];
        then
            echo "Unable to find certificate for $NAME"
            exit 1;
        fi
        if [ "$CERT" = "PRESIGNED" ];
        then
            echo "$NAME is presigned, skipping"
            exit 1;
        fi
    fi

    [ $QUIET ] || echo "Certificate: $CERT";

    [ -d $TMPDIR/$NAME ] && rm -rf $TMPDIR/$NAME
    mkdir -p $TMPDIR/$NAME
    trap "rm -rf $TMPDIR; exit" INT TERM EXIT
    cd $TMPDIR/$NAME
    unzip -q $BASE/$1
    for x in `find . -name "*.png" | grep -v "\.9.png$" | tr "\n" " "`
    do
        [ $QUIET ] || echo "Crushing $x"
        optimize_png $x
    done
    cp $BASE/$1 $BASE/$1.old

    [ $QUIET ] || echo "Repacking apk.."
    aapt p -0 .dat -0 .dict -0 .arsc -F $NAME .
    
    [ $QUIET ] || echo "Resigning with cert: `echo $CERT`"

    [ $QUIET ] || echo java -jar $ANDROID_HOST_OUT/framework/signapk.jar $ANDROID_BUILD_TOP/$CERT $ANDROID_BUILD_TOP/$KEY $NAME signed_$NAME
    java -jar $ANDROID_HOST_OUT/framework/signapk.jar $ANDROID_BUILD_TOP/$CERT $ANDROID_BUILD_TOP/$KEY $NAME signed_$NAME
    [ $QUIET ] || echo "Zipalign.."
    zipalign -f 4 signed_$NAME $BASE/$1
    if [ ! $QUIET ]; then
        ls -l $BASE/$1.old
        ls -l $BASE/$1
    fi
    rm $BASE/$1.old
else
    echo "Usage: $0 [apk file]"
fi

