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
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
Building the debug variant
The standard debug build uses theproductionVanillaOpenSource flavor combination:
Building in Android Studio
Open the project
Open Android Studio and select File > Open, then navigate to the cloned
android-app directory.Sync Gradle
Android Studio will prompt you to sync the project. Click Sync Now to download all dependencies.
Select a build variant
Open the Build Variants panel (View > Tool Windows > Build Variants) and select
productionVanillaOpenSourceDebug or another supported variant.Build flavors
The app uses three flavor dimensions that combine to produce each build variant:| Dimension | Options | Description |
|---|---|---|
environment | production, black | production targets the live Proton API. black targets internal test environments. |
functionality | vanilla, google | google includes Google Play Services integrations (in-app purchases, reviews, etc.). vanilla does not. |
distribution | openSource, playStore, amazon, direct, dev | Controls 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
Building a release APK
Release builds require signing keys. Provide them as Gradle properties:Updating license attributions
After adding or updating any open source dependency, regenerate the license attribution file:licenseProductionGooglePlayStoreReleaseReport and writes the output to app/src/main/assets/oss_licenses/generated_licenses.js.