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

