summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-04-18 15:46:47 +0200
committerAlbin <albin@mullvad.net>2023-04-18 15:46:47 +0200
commit1c0fa05e4cf507084f79cf66e21aec913747c3d2 (patch)
tree7271b600c5de87ad7d7eee1d60f136a7edbeb567
parent8f0ec06ffe52344934dab7a71010400f97fbaa0e (diff)
parent8d077852079953e118927a6524409c7ab38654ee (diff)
downloadmullvadvpn-1c0fa05e4cf507084f79cf66e21aec913747c3d2.tar.xz
mullvadvpn-1c0fa05e4cf507084f79cf66e21aec913747c3d2.zip
Merge branch 'clarify-android-build-process'
-rw-r--r--android/BuildInstructions.md23
1 files changed, 19 insertions, 4 deletions
diff --git a/android/BuildInstructions.md b/android/BuildInstructions.md
index 7ef56a54c6..c86dc353c7 100644
--- a/android/BuildInstructions.md
+++ b/android/BuildInstructions.md
@@ -4,12 +4,25 @@ This document aims to explain how to build the Mullvad Android app. It's strongl
primarily supported to build the app using the provided container, as it ensures the correct build
environment.
+## Build process
+
+The build process consist of two main steps. First building the native libraries (`mullvad-daemon`
+and `wireguard-go`) and then building the Android app/project which will bundle the previously built
+native libraries. Building the native libraries requires some specific toolchains and packages to be
+installed, so it's recommended to build using the provided build script and container image. The
+native libraries doesn't have to be rebuilt very often, only when including daemon changes or after
+cleaning the project, so apart from that it's possible to build using the Gradle CLI or
+the Android Studio GUI.
+
## Build with provided container (recommended)
-This can easily be achieved by running the [containerized-build.sh](../building/containerized-build.sh)
-script, which helps using the correct tag and mounting volumes. The script relies on [podman](https://podman.io/getting-started/installation.html)
+Building both the native libraries and Android project can easily be achieved by running the
+[containerized-build.sh](../building/containerized-build.sh) script, which helps using the correct
+tag and mounting volumes. The script relies on [podman](https://podman.io/getting-started/installation.html)
by default, however another container runner such as [docker](https://docs.docker.com/get-started/)
-can be used by setting the `CONTAINER_RUNNER` environment variable.
+can be used by setting the `CONTAINER_RUNNER` environment variable. Subsequent builds can that
+doesn't rely on changes to the native libraries can be ran using the Gradle CLI or the Android
+Studio GUI.
### Debug build
Run the following command to trigger a full debug build:
@@ -30,7 +43,9 @@ directory configured in step 1:
Building without the provided container requires installing multiple Sdk:s and toolchains, and is
therefore not recommended.
-*: A container is still used to build `wireguard-go`.
+*: A container is still used to build `wireguard-go` for Android since it requires a patched version
+of `go`. See [this patch](https://git.zx2c4.com/wireguard-android/tree/tunnel/tools/libwg-go/goruntime-boottime-over-monotonic.diff)
+for more information.
### Setup build environment
These steps explain how to manually setup the build environment on a Linux system.