Last active
May 1, 2016 12:53
-
-
Save Viroide/33f5a53cee1c82a0bdd93e35dc7ad8c4 to your computer and use it in GitHub Desktop.
verifies that the apk is ready to upload to the store: Nop debug mode and signed correctly
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
# Start custom variables - Change this variables as you need | |
ANDROID_VERSION=21.1.2 | |
SSH_SIGN="SHA1: A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1:A1" | |
# End custom variables | |
# Start color variables - | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
NC='\033[0m' | |
# End color variables | |
printf "${GREEN}*****************\n" | |
printf "Starting tests\n" | |
printf "*****************${NC}\n" | |
DEBUG=`$ANDROID_HOME/build-tools/$ANDROID_VERSION/aapt dump badging $1 | grep "application-debuggable"` | |
if [ -z $DEBUG ]; then | |
printf "${GREEN}** NO DEBUG **${NC}\n" | |
else | |
printf "${RED}** DEBUG **${NC}\n" | |
echo $DEBUG | |
fi | |
unzip -q $1 -d ./delete | |
SIGNED=`keytool -printcert -file ./delete/META-INF/HEALTHKE.RSA | grep "$SSH_SIGN"` | |
if [ $? -eq 0 ]; then | |
if [ -n '$SIGNED' ]; then | |
printf "${GREEN}** SIGNED!! **${NC}\n" | |
echo $SIGNED | |
fi | |
else | |
printf "${RED}** NO SIGNED **${NC}\n" | |
echo $SIGNED | |
fi | |
rm -rf ./delete | |
printf "${GREEN}*****************\n" | |
printf "end tests \n" | |
printf "*****************${NC}\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment