Created
October 19, 2012 15:37
-
-
Save imnuts/3918898 to your computer and use it in GitHub Desktop.
Script to build a flashable Google Apps package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to build a Google Apps package | |
# | |
DATE=$(date +%Y%m%d) | |
# Remove any old packages | |
if [ -f *.zip ]; then | |
echo "Removing old zips" | |
rm *.zip | |
fi | |
# If the right files are here, sign GoogleBackupTransport.apk | |
if [ -f signapk.jar ] && [ -f platform.pk8 ] && [ -f platform.x509.pem ]; then | |
echo "Signing GoogleBackupTransport.apk" | |
java -jar signapk.jar -w platform.x509.pem platform.pk8 \ | |
system/app/GoogleBackupTransport.apk system/app/GoogleBackupTransport.signed | |
mv system/app/GoogleBackupTransport.signed system/app/GoogleBackupTransport.apk | |
fi | |
# Build the flashable zip package | |
echo "Building the Google Apps package" | |
zip -q -9 -r gapps-jb-"$DATE"-UNSIGNED.zip META-INF system | |
# If the right files exist, sign the Google Apps zip | |
if [ -f signapk.jar ] && [ -f testkey.pk8 ] && [ -f testkey.x509.pem ]; then | |
echo "Signing the Google Apps package" | |
java -jar signapk.jar -w testkey.x509.pem testkey.pk8 \ | |
gapps-jb-"$DATE"-UNSIGNED.zip gapps-jb-"$DATE"-signed.zip | |
rm gapps-jb-"$DATE"-UNSIGNED.zip | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment