1#!/bin/sh 2# Put the Quake shared library into the Quake APK and resign the APK. 3# TODO: Use our own cert instead of a test cert 4 5pushd $OUT/system/app 6mkdir -p lib/armeabi 7mv $OUT/system/lib/libquake.so lib/armeabi 8zip -r Quake.apk lib 9rm -rf lib 10SIGNAPK_JAR=$TOP/out/host/darwin-x86/framework/signapk.jar 11PRIVATE_CERTIFICATE=$TOP/target/product/security/testkey.x509.pem 12PRIVATE_PRIVATE_KEY=$TOP/target/product/security/testkey.pk8 13mv Quake.apk Quake-unsigned.apk 14java -jar $SIGNAPK_JAR $PRIVATE_CERTIFICATE $PRIVATE_PRIVATE_KEY Quake-unsigned.apk Quake.apk 15rm Quake-unsigned.apk 16popd 17