ionic g anerateepk code example
Example 1: ionic publish
// generate .keystore file
keytool -genkey -v -keystore app.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
// sign the apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore app.keystore app-release-unsigned.apk alias_name
// zip the apk
zipalign -v 4 app-release-unsigned.apk ReleaseSigned.apk
Example 2: ionic publish android
$ ionic cordova build --release android