# 3.4 Generate Release Certificate

To generate a release certificate, You have to generate a Keystore file. To generate a Keystore file, run this command below from the root of your project directory.

{% tabs %}
{% tab title="Mac" %}

```
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
```

{% endtab %}

{% tab title="WIndows" %}

```
keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key
```

{% endtab %}
{% endtabs %}

* Enter your details and remember the **password**. After this, you will get a **key.jks** Keystore file.
* Locate this file and move the file into the **android/app** folder and copy the **path** by right-clicking on the key.jks file.
* Then go to the **android/key.properties**​ file and replace the **path** of your Keystore file. Then also replace the ​**password​** which you have inputted to generate the Keystore file.

<figure><img src="https://lh5.googleusercontent.com/tYMAq1QSqHV4Zm_e407IT-QBg90hWj--VlbKT72QKhJBGYx-4NRnkL-9AhPoOnSYC1WN_Fgw4Xek96zBjMcZfBg7vOUSJn12TTw8DK_SqJl_aRGscZPLatWP7pTWOuZMLbr30doWuf259fK2YYZGkUqDmXNMAXyR8m7zyZhjb2c93EvoFR8-ba_F6oQs" alt=""><figcaption></figcaption></figure>

Now you can generate a release certificate, To do that,

* Run with replacing your **alias\_name** and **keystore\_location**.

```
keytool -list -v -keystore keystore_location -alias alias_name
```

{% hint style="info" %}
Your alias\_name is **key** and keystore\_location is the path(directory) of the **key.jks** file.
{% endhint %}

* After that, you will get a **SHA1** code. Copy that code and add it to your **Firebase Console > Project Settings >  Android**, where you previously added a debug SHA1 code.

<figure><img src="https://lh3.googleusercontent.com/NiFFfBOiIGw_FxsQ_DDn57E3-Q9LvspXdAdpmred0Z1eXBM_1SFFDjIW-CUHEi7YnmQKoBf2JGi3LysoNoqZH9jh0iNIPOap0WZQULQvURTiOqx9gOyk-n2Nnm_H_pY6JnEj4uZVbl6GsLWtGquqEbB83w12csRd3u8hVdMliaV47CoyVAdCBZWG9rTZ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.travelhour.mrb-lab.com/app/3.-firebase-setup-for-android/3.4-generate-release-certificate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
