Run the real Linux Hermes Desktop Electron application locally on Android through
Termux, Termux:X11, and an Ubuntu PRoot guest. The verified path renders Hermes
directly into X11 with the standalone xfwm4 window manager—without starting a
full Xfce desktop session.
Install v0.1.2 · Report your device · Read the architecture
Important
This is a community compatibility project, not an official Nous Research Android port, native APK, or remote-desktop setup. Hermes officially supports its CLI on Termux. This repository documents a compatibility layer for running the separate Desktop application on Android and currently claims only the two manually verified physical devices listed below.
Android's own Recents interface shows the Termux terminal environment beside the separate Termux:X11 session containing Hermes Desktop. This is the original physical-device capture—not a generated device mockup. The presentation card above uses a separate authentic Hermes-on-phone capture.
- The real Hermes Desktop interface—not a recreated web page
- A touch-usable Hermes window rendered directly by Termux:X11
- Working move, maximize, resize, and window-switching controls from
xfwm4 - Hermes Agent and Electron running in an aarch64 Ubuntu environment
hermes-androidto launch Desktop andhermes-ubuntuto enter Ubuntu- Versioned diagnostics and troubleshooting
- Optional control of the same phone through an explicitly paired Wireless ADB bridge
This is not an APK. Desktop and Android control are separate layers: Termux:X11 displays Hermes, while the optional Wireless ADB bridge grants explicitly authorized device access. See Architecture.
Manually verified on two physical Android devices:
| Device | Android | Linux guest | Node.js / npm | Result |
|---|---|---|---|---|
| Samsung Galaxy S25 | 16 / API 36 | Ubuntu 24.04.4 LTS | 22.23.1 / 10.9.8 | Desktop GUI verified |
Samsung Galaxy Tab S6 Lite (SM-P620) |
16 / API 36 | Ubuntu 26.04 LTS | 22.23.2 / 10.9.8 | Fresh install and Desktop GUI verified |
Both installations use Termux:X11 on :1, standalone xfwm4, Hermes Agent
v0.19.1 at upstream revision c2ff2e8b, managed Python 3.11.15, and the
source-built workspace Electron application under /usr/local/lib/hermes-agent.
The tablet verification exposed missing Electron runtime packages in v0.1.0;
v0.1.1 installs libnspr4, libnss3, and libgl1 automatically.
The source checkout had only npm-generated package-lock.json churn. No
Android-specific Hermes source patch was required.
Install both Android apps:
- Termux from a current official Termux distribution channel.
- Termux:X11 from its official
nightly release.
Install
termux-x11-universal-debug.apk.
Termux:X11 requires both the Android APK and its companion Termux package. The installer below handles the companion package.
If you choose the sharedUid Termux:X11 APK to reduce Android background
slowdowns, follow the upstream signing requirements exactly: it only works with
a compatible GitHub-built Termux APK. Do not mix APK sources.
Open the Termux host shell—not an Ubuntu prompt—and run:
release=v0.1.2
curl -fSLO "https://github.com/Dadmin88/hermes-desktop-android/releases/download/$release/install-termux.sh"
curl -fSLO "https://github.com/Dadmin88/hermes-desktop-android/releases/download/$release/install-termux.sh.sha256"
sha256sum --check install-termux.sh.sha256
bash install-termux.sh
rm -f install-termux.sh install-termux.sh.sha256The checksum must report install-termux.sh: OK before the installer runs.
The release installer pins all nested project-script downloads to the exact
release commit SHA; it does not assemble an installation from mutable branch or
tag contents.
The installer deliberately has two stages:
- Termux installs
x11-repo,termux-x11-nightly,proot-distro,pulseaudio, the standalonexfwm4window manager, and the host launcher. The full Xfce desktop is not required. - Ubuntu installs Linux build dependencies, pins the known-working Hermes commit, installs Hermes, builds Desktop in source mode, and installs the guest launchers.
The first build downloads and compiles a substantial JavaScript/Electron workspace. Keep Termux in the foreground and prevent Android from suspending it.
Warning
Keep the desktop build inside the Ubuntu PRoot guest. Do not run
hermes desktop --source --build-only or npm ci directly at the Termux host
prompt. Native dependencies such as node-pty will detect Android, look for
an Android NDK build configuration, and fail; that Termux-side failure does
not indicate that the supported Ubuntu build is broken.
If hermes-android reports that the workspace Electron runtime is missing,
rebuild it from Termux with:
hermes-ubuntu
hermes desktop --source --build-only --force-build \
--hermes-root /usr/local/lib/hermes-agent
exit
hermes-androidThe build command must run after hermes-ubuntu changes the shell into the
Ubuntu guest. The final hermes-android command runs back in Termux.
If Ubuntu already contains a different Hermes checkout, the installer stops instead of force-replacing it. Back up deliberate local changes before opting into any commit replacement.
To install only the launch wrappers without changing packages, the Hermes checkout, or the Desktop build, run from Termux:
release=v0.1.2
curl -fSLO "https://github.com/Dadmin88/hermes-desktop-android/releases/download/$release/install-launchers.sh"
curl -fSLO "https://github.com/Dadmin88/hermes-desktop-android/releases/download/$release/install-launchers.sh.sha256"
sha256sum --check install-launchers.sh.sha256
bash install-launchers.sh
rm -f install-launchers.sh install-launchers.sh.sha256Then test the packaged launch flow with hermes-android. The same installer
also adds hermes-ubuntu for opening the Ubuntu guest from Termux.
From the Termux host prompt, run:
hermes-ubuntuThis is the memorable equivalent of
proot-distro login ubuntu --shared-tmp. Type exit to return to Termux.
After installation, configure Hermes from the Termux shell:
proot-distro login ubuntu --shared-tmp -- hermes modelOr run the full setup:
proot-distro login ubuntu --shared-tmp -- hermes setupHermes stores its own credentials and configuration. This repository does not read, copy, or publish them.
Before upgrades, reinstalls, or removal, read Maintenance, upgrades, and removal. It identifies the Hermes user-data boundary and includes backup-first procedures.
From Termux:
hermes-androidThat command:
- Starts the Termux PulseAudio server.
- Starts Termux:X11 on display
:1at 120 DPI. - Opens the Termux:X11 Android activity.
- Starts
xfwm4by itself so Linux windows can move, maximize, resize, and switch without launching the full Xfce desktop. - Enters Ubuntu with
proot-distro --shared-tmp. - Launches Hermes from its source build with workspace Electron.
The launcher defaults can be overridden when a device needs them:
HERMES_X11_DPI=144 hermes-android
HERMES_X11_EXTRA_ARGS=-legacy-drawing hermes-android
HERMES_X11_EXTRA_ARGS="-legacy-drawing -force-bgra" hermes-androidInside the Termux:X11 app:
- Use touchpad mode for desktop-style pointer control.
- Tap for left click; two-finger tap for right click.
- Two-finger swipe scrolls.
- In simulated touchscreen mode, long-press and move to drag.
- Press Android Back to toggle the on-screen keyboard.
- In direct mode, restore Termux:X11 from Android Recents if you switch away.
xfwm4provides maximize, resize, andAlt+Tabwithout an Xfce panel.- Landscape orientation gives Hermes substantially more usable room.
The launcher sets:
AGENT_BROWSER_HEADED=1
AGENT_BROWSER_ARGS=--no-sandbox,--disable-dev-shm-usageHermes browser tools can open a headed Linux browser on the same X11 display.
The included standalone xfwm4 process manages Hermes and browser windows. A
native Android browser opened through ADB is different: it appears as a normal
Android app and can be restored from Android Recents.
In the tested setup, the phone was paired back to itself through Android's Wireless ADB feature. That allowed Hermes to inspect the Android UI, send Home/Back/tap/swipe commands, and launch native Android apps while Hermes Desktop kept running in Termux:X11.
This is powerful access and is not enabled by the desktop installer. Only pair devices you own and trust, keep Wireless debugging off when you do not need it, and never expose an ADB endpoint to an untrusted network.
Follow the exact Wireless ADB bridge guide. The short version, run inside Ubuntu, is:
apt-get update && apt-get install -y adb
adb pair PHONE_IP:PAIRING_PORT
adb connect PHONE_IP:CONNECTION_PORT
adb devicesThe pairing and connection ports are normally different. Android shows both in Developer options → Wireless debugging.
The verified phone has:
apps/desktop/dist/index.html- workspace Electron under
node_modules/electron/dist/electron - no packaged app under
apps/desktop/release
That is expected. The project builds Hermes Desktop with:
hermes desktop --source --build-only --force-build \
--hermes-root /usr/local/lib/hermes-agentand launches the resulting renderer directly through workspace Electron. This avoids the extra electron-builder packaging layer that is unnecessary on the phone.
Because the Ubuntu PRoot guest runs as root, Chromium/Electron is launched with
--no-sandbox. That is a compatibility tradeoff, not a security improvement.
Only run trusted code and trusted Electron content in this environment.
The doctor is layer-aware. Run it once from Termux:
release=v0.1.2
curl -fSLO "https://github.com/Dadmin88/hermes-desktop-android/releases/download/$release/doctor.sh"
curl -fSLO "https://github.com/Dadmin88/hermes-desktop-android/releases/download/$release/doctor.sh.sha256"
sha256sum --check doctor.sh.sha256
bash doctor.shThen run it inside Ubuntu:
doctor=$(mktemp "$PREFIX/tmp/hermes-doctor.XXXXXX")
cp doctor.sh "$doctor"
proot-distro login ubuntu --shared-tmp -- \
bash "/tmp/$(basename "$doctor")"
rm -f "$doctor" doctor.sh doctor.sh.sha256The report intentionally omits API keys, .env files, auth data, sessions,
chat history, and message contents.
Every mutating installer supports a dry run:
bash install-termux.sh --dry-runDownload and verify install-termux.sh with the release checksum first, using
the commands in Install.
Read Troubleshooting for black screens, incorrect colors, scaling, hidden windows, browser issues, and build failures.
The direct-X11 workflow has been manually verified on two physical Android devices, including a fresh installation on the Galaxy Tab S6 Lite. The automation is regression-tested in this repository, but broad Android-device compatibility remains unverified. If you reproduce it on another device, open a device compatibility report with both layer-aware doctor reports and your device model.
The current project release is v0.1.2. Installers default to that project tag
and separately pin the known-working Hermes upstream revision. See the
changelog and release page.
bash tests/run.shPrimary references are collected in Sources.
MIT. Hermes Agent, Termux, Termux:X11, Xfce, Electron, and their trademarks remain subject to their own licenses and policies.

