How mahadihasan9/build-apk-in-termux works
This repository is a command-line Android APK build system for Linux and Termux. Its principal workflow is to prepare the environment, compile app resources and Java/native code, convert Java classes to DEX, package and align the APK, sign it, and optionally install it. The README documents these stages and platform-specific installation routes; the only sampled source is the JNI implementation, so app-internal behavior beyond that documented integration is not inferred.
Main entry points: Makefile Install dispatcher · MainActivity.java Java activity · native.cpp JNI implementation · AndroidManifest.xml App configuration
Components 19
Environment
- Environment setup
setup.sh
App sources
- App configuration
AndroidManifest.xml - App resources
res - Java activity
src/com/example/myfirstapp/MainActivity.java - JNI implementation
src/jni/native.cpp
APK build
- Build orchestrator
Makefile - Resource compilation
Makefile - Resource linking
Makefile - Java compilation
Makefile - Native compilation
Makefile - DEX conversion
Makefile - APK packaging
Makefile - APK alignment
Makefile - APK signing
Makefile - Signed APK
Deployment
- Install dispatcher
Makefile - ADB install
- Root install
Other components
- Developer
Connections 21
- Developer → Environment setup: prepares environment
README.md - Developer → Build orchestrator: runs build
README.md - Build orchestrator → Resource compilation: runs
README.md - App resources → Resource compilation: provides XML
README.md - Resource compilation → Resource linking: compiled resources
README.md - App configuration → Resource linking: configures app
README.md - Resource linking → Java compilation: generates R.java
README.md - Java activity → Java compilation: Java source
README.md - Java compilation → DEX conversion: compiled classes
README.md - JNI implementation → Native compilation: native source
README.md - Java activity → JNI implementation: calls JNI
README.md - Native compilation → APK packaging: native library
README.md - DEX conversion → APK packaging: DEX output
README.md - Resource linking → APK packaging: resources
README.md - APK packaging → APK alignment: unaligned APK
README.md - APK alignment → APK signing: aligned APK
README.md - APK signing → Signed APK: produces
README.md - Developer → Install dispatcher: requests install
README.md - Install dispatcher → Signed APK: installs
README.md - Install dispatcher → ADB install: dispatches on PC
README.md - Install dispatcher → Root install: dispatches in Termux
README.md