[android] I have never set any passwords to my keystore and alias, so how are they created?

As I was going through some posts on the Internet learning more about signing your Android app, I got post like how to sign the app, and something about what if you have lost your keystore file or password.

The question I am here to ask is that, I have never created a keystore, or its alias, or its password, so how on this earth can I forget it?

I know that for Android we use the password android, so, if the password is by default android how can one forget it? (I'm sure there must be some other way to create new keystores).

Finally, if android is the default password, what is the default alias?

This question is related to android keytool android-keystore

The answer is


Keystore name: "debug.keystore"

Keystore password: "android"

Key alias: "androiddebugkey"

Key password: "android"

I use this information and successfully generate Signed APK.


if you want to configure them in gradle it should look like

signingConfigs {
        debug {
            storeFile file('PATH_TO_HOME/.android/debug.keystore')
            storePassword 'android'                   
            keyAlias 'AndroidDebugKey'
            keyPassword 'android'                     
        }
        ...
}

All these answers and there is STILL just one missing. When you create your auth credential in the Google API section of the dev console, make sure (especially if it is your first one) that you have clicked on the 'consent screen' option. If you don't have the 'title' and any other required field filled out the call will fail with this option.


when we run application in eclipse apk generate is sign by default Keystore which is provided by android .

But if you want to upload your application on play store you need to create your own keystore. Eclipse already provides GUI interface to create new keystore. And you also can create keystore through command line.

default alias is

androiddebugkey

Better than all options, you can set your signingConfig to be equals your debug.signingConfig. To do that you just need to do the following:

android {
  ...
  buildTypes {
    ...
    wantedBuildType {
      signingConfig debug.signingConfig
    }
  }
}

With that you will not need to know where the debug.keystore is, the app will work for all team, even if someone use a different environment.


Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to keytool

Keytool is not recognized as an internal or external command I have never set any passwords to my keystore and alias, so how are they created? Importing the private-key/public-certificate pair in the Java KeyStore keytool error bash: keytool: command not found How to add certificate chain to keystore? Change keystore password from no password to a non blank password How can I create keystore from an existing certificate (abc.crt) and abc.key files? Openssl is not recognized as an internal or external command How to properly import a selfsigned certificate into Java keystore that is available to all Java applications by default? Java Keytool error after importing certificate , "keytool error: java.io.FileNotFoundException & Access Denied"

Examples related to android-keystore

I have never set any passwords to my keystore and alias, so how are they created? SHA-1 fingerprint of keystore certificate How do I find out which keystore was used to sign an app? How do I verify that an Android apk is signed with a release certificate? Facebook Android Generate Key Hash I can’t find the Android keytool