Skip to content

Instantly share code, notes, and snippets.

@wzpan

wzpan/sign.sh

Created Jun 12, 2017
Embed
What would you like to do?
Sign an android app.
# sh sign.sh path_to_apk.apk path_to_key_store.keystore STOREPASSWORD STOREALIAS
rm -rf build
mkdir build
cd build
unzip $1
rm -rf META-INF
APK_NAME=`basename $1`
STORE_PATH=$3
STORE_PASS=$3
STORE_ALIAS=$4
zip -r ${APK_NAME} *
jarsigner -sigalg MD5withRSA -digestalg SHA1 -storepass ${STORE_PASS} -keystore ${STORE_PATH} -signedjar signed.apk $APK_NAME ${STORE_ALIAS}
zipalign -v 4 signed.apk release.apk
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment