Hello! You are taking over development for Kodrix, a native Android IDE that runs entirely on-device — no Termux, no PC, no remote server required.
- App Stack: Native Android (Kotlin, Jetpack Compose).
- Embedded Node.js v25: Bundled as
libnode.soinjniLibs/. Used for JS/TS/HTML/CSS/JSON/Bash LSPs and running web apps. - Embedded Python 3.13: Downloaded from GitHub Releases as a
.zipand extracted byBinaryManager. Used for Python execution andpylsp. - Clang 21.1.8 (C/C++): Downloaded on-demand from Termux package repositories as
.debfiles. Extracted using pure-Java XZ decompression (org.tukaani:xz) and Toyboxtar. - LSP Bridge: Language servers run in background processes. The app communicates via STDIO (stdin/stdout) using JSON-RPC 2.0. See
LspClient.kt. - Git Bridge:
libgit2.soJNI bridge for clone/commit/push/pull over HTTPS. - Native SWC: Bundled native SWC binaries for Next.js high-performance compilation.
| Feature | Status |
|---|---|
| Terminal (PTY) | ✅ Complete |
| Git / GitHub OAuth | ✅ Complete |
| Node.js + npm | ✅ Complete |
| Python 3.13 runtime | ✅ Complete |
| Next.js / React / Vite | ✅ Complete |
| Built-in browser + DevTools | ✅ Complete |
| Port forwarding | ✅ Complete |
| Source control UI | ✅ Complete |
| Extension marketplace | ✅ Complete |
| LSP (HTML/CSS/JS/TS/Bash) | ✅ Complete |
Python LSP (pylsp) |
✅ Complete |
C/C++ LSP (clangd 21.1.8) |
✅ Complete |
| AI Agent (Gemini) | ✅ Complete |
| React Native | ❌ Not started |
| Flutter | ❌ Not started |
The C/C++ toolchain is installed on-demand when the user first opens a .c or .cpp file.
Key implementation details:
- Download: ~120–150 MB of Termux
.debpackages frompackages-cf.termux.dev. - XZ decompression: Android's system
tarsupports-Jbut requires thexzbinary in PATH — which is NOT present on stock Android. The installer usesorg.tukaani:xz(XZInputStream) to decompress in pure Java, then callstar -xf(no-Jflag). - Symlinks: Termux packages contain symlinks (e.g.
windres → llvm-windres).copyDirContents()usesjava.nio.file.Files.isSymbolicLink()+Files.createSymbolicLink()— NOTFile.copyTo()— to handle these. - Verification skip:
clangdis a Termux/Bionic binary that cannot self-execute in the Android sandbox.BinaryManager.markToolInstalled()is used to bypass the version check. - Concurrency guard:
isInstallingCpp(synchronized) prevents duplicate download coroutines if the user switches between.cppfiles during install.
Install path: filesDir/versions/clang/21.1.8/usr/bin/clangd
| File | Purpose |
|---|---|
viewmodel/TerminalViewModel.kt |
LSP lifecycle, process launch, C++ toolchain install, Python pylsp install |
bridge/BinaryManager.kt |
Binary download/extract/versioning, notification progress, wrapper scripts |
lsp/LspClient.kt |
JSON-RPC STDIO communication bridge |
lsp/LspTypes.kt |
LSP protocol data classes |
ui/IDEView.kt |
Editor UI, autocomplete dropdown rendering |
app/build.gradle.kts |
Gradle dependencies (org.tukaani:xz:1.10 added for C++ install) |
# Build
./gradlew assembleDebug
# Install (replace with your device serial)
adb -s <DEVICE> install -r app/build/outputs/apk/debug/app-x86_64-debug.apk
# Monitor logs
adb -s <DEVICE> logcat | grep -E "Kodrix|LspClient|CppInstall"- Verify
clangdautocomplete end-to-end after toolchain install completes on real hardware. - Add
compile_commands.jsongeneration soclangdresolves project-specific include paths. - React Native support.
- Flutter support.
Good luck!