Skip to main content
Release APKs must be built through the packaging entry point; prepare the native components first before your initial build.

Requirements

The build entry point is the kotlin script in the repository root (kotlin.bat on Windows). It downloads the required Kotlin Toolchain on first run, so neither Kotlin nor Gradle needs to be installed manually. The minimum supported Android version is 13 (API 33) and only arm64-v8a is supported; the NDK version, minimum SDK and ABI are read from kernel.properties.

Prepare the repository

1

Get the source

2

Configure the Android SDK

Install API 37, build-tools 37.0.0, NDK 30.0.16248370, CMake 3.22.1 and Ninja, and accept the SDK licenses. Point ANDROID_HOME at the SDK, or create a local.properties file in the repository root:
ANDROID_HOME, ANDROID_SDK_ROOT and sdk.dir must all point to the same SDK.
3

Prepare Go and Rust

Install Go 1.27 maintained by MetaCubeX (the version CI uses) and the Rust nightly toolchain. A dedicated Go SDK is recommended because the next step modifies its GOROOT:
Before building the Go core, apply the patches in .github/patch/ to the directory reported by go env GOROOT. CI does this automatically before building native components; the commands below work on Linux, macOS and Git Bash:
4

Sync the mihomo kernel

The Alpha branch is synced by default; Meta is also available:

Build native components

Full build

This generates every native library and downloads the Geo data.

Per-component builds

The default ABI comes from abi.app.list in kernel.properties; you can also set it explicitly through an environment variable:

Build outputs

Native libraries in jniLibs/arm64-v8a/: Geo data lives in build/generated/assets/geo/:

Build the APK

The build command is kotlin run -m packaging; all -Pkey=value arguments go after -- and are passed to the packaging entry. In PowerShell, arguments containing dots must be single-quoted.

Debug

Debug is for local installation and testing and does not bundle Geo by default:

Release

Release builds the loader DEX and wraps the payload; complete the signing setup below first:
Verified APKs are written to output_apk/debug/ and output_apk/release/ as YumeBox-external.apk or YumeBox-builtin.apk, together with a matching .apk.json recording the version, SHA-256 and other build info.

Signing

Without a signing configuration, Debug generates and uses a standard debug keystore. If signing.properties exists in the repository root, both Debug and Release prefer it. Release requires signing: place release.keystore in the repository root and create signing.properties:
Never commit release.keystore or signing.properties.
An unsigned APK is only produced when --allow-unsigned is passed explicitly and signing.properties is absent; unsigned APKs cannot be installed with adb install, and CI does not use this option.

CI builds

All CI jobs run on macos-26 and build only arm64-v8a: CI uses the commit count as the build version number and embeds the commit hash and branch information.

Verify the installation

If the file name differs, check the actual artifacts in output_apk/debug/ first.

Troubleshooting

For more build errors, see the FAQ.
Last modified on November 1, 2026