

Who says you need a heavy desktop setup and bloated IDEs just to build Android apps?
I set out to prove that you can assemble, dex, package, and sign a native Android application directly on a mobile device targeting compileSdk 36 using pure CLI binaries inside Termux.
🛠️ The On-Device Build Pipeline
Instead of relying on desktop Gradle or Android Studio, the entire build toolchain was executed on-device:
-
Compilation (
ecj): Java source files compiled directly against theandroid-36platform JAR. -
Dexing (
d8): Converting compiled Java bytecode into Dalvik Executable (classes.dex). -
Resource Linking (
aapt2): Compiling and packaging resources, manifest, and assets into an unsigned APK container. -
Binary Signing (
apksigner): Generating a local keystore and signing the APK with proper v2/v3 signature schemes.
🚀 The Result
The generated binary installed cleanly and launched smoothly with zero runtime crashes or classloader errors—proving that full-stack Android compilation can live natively on ARM hardware.
Next step: Wiring this CLI toolchain up to a web-based Monaco Editor running on a local Node server right inside Termux to create a lightweight, self-hosted web IDE!



Top comments (0)