# Sign already generated APK file with private Key

Refer [workspace-setup-playbook](https://saral.sunbird.org/use/workspace-setup-playbook "mention")to setup Android on the developer machine.

Execute below command from a terminal:

**`$ANDROID_HOME`**`/build-tools/{build-tool-version}/apksigner sign --ks <keystore.jks> --out <saral-release-signed.apk> <saral-app-unsigned-aligned.apk>`

OR

**`%ANDROID_HOME%`**`/build-tools/{build-tool-version}/apksigner sign --ks <keystore.jks> --out <saral-release-signed.apk> <saral-app-unsigned-aligned.apk>`

Example:

**`$ANDROID_HOME`**`/build-tools/30.0.2/apksigner sign --ks my-release-key.jks --out saral-release-signed.apk saral-app-unsigned-aligned.apk`

Please enter keystore password when prompted. This will generate signed apk with the name provided in  `--out`  parameter.


---

# 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://saral.sunbird.org/use/sign-already-generated-apk-file-with-private-key.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.
