Android client development preview

apps/mobile is an optional Tauri 2 mobile shell. It packages the existing React console from apps/tui/web/build.mjs, including the shared App, browser platform adapters, and xterm terminal. There is no separate set of mobile screens, controller, or agent implementation.

The phone connects directly to an existing remote console over HTTPS and WSS. Projects, containers, and coding sessions continue running on the server when the app disconnects. The mobile shell does not import laptop credentials, inspect SSH configuration, run Docker, or expose a native shell API.

This is a development preview, not a published or store-signed mobile release. An Android build does not establish iOS support; iOS has not been built or tested by this preview.

Build

Install the repository's JavaScript dependencies and the official Tauri mobile prerequisites. The checked-in Android project uses JDK 17, Android SDK platforms 36 (Tauri's Android library) and 37.0 (the app), Android Build Tools 36.0.0, Gradle 9.6.1, and Android Gradle Plugin 9.3.1. NDK 27.2.12479018 is supported by the local development setup. Android API 24 is the native manifest minimum; the shared client requires a current Android System WebView. Compatibility with older WebView releases is not established. The default APK target is ARM64.

Set JAVA_HOME, ANDROID_HOME, and NDK_HOME if automatic detection does not find the installed toolchains. The wrapper recognizes Android Studio's JDK and Homebrew JDK 17 on macOS, and conventional Android SDK locations. It does not install a JDK, NDK, or emulator image. Gradle can download missing SDK platforms and build tools when their SDK licenses have already been accepted.

rustup target add aarch64-linux-android
pnpm --filter '@devctl/mobile^...' build
pnpm --filter @devctl/mobile android:build --debug

The first build downloads public Cargo and Gradle dependencies. By default, Cargo and Gradle use at most two workers and the Gradle JVM has a 1 GiB heap. Use CARGO_BUILD_JOBS=1 for a more constrained machine. The wrapper remaps personal source paths in native compiler metadata while preserving caller flags. Build output stays in the ignored apps/mobile/src-tauri/target and Android Gradle build folders.

The debug APK is under apps/mobile/src-tauri/gen/android/app/build/outputs/apk/. Install it on an already running ARM64 emulator or attached device:

adb install -r PATH_TO_DEBUG_APK
adb shell am start -n dev.devctrl.mobile/.MainActivity

pnpm --filter @devctl/mobile android:dev also supports the official Tauri development flow. android:init regenerates the native Android project; normal builds use the checked-in project and do not require initialization.

Connect

Paste the remote console's private HTTPS link into the existing connection form. With server users enabled, request a fresh link for a new installation: operator invitations are single use and expire. Reusing a link already redeemed in another browser does not authorize a second device. The shared client exchanges its access key for a revocable browser session bound to the exact selected console and bundled app origin. Keys are never built into the APK.

The server must explicitly allow the bundled asset origin http://tauri.localhost. The existing --client-url desktop mode permits the Tauri asset origins used by both desktop and Android; it does not enable wildcard CORS. Use a certificate trusted by Android's system trust store; this preview does not add a user-installed CA override. The release app does not disable certificate validation. HTTP is accepted by the shared connection parser only for localhost development endpoints.

Verification

Ordinary checks require neither an emulator nor credentials:

pnpm --filter @devctl/mobile test
pnpm --filter @devctl/mobile typecheck
node --test apps/tui/web/install.node-test.mjs

For an installed debug APK on an existing emulator, the opt-in smoke test uses a synthetic HTTPS/WSS console, verifies shared project navigation and terminal input/detach, and captures screenshots:

DEVCTL_PLAYWRIGHT_MODULE=playwright pnpm --filter @devctl/mobile android:smoke

Install Playwright separately for this opt-in check. DEVCTL_ANDROID_SERIAL selects an attached device when more than one is present; DEVCTL_ANDROID_SCREENSHOTS sets the screenshot directory. The test refuses to replace existing saved console credentials. It uses a temporary loopback certificate exception only through the debug WebView's DevTools session and removes its own forwarding and synthetic login afterward. The product's TLS configuration is unchanged. No production account or live agent is involved.

The ARM64 debug APK has been built with the toolchains above. Its APK v2 signature, ZIP alignment, and 16 KiB native ELF load alignment were checked; this is not a test on a 16 KiB-page device. A binary scan confirmed personal source paths were remapped and native debug sections were removed. Installation and native activity launch succeeded on an existing Android 35 ARM64 emulator without downloading another OS image.

The actual Android WebView signed in to an isolated HTTPS fixture and rendered the shared Projects mosaic. It also exchanged a fresh invitation with an actual remote console over trusted HTTPS. Sign-in, controller state, and operator metadata requests returned HTTP 200, and the remote Projects view rendered without page errors. This used the exact bundled origin http://tauri.localhost; certificate validation and the existing exact-origin allowlist remained enabled. No agent prompts were sent during this check.

These checks used a frozen shared-UI bundle. Rebuild the APK to include later changes to the common browser UI. The full terminal smoke has not passed: its terminal opening check did not advance from the selected session into a terminal. Terminal input, WSS terminal attachment, file-picker/download behavior, and background/resume behavior remain unverified on Android. The opt-in script records the outstanding checks; its presence is not evidence that they passed.

Current boundaries

The mobile workspace is excluded from server installers, Docker build context, and control-plane source fingerprints. Android caches, SDK paths, and APKs are not server dependencies.

References: Tauri mobile prerequisites, Tauri development, AGP 9.3 compatibility.