keytool -genkey -v -keystore app_name.keystore -alias app_name -keyalg RSA -keysize 2048 -validity 10000
- What is your first and last name?
- What is the name of your organizational unit?
- What is the name of your organization?
- What is the name of your City or Locality?
- What is the name of your State or Province?
- What is the two-letter country code for this unit?
You need to give a password for this file. Finally, the app_name.keystore is generated.
Assuming we are building an ionic app, here are the commands
sudo ionic cordova build android --release --prod
to compile, and generate the non-signed .APK file: android-armv7-release-unsigned.apk
sudo chmod 777 ./platforms/android/build/outputs/apk
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore app_name.keystore ./platforms/android/build/outputs/apk/android-armv7-release-unsigned.apk app_name
/Users/miguel/Library/Android/sdk/build-tools/27.0.0/zipalign -vf 4 ./platforms/android/build/outputs/apk/android-armv7-release-unsigned.apk ./platforms/android/build/outputs/apk/app_name.apk
adb install -r ./platforms/android/build/outputs/apk/app_name.apk
Just in case you need to see the console.log directly from you terminal. It will show you everything happening in your phone.