Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ProtonVPN/android-app/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

Before building, make sure you have the following installed:
  • Android SDK — required for compiling Android apps
  • Android NDK — required for native code compilation
  • CMake — used to build native libraries
  • SWIG — used to generate JNI bindings for native libraries
Install the NDK, CMake, and SWIG via Android Studio’s SDK Manager or the sdkmanager command-line tool.
The Gradle daemon is enabled by default and the build is configured to use up to 6 GB of heap (-Xmx6g). Make sure your machine has enough available memory.

Cloning the repository

git clone https://github.com/ProtonVPN/android-app.git
cd android-app

Building the debug variant

The standard debug build uses the productionVanillaOpenSource flavor combination:
./gradlew assembleProductionVanillaOpenSourceDebug
This produces a debug APK you can install on a device or emulator.

Building in Android Studio

1

Open the project

Open Android Studio and select File > Open, then navigate to the cloned android-app directory.
2

Sync Gradle

Android Studio will prompt you to sync the project. Click Sync Now to download all dependencies.
3

Select a build variant

Open the Build Variants panel (View > Tool Windows > Build Variants) and select productionVanillaOpenSourceDebug or another supported variant.
4

Run or build

Click Run to build and deploy to a connected device, or use Build > Make Project to compile without deploying.

Build flavors

The app uses three flavor dimensions that combine to produce each build variant:
DimensionOptionsDescription
environmentproduction, blackproduction targets the live Proton API. black targets internal test environments.
functionalityvanilla, googlegoogle includes Google Play Services integrations (in-app purchases, reviews, etc.). vanilla does not.
distributionopenSource, playStore, amazon, direct, devControls the distribution channel and store-specific behaviour.
Not all flavor combinations are valid. For example, google functionality is only paired with playStore distribution, and vanilla is paired with openSource, amazon, or direct. The black environment is only built for playStore and direct distributions.

Common variant names

./gradlew assembleProductionVanillaOpenSourceDebug

Building a release APK

Release builds require signing keys. Provide them as Gradle properties:
./gradlew assembleProductionVanillaOpenSourceRelease \
  -PkeyStoreFilePath=<path/to/keystore> \
  -PkeyStoreKeyAlias=<alias> \
  -PkeyStorePassword=<keystore-password> \
  -PkeyStoreKeyPassword=<key-password>
Replace the placeholders with the actual values for your keystore.
All official Proton VPN builds (except F-Droid) are signed with the same Proton key. The SHA-256 fingerprint of the signing certificate for ch.protonvpn.android is:
DC:C9:43:9E:C1:A6:C6:A8:D0:20:3F:34:23:EE:42:BC:C8:B9:70:62:8E:53:CB:73:A0:39:3F:39:8D:D5:B8:53

Updating license attributions

After adding or updating any open source dependency, regenerate the license attribution file:
./gradlew updateLicensesJson
This runs licenseProductionGooglePlayStoreReleaseReport and writes the output to app/src/main/assets/oss_licenses/generated_licenses.js.

Build docs developers (and LLMs) love