Skip to content

Instantly share code, notes, and snippets.

@rocco
Last active August 29, 2015 14:05
Show Gist options
  • Save rocco/59e98b10643d55b11bc3 to your computer and use it in GitHub Desktop.
Save rocco/59e98b10643d55b11bc3 to your computer and use it in GitHub Desktop.
cordova/phonegap: create android release apk
# you are in cordova project root folder
# create android release
# this also updated android project using values in config.xml
cordova build android --release
# sign the package
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore [your.keystore] platforms/android/ant-build/[AppName]-release-unsigned.apk [your alias]
# verify package, this must output "jar verified."
jarsigner -verify -verbose -certs platforms/android/ant-build/[AppName]-release-unsigned.apk
# build final release package
zipalign -v 4 platforms/android/ant-build/[AppName]-release-unsigned.apk platforms/android/ant-build/[AppName]-release-signed.apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment