Skip to content

Building from source

AndroidWrt builds on macOS or Linux and cross-compiles for Android on arm64. The result is rebornd, a single binary with the web panel embedded, and the Lite app that carries it.

Prerequisites

  • Go 1.27 or later
  • Node.js 24 or later, with npm
  • The Android SDK with build-tools;35.0.0, platforms;android-30 and platform-tools (adb), in ANDROID_HOME
  • A JDK

The Lite app is built without Gradle, directly with the SDK tools (aapt2, javac, d8, zipalign, apksigner).

Build

git clone https://github.com/AndroidWrt/core.git && cd core
./cores/fetch-cores.sh   # download Xray, SmartDNS and the geo data (first time only)
./build.sh               # web panel (Vite) + rebornd (Go, android/arm64) into dist/rebornd
./android/build.sh       # the Lite app into dist/androidwrt-lite.apk

android/build.sh bundles dist/rebornd and the cores found in cores/. A missing core is skipped with a warning, so fetch them before building a release. Besides the APK it writes a versioned copy, androidwrt-lite-<version>.apk, and the update manifest androidwrt-lite.json.

Versions and signing

VariableMeaning
VERSION_NAMEThe version shown to users (default 1.0.0)
VERSION_CODEMust grow with every release, or no update is offered (default 1)
LITE_KEYSTORE, LITE_KEYSTORE_PASS, LITE_KEY_ALIAS, LITE_KEY_PASSThe release signing key

Android installs an update only over an app signed with the same key, so a release key must be kept safe and never changed. Without these variables the build is signed with a local debug key: fine for testing on your own device, never for publishing.

Deploy

With the device connected over USB debugging:

./deploy/deploy.sh --apk    # install the Lite app and start AndroidWrt
./deploy/deploy.sh --full   # development: push the cores and rebornd without the app
./deploy/deploy.sh          # development: update rebornd only

Layout of the source

DirectoryContents
frontend/The web panel: React and Vite
reborn/rebornd, the Go daemon, with the built panel embedded
android/The AndroidWrt Lite app and its build script
deploy/Install and deploy scripts
cores/The cache of core binaries
dist/Build output