Skip to main content

Release Keys

In this guide we will create your release keystore (also know as the upload key), debug and release key hashes and SHA-1 Fingerprint for your Android Application. All android application are required to sign with a release key before publishing it to the Google Play Store. Release and Debug Key Hashes and SHA-1 Fingerprint are required for Google Login and Facebook Login.

Important Note

The tools directory was added to the application package in version v1.5.6. For users who are using the application package below v1.5.6 should follow this manual setup or upgrade to v1.5.6 or above to follow this guide.


Edit Keystore Config file#

We will edit the keystore-config.conf file. This file is located under woostore_pro --> tools --> configs --> keystore-config.conf

Follow the steps below to edit your information to create a keystore.

  1. Open the keystore-config.conf file in android studio.

  2. Change the following to your specific values

    • FILE_ALIAS

      Please make sure that there are no spaces in between the name. The recommended format to create a name alias is "yourname", "your_name".

    • PASSWORD#

      You can set any password here that you like.

      info

      You need to remember this password as it will be used in the following steps to create

      • SHA-1 Fingerprint
      • Key Hashes
  3. Finally Save the file by pressing command + s on Mac OS and control + s on Windows. You can also save the file from the menu option File --> Save All / Save.


Configuration#

Open a terminal in android studio. If you do not know how to open android studio then follow Steps 4,5 from Open terminal in Android Studio.

This will open a terminal window in the root of the application folder. All the commands will be performed from the root of the application folder.

Create Release Keystore#

In the terminal copy the following command and press enter

bash tools/create-keystore.sh

If there is a keystore already ( which there might be ) you will be asked to delete it. Press y to delete it and proceed to create a new one with your updated values.

During the setup you will be asked for some more information which will be specific to your organization. Please add them properly.

At the end it will ask you to verify your information, type yes and hit enter to create the keystore.

After the process is completed without any issues or error

  • upload_key.keystore
  • key.properties

files will be generated in the directory woostore_pro --> tools --> certs.

These files will automatically be copied to woostore_pro --> android directory for your convenience. You can verify that by comparing the values of key.properties file under woostore_pro --> android and woostore_pro --> tools --> certs directories.

caution

Do not change the values of key.properties file manually as it might break your app signing process.

Important

The generated

  • upload_key.keystore
  • key.properties

files are your release keystore ( also called as upload key ) and properties file and must be kept private at all times. Do not accidentally push them in open source repositories or lose them.

When you create a release build apk for your application to upload to Google Play Store, the application will be signed with this upload key.

note

In case you encounter any error, try to run through the process once again. If the issue still persists, you can follow this guide to Create Keystore Manually

Create SHA-1 Fingerprints#

In this section we will create SHA-1 Fingerprints for both debug and release mode. The SHA-1 Fingerprint are used in Firebase Console to identify your android application and in Google Login - Android Integration. Follow the steps below to generate the fingerprints.

Debug#

  1. Open the debug-config.conf file from woostore_pro --> tools --> configs directory in android studio.
  2. Edit the DEBUG_KEYSTORE_PATH value based on your Operating System from the following
  • Mac OS and Linux

    The path is usually ~/.android/debug.keystore

    Result
    DEBUG_KEYSTORE_PATH=~/.android/debug.keystore
  • Windows

    The path is usually "C:\Users\USERNAME\.android\debug.keystore". Replace USERNAME with your actual PC user name.

    Result
    DEBUG_KEYSTORE_PATH="C:\Users\USERNAME\.android\debug.keystore"
  1. Finally Save the file by pressing command + s on Mac OS and control + s on Windows. You can also save the file from the menu option File --> Save All / Save.

  2. In the terminal copy the following command and press enter

    bash tools/create-debug-fingerprint.sh

    The default password the debug.keystore is android. Enter this when prompted for a password.

    Finally this will print the fingerprints for the debug certificate:

    Certificate fingerprints:
    MD5: E6:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:25
    SHA1: CD:FD:FF:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:60:CC:6C
    SHA256: 9C:F2:85:F2:BF:AF:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:2F:E2:5B:48:21:A1

    Copy the SHA-1 Fingerprint value and save somewhere for later use.

Release#

  1. In the terminal copy the following command and press enter

    bash tools/create-release-fingerprint.sh

    When prompted enter the password that you entered in keystore-config.conf file in Editing Keystore Config File - Password.

    This will print the fingerprints for the release certificate:

    Certificate fingerprints:
    MD5: D6:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:2B
    SHA1: 4D:F3:FG:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:60:CF:FC
    SHA256: 9M:D2:80:E2:AP:LF:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:2F:T2:5B:48:20:A1

    Copy the SHA-1 Fingerprint value and save somewhere for later use.

note

In case you encounter any error, try to run through the process once again. If the issue still persists, you can follow this guide to Create SHA-1 Fingerprints Manually

Create Key Hashes#

Key hashes are used for Facebook Login and are based on your debug and release key certificates. Follow the steps below to create key hashes.

In the terminal copy the following command and press enter

bash tools/create-key-hash.sh

This will try to generate both development and release key hashes for your application.

The password for debug certificate is android and the password for your release certificate is the password that you entered in keystore-config.conf file in Editing Keystore Config File - Password.

Result
========= Debug Key Hash =========
When prompted for a password enter: android
Enter keystore password:
zf3/0qXXXXXXXXXXXXES0DdgzGw=
========= Release Key Hash =========
When prompted for a password enter the password you set in keystore-config.conf file
Enter keystore password:
BGXBgq/KmXXXXXXXXXXXXqOcmvg=

From your result copy the hashes which look like zf3/0qXXXXXXXXXXXXES0DdgzGw= this and save for later use. These hashes will be used in the android integration of Facebook Login.

For Window Users

If you encounter an error while generating the key hashes then follow this manual guide

note

In case you encounter any error, try to run through the process once again. If the issue still persists, you can follow this guide to Create Key Hashes Manually