Skip to content

Instantly share code, notes, and snippets.

@lopezjurip
Last active April 5, 2017 08:23
Show Gist options
  • Save lopezjurip/88cf26d20777cdea5297 to your computer and use it in GitHub Desktop.
Save lopezjurip/88cf26d20777cdea5297 to your computer and use it in GitHub Desktop.
Ionic2 publish Android app | sign .apk step

Go to the output .apk directory:

cd /Users/patriciolopez/Repositories/almapp/uc-courses-mobile/platforms/android/build/outputs/apk/

Put your release.keystore in that folder, if you don't have one (change ALIAS):

keytool -genkey -v -keystore release.keystore -alias ALIAS -keyalg RSA -keysize 2048 -validity 10000

Run:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release.keystore android-release-unsigned.apk ALIAS
rm app.apk; zipalign -v 4 android-release-unsigned.apk app.apk

Your file app.apk is ready :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment