Last active
April 28, 2016 16:37
-
-
Save nanusdad/beeba8d57965a36dae5b to your computer and use it in GitHub Desktop.
APK file signing and zipping for Play Store upload
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
cd ~/build-output-directory/android/ | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 unaligned.apk your-app-name | |
$ANDROID_HOME/build-tools/23.0.0/zipalign 4 unaligned.apk production.apk | |
# To unsign APK | |
zip -d yourapp.apk "META-INF*" | |
# Creating keystore and then signing app for Play Store | |
keytool -genkey -v -keystore ~/AppAliasName.keystore -alias AppAliasName -keyalg RSA -keysize 2048 -validity 10000 | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/AppAliasName.keystore AppAliasName_PRO_release_26_4_2016.apk AppAliasName | |
zipalign 4 AppAliasName_release_26_4_2016.apk AppAliasName_prod.apk | |
# iOS: Misc Certificates, Keys, etc related commands | |
openssl req -noout -text -in server.csr | |
codesign -d --entitlements :- AppName.app | |
# Export .cer file and .p12 file from the KeyChain Tool | |
# Generate the pem file | |
openssl x509 -in Cert.cer -inform der -out Cert.pem | |
# Generate the key file | |
openssl pkcs12 -nocerts -out CertKey.pem -in Cert.p12 | |
# Concatenate both together | |
cat Cert.pem CertKey.pem > appname_apns.pem | |
# Use that to test with Apple | |
openssl s_client -connect gateway.push.apple.com:2195 -cert appname_apns.pem -debug -showcerts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment