This is an old revision of the document!
If you want to install an application on Android, the apk must be digitally signed with a certificate. For example, when you test your application on the emulator, Android Studio signs the apk with a debug certificate. The first time when you run or debug a project in Android Studio, a debug keystore and certificate is automatically created using the Android SDK tools in $HOME/.android/debug.keystore. Also the keystore is initialized and the key password are set.
As a security measure the debug certificate needs to be used only for testing and for debug builds. This certificate is not secure for using on app stores.
For later runs/debugs Android Studio automatically stores the debug signing configuration so that we do not need to enter it every time we launch the app. The signing configuration contains the keystore location $HOME/.android/debug.keystore, keystore password, key name and key password. This debug signing configuration used at run/debug is not available for editing. You can create a signing config for your release builds.
Steps for generating and uploading key and keystore:
Sign app with key:
For more details on application signing and distribution check App Signing
In this lab we create an app that …
Create a new application (with an empty activity). Using the steps presented in the lab create a key and keystore and generate the signed APK of the application. Use adb tool to install the APK.
Create a new release signing configuration. Sign the application and use adb to install the signed apk. You should install the new signed apk on top of the one from Task 1. What happens with the application?