#!/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

OUT_TARGET_HOST=$(uname -a | grep Darwin)
if [ -z "$OUT_TARGET_HOST" ]
then
    OUT_TARGET_HOST=linux-x86
else
    OUT_TARGET_HOST=darwin-x86
fi

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
    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 -F $NAME .
    
    [ $QUIET ] || echo "Resigning with cert: `echo $CERT`"

    [ $QUIET ] || echo java -jar $OUT/../../../host/$OUT_TARGET_HOST/framework/signapk.jar $ANDROID_BUILD_TOP/$CERT $ANDROID_BUILD_TOP/$KEY $NAME signed_$NAME
    java -jar $OUT/../../../host/$OUT_TARGET_HOST/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

