Browser build – Step 2: Create your signing keystore
Note
This is Step 2 of the Browser build. First complete Step 1 – Create your GitHub fork.
AndroidAPS must be signed with private keys stored in a Java KeyStore (JKS). This is the most important decision of the whole process, because it determines whether you will be able to upgrade AAPS later without reinstalling.
Note
In the next steps you will store private information (your keystore, and later your Google Drive access) inside GitHub as secrets. A secret is simply an encrypted value that only your own build can read – nobody else, not even people looking at your fork, can see it. This is what keeps your build yours.
Choose your keystore strategy
Read both options and pick the one that matches your situation.
Option 1 – Generate a new keystore (new users)
Choose this if any of these is true:
This is your first time building AAPS.
You don’t have a keystore from a previous Android Studio (computer) build.
You have forgotten your keystore password or alias.
Warning
Building AAPS with Option 1 creates a brand-new keystore, so it will not allow you to upgrade your existing AAPS in place. To move to this new build you will need to:
Export settings on your phone.
Copy or upload the settings file from your phone to an external location (i.e. your computer, cloud storage service…).
Generate a new version of the signed apk as described in Option 1 and transfer it to your phone.
Uninstall previous AAPS version on your phone.
Install new AAPS version on your phone.
Import settings to restore your objectives and configuration.
Restore your data from Nightscout.
Option 2 – Upload your existing keystore (existing / past users)
Choose this if you already have the .jks keystore you used on a previous build of AAPS from a computer in Android Studio, and you know its password and alias (usually key0).
This keeps your current AAPS install upgradeable: future updates will use the same keystore.
→ Continue with Option 2 – Upload your existing keystore
Note
On the next page you will pick your device (Android, computer or iPhone). Each device page then walks you through downloading and opening the preparation file the right way for that device, and creating your keystore. The built AAPS app will be saved in your Google Drive.
Next: choose Option 1 or Option 2 above, then follow the page for your device.
Export your keystore (optional)
If you want to export your stored keystore, use this method.
This script will export your previously configured keystore information (from Option 1 or Option 2) as a password-protected ZIP file to the /AAPS/KeyStore directory in your Google Drive.
Warning
Before using this export method, make sure your keystore and Google Drive settings have been completed.
Steps:
Add ZIP Password Secret:
Go to your repository’s Settings → Secrets and variables → Actions
Click New repository secret
In the Name field, enter:
ZIP_PASSWORDIn the Secret field, enter your custom ZIP encryption password
Use only English letters and numbers for the password (no special symbols)
Click Add secret

Run Export Workflow:
Go to the Actions tab in your repository
Select CI KeyStore Export
Click Run workflow
The exported keystore ZIP file will be saved to your Google Drive

