Run Hermes Agent entirely inside an Android app — no Termux, no real chroot, no ADB.
This project is only an integration: proot + Hermes + hermes-webui, plus an install/control UI around them. No changes are made to Hermes itself, and no other original development is included.
The app downloads an Ubuntu arm64 rootfs, boots Hermes inside proot, and shows the native hermes-webui chat interface in a WebView. Everything lives under /data/local/hermes and runs in the foreground so Android does not kill it.
- One-tap first-run setup: rootfs → Hermes installer → WebUI
- All three install sources are configurable (rootfs tarball, Hermes
install.shURL, WebUI tarball) - In-app chat via hermes-webui (
127.0.0.1:8787), with a local fallback dashboard - Update Hermes or the WebUI in place from the setup panel
- Uninstall / reset, optionally keeping sessions, config and API keys
- Boot autostart and a local control API for the bundled
phone-controlskill (tap/swipe/screenshot/launch apps viasu) - WebView never overlaps the system bars or IME
- Android 8.0+ (API 26), arm64
- Root via Magisk or similar (used to write
/data/local/hermesand for the control layer) - ~4 GB free storage and a network connection for the first install
export ANDROID_HOME=$HOME/Android/Sdk
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-arm64 # JDK 17+
./gradlew :app:assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apkThe APK is about 4 MB; nothing is bundled besides proot and the scripts.
- Launch Hermes Phone and grant root when asked.
- Optionally edit the three URLs (defaults below), then tap 开始安装 / Install.
- Wait for the download, extraction and install steps; the app opens the chat UI when
/healthresponds. - Set your model/API key inside Hermes as usual (e.g. in
~/.hermes/config.yamlor via the onboarding UI).
Default sources:
| Step | Default |
|---|---|
| rootfs | https://cdimage.ubuntu.com/ubuntu-base/releases/24.04/release/ubuntu-base-24.04.3-base-arm64.tar.gz |
| Hermes installer | https://hermes-agent.nousresearch.com/install.sh |
| WebUI | https://codeload.github.com/nesquena/hermes-webui/tar.gz/c67fd2dd |
Use the ⋮ button on the middle-right edge (or the system Back gesture) to return to the setup panel, where you can reopen the WebUI, update components, or uninstall.
MainActivity (WebView) ──▶ 127.0.0.1:8787 hermes-webui
│
ProotService (foreground) ──▶ proot -0 -r /data/local/hermes/rootfs
│ └─ Ubuntu 24.04 + Python + Hermes Agent
RootfsManager ──▶ downloads rootfs / scripts / WebUI tarball
proot runs in userspace, so SELinux stays enforcing and no system partitions are mounted. Android-specific workarounds (policy routing, PROOT_TMP_DIR, no --link2symlink, DNS, IME insets) are documented in docs/hermes-android-client.md.
app/— Kotlin app (UI, service, install manager, control API)app/src/main/assets/scripts/— install / run / verify scripts executed inside prootapp/src/main/assets/skills/phone-control/— Hermes skill for controlling the phonedocs/hermes-android-client.md— design notes, verification log and pitfallstest/— QEMU/LineageOS test harness and screenshots
Verified end-to-end on LineageOS 22 (Android 16, arm64) under QEMU: rootfs install, Hermes v0.22.2, CLI, native WebUI chat, control API, boot autostart, uninstall/reset.
Apache-2.0. Third-party components and their licenses are listed in THIRD_PARTY_NOTICES.md.