{"slug": "i-gave-a-language-model-hands-inside-android-and-it-built-me-an-app-factory", "title": "I gave a language model hands inside Android — and it built me an app factory", "summary": "An anonymous developer built Termux Assistant AI, an open-source Android app (MIT) that gives a language model direct shell access inside Termux by bridging a WebView running DeepSeek Chat with local HTTP servers. The system's \"Vibe mode\" lets the model autonomously generate, compile and sign Android apps via aapt2, javac, d8 and apksigner, with a watchdog that auto-resumes stalled runs. The developer says they do not know how to code and that the project was built by one person and one AI.", "body_md": "Most LLM assistants are \"brains in a jar.\" They can reason, write code, explain concepts — but they can't do anything in the real world. Everything they produce is text that a human copies and pastes somewhere.\n\nI decided to fix that. **Termux Assistant AI** is an Android app that bridges a WebView with DeepSeek Chat and simultaneously gives the assistant direct shell access inside Termux via local HTTP servers. In effect — the language model gets hands.\n\nThe project is fully open source (MIT): [github.com/CR4CODE/Termux-Assistant-AI](https://github.com/CR4CODE/Termux-Assistant-AI).\n\n[Termux](https://termux.dev) is a terminal emulator for Android with a full Linux environment — no root required. Bash, Python, git, ssh, package manager — all working. Essentially a regular Linux distro in your pocket.\n\nThe key insight: if I have Termux, I have a shell. And if a language model has a shell, it can run arbitrary commands, work with files, compile code, publish releases.\n\nTwo questions remained:\n\nThe system consists of three isolated layers.\n\nThe main app is an Android WebView that loads `chat.deepseek.com`. The user chats with the model as usual. But the app intercepts the \"Send\" button and can insert prompts into the input field and read responses from the DOM.\n\nImplemented via a JavaScript bridge `VibeWebBridge`: methods `sendMessage`, `readLastAnswer`, `lastAnswerHash`, `isThinking`, `isStopped` execute JS in the WebView and return results through callbacks.\n\nResponse reading works by finding `[class*=markdown]` elements and hashing the last block to distinguish a new response from an old one.\n\nInside Termux runs a Python server `ai-tasker-server`. It listens on `127.0.0.1:8767` and accepts tasks from the app:\n\n the app accepts tasks:\n\nPOST /task\n\nBody: {\"task\": \"auto:uptime\"}\n\nResponse: {\"status\":\"success\",\"output\":\"...\",\"exit_code\":0}\n\nRoutes are grouped by prefix:\n\nA key design decision: auto: commands go straight to bash, without LLM-based classification. The first version tried to guess the command type, which caused hangs on non-existent routes. Now it's just subprocess.run([\"bash\",\"-c\", code], timeout=120).\n\nA separate Android service that manages the WebView and exposes an HTTP API:\n\nThis service is how the assistant talks to DeepSeek and runs autonomous loops.\n\nThis is the most interesting part — **Vibe mode**. You write one task, and the system does the rest.\n\nWorkflow:\n\n`vibe-run <project> \"<task>\"`\n`.java`/`.xml` files`=== FILE: path === ... === END FILE ===`\n`/send`)` aapt2 → javac → d8 → apksigner`\n`/install-apk`\nThe key trick is **self-healing**. If the model stops in \"Stopped\" state (e.g., token limit), the background watchdog `vibe-auto-resume` checks `/stopped` every 5 seconds and automatically sends \"continue\". Without this, the autonomous run just hangs.\n\n`llama.cpp` in Termux is the next step`uiautomator` to control any app\nTermux Assistant AI is an experiment: what happens if you give a language model hands? It turns out — a lot. The model builds apps, ships releases, fixes its own bugs, runs social media. All inside a single Android phone, without a PC or cloud infrastructure.\n\nThe project is fully open source:\n\nI'm not a programmer. I don't know a single line of code. Everything you see was built by one person and one AI that became my hands.\n\nQuestions and criticism are welcome in the comments.", "url": "https://wpnews.pro/news/i-gave-a-language-model-hands-inside-android-and-it-built-me-an-app-factory", "canonical_source": "https://dev.to/cr4code/i-gave-a-language-model-hands-inside-android-and-it-built-me-an-app-factory-1390", "published_at": "2026-10-07 06:34:44+00:00", "updated_at": "2026-10-07 06:48:06.836031+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "developer-tools", "ai-products"], "entities": ["Termux Assistant AI", "Termux", "DeepSeek", "Android", "llama.cpp", "uiautomator", "CR4CODE", "MIT"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-gave-a-language-model-hands-inside-android-and-it-built-me-an-app-factory", "markdown": "https://wpnews.pro/news/i-gave-a-language-model-hands-inside-android-and-it-built-me-an-app-factory.md", "text": "https://wpnews.pro/news/i-gave-a-language-model-hands-inside-android-and-it-built-me-an-app-factory.txt", "jsonld": "https://wpnews.pro/news/i-gave-a-language-model-hands-inside-android-and-it-built-me-an-app-factory.jsonld"}}