Created
June 12, 2017 03:48
-
-
Save wzpan/3f62eb9e43c857a40fc9e22a56dcf579 to your computer and use it in GitHub Desktop.
Sign an android app.
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
# 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