DEV Community

Chibuike Okoye
Chibuike Okoye

Posted on

Zero-Desktop Android Dev: Compiling, Dexing, and Signing API 36 APKs On-Device with Termux



 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:

  1. Compilation (ecj): Java source files compiled directly against the android-36 platform JAR.
  2. Dexing (d8): Converting compiled Java bytecode into Dalvik Executable (classes.dex).
  3. Resource Linking (aapt2): Compiling and packaging resources, manifest, and assets into an unsigned APK container.
  4. 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!

android #mobiledevelopment #termux #buildtools

Top comments (0)