Created
March 28, 2019 18:00
-
-
Save FrankSpierings/b91df50b471a89541604c6c8a3ef5616 to your computer and use it in GitHub Desktop.
Sign APK
This file contains hidden or 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/sh | |
KEYSTORE=my.keystore | |
KEYSTORE_ALIAS=myalias | |
PASSWORD=password | |
APK=some.apk | |
if [ ! -f ${KEYSTORE} ]; then | |
keytool -noprompt -genkey -v -keystore ${KEYSTORE} -alias ${KEYSTORE_ALIAS} -keyalg RSA -keysize 2048 -validity 1000 -dname "CN=frank" -storepass ${PASSWORD} -keypass ${PASSWORD} | |
fi | |
jarsigner -sigalg SHA1withRSA -digestalg SHA1 -keystore ${KEYSTORE} -storepass ${PASSWORD} ${APK} ${KEYSTORE_ALIAS} | |
jarsigner -verify ${APK} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment