Created
November 29, 2019 19:23
-
-
Save itsbriany/0f429075fba3713f90a752a60dd5f07a to your computer and use it in GitHub Desktop.
A simple script for self-signing APKs
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/sh | |
KEYSTORE=$1 | |
ALIAS=$2 | |
APK=$3 | |
if [ "$#" -ne 3 ]; then | |
echo "Usage: $0 [keystore] [alias] [apk]" | |
exit 0 | |
fi | |
keytool -genkey -v -keystore $KEYSTORE -keyalg RSA -keysize 2048 -validity 10000 -alias $ALIAS | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $KEYSTORE $APK $ALIAS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment