Build APK Packages (OpenWrt 25.12+)
Guide to building .apk packages.
Prerequisites
- Docker
- OpenWrt 25.12 SDK container
- Go toolchain
- UPX binary
- RSA signing key (for repository index)
Build Command
sh
./build_scripts/build_apk.sh <version> <target_arch>Example
sh
./build_scripts/build_apk.sh 1.100.0 x86_64Build Process
- Initialize OpenWrt feeds and install
golangpackage - Copy optimized
package/tailscale/into the SDK - Set up Go cross-compilation toolchain
- Build with optimized tags
- Apply UPX compression
- Generate
packages.adbindex with signature
APK Repository Index
Unlike OPKG, APK uses a single index file (packages.adb) per architecture with embedded signatures.
The build script automatically:
- Generates the index with
apk mkndx - Signs it with the RSA key
- Validates the output