mkapk is a lightweight, native Android build orchestrator designed specifically for high-speed, local compilation directly inside Termux (aarch64). It bypasses the overhead of heavy cross-compilation environments, bringing intelligent incremental builds, code optimization, and multi-architecture targeting straight to your terminal.
- Incremental Builds: Automatically detects source changes and rebuilds only what is necessary, drastically cutting down iteration times.
- Obfuscation Engine: Built-in support for Java, Kotlin, and resource obfuscation to protect your source code.
- Binary Stripping: Automatically strips library binaries to minimize your final APK footprint.
- Project Initialization: Bootstrap new Android projects instantly with built-in template directory structure initialization.
- Targeted Architecture Generation: Compile universal APKs or generate split, architecture-specific binaries smoothly.
Before compiling or running mkapk, you need to ensure the required native build utilities, Java development kit, and Android platform tools are installed in your Termux environment.
openjdk-21opensslndk-multilibaapt2apksignerclangbinutilslibzipwget
Run the following command inside Termux to install all dependencies at once:
apt update && apt install openjdk-21 ndk-multilib aapt2 clang binutils libzip openssl apksigner -yInitialise template directory structure in the current directory.
mkapk initStart build using:
mkapk buildDefault build is debug.
-release: Do a release build-all: Force a full rebuild-ndk-all: Build apk for all supported architectures along with a universal apk-arch <architecture>: Build apk only for the specified architecture
To clean up previous build artifacts, run:
mkapk cleanNote: This will disable incremental build for the next build.
To install a plugin, run:
mkapk install <path/to/plugin.pl>To uninstall a plugin, run:
mkapk uninstall <path/to/plugin.pl>