diff --git a/src/xrt/ipc/android/build.gradle b/src/xrt/ipc/android/build.gradle
index d50c408f8..7b1dee2b0 100644
--- a/src/xrt/ipc/android/build.gradle
+++ b/src/xrt/ipc/android/build.gradle
@@ -21,6 +21,13 @@ android {
         minSdkVersion 26
         targetSdkVersion project.sharedTargetSdk
 
+        def defaultServiceLibName = "monado-service"
+        def serviceLibName = project.hasProperty("serviceLibName") ?
+            project.serviceLibName : defaultServiceLibName
+        if (serviceLibName == null || serviceLibName.length() == 0) {
+            serviceLibName = defaultServiceLibName
+        }
+
         // Single point of truth for these names.
         def serviceAction = "org.freedesktop.monado.ipc.CONNECT"
         def shutdownAction = "org.freedesktop.monado.ipc.SHUTDOWN"
@@ -31,6 +38,7 @@ android {
         buildConfigField("String", "SERVICE_ACTION", "\"${serviceAction}\"")
         buildConfigField("String", "SHUTDOWN_ACTION", "\"${shutdownAction}\"")
         buildConfigField("Long", "WATCHDOG_TIMEOUT_MILLISECONDS", "1500L")
+        buildConfigField("String", "SERVICE_LIB_NAME", "\"${serviceLibName}\"")
     }
 
     buildTypes {
diff --git a/src/xrt/ipc/android/src/main/java/org/freedesktop/monado/ipc/MonadoImpl.java b/src/xrt/ipc/android/src/main/java/org/freedesktop/monado/ipc/MonadoImpl.java
index f96c0eeb9..57f4edec9 100644
--- a/src/xrt/ipc/android/src/main/java/org/freedesktop/monado/ipc/MonadoImpl.java
+++ b/src/xrt/ipc/android/src/main/java/org/freedesktop/monado/ipc/MonadoImpl.java
@@ -36,7 +36,7 @@ public class MonadoImpl extends IMonado.Stub {
     static {
         // Load the shared library with the native parts of this class
         // This is the service-lib target.
-        System.loadLibrary("monado-service");
+        System.loadLibrary(BuildConfig.SERVICE_LIB_NAME);
     }
 
     private final Context context;