2026-04-15 02:06:24 -07:00
2026-04-11 13:57:11 -07:00
2026-04-04 23:16:20 -07:00
2026-04-04 23:16:20 -07:00
2026-04-04 23:16:20 -07:00
2026-04-12 00:52:03 -07:00
2026-04-12 03:12:52 -07:00
2026-04-04 23:16:20 -07:00
2026-04-12 00:09:18 -07:00

Remote Access App

This project is a SSH client for Android that hopefully works better than existing clients.

Native: libghostty-vt (Zig)

The app bundles libghostty-vt from ghostty-org/ghostty, built with Zig and the Android NDK. The :app:buildGhosttyNative task (Kotlin in app/build.gradle.kts) runs before each build via preBuild.

The Ghostling demo is C-only and uses CMake, but it still builds the library via Ghosttys zig build (see Ghostlings CMakeLists.txt). The README line about “zero-dependency” describes what the VT core can look like in minimal configurations; the default native build enables SIMD and pulls in C++ (highway, simdutf, utfcpp). This project passes -Dsimd=false to Zig so that C++ stack is omitted (same idea as Ghosttys c-vt-cmake-static example and the note in Ghosttys root CMakeLists.txt about simd). Tradeoff: less SIMD-accelerated text/UTF-8 work; you still need Zig and the Android NDK for this cross-compile.

Requirements

  • Zig on PATH, version matching Ghosttys build.zig.zon (currently 0.15.2+). Override the binary with ZIG=/path/to/zig if needed.
  • Android SDK with sdk.dir in local.properties (or ANDROID_HOME / ANDROID_SDK_ROOT).
  • NDK installed for the version pinned in app/build.gradle.kts as android { ndkVersion = "…" } (under $sdk/ndk/<version>).

Pinning the Ghostty revision

Edit native/ghostty/ghostty.version: first non-comment line is a Git branch, tag, or full commit SHA. To pull a newer tip of a branch (e.g. main), delete native/ghostty/.ghostty-build-stamp so the next Gradle build refetches and rebuilds.

ABIs

Only arm64-v8a and x86_64 are built and packaged today. (-Dsimd=false avoids the old 32-bit ARM float-ABI failure in the C++ SIMD deps; enabling more ABIs would need a separate check.)

Outputs

Built libghostty-vt.so (ignored by git) is copied into app/src/main/jniLibs/<abi>/. Zig sets DT_SONAME to libghostty-vt.so.0, which would make libremote_ghostty_jni.so depend on that filename (not packaged by AGP as a single *.so). The CMake post-link step runs patchelf --replace-needed libghostty-vt.so.0 libghostty-vt.so on the JNI library when patchelf is on the host PATH (e.g. Arch: pacman -S patchelf). Install it so debug/release APKs load libghostty-vt.so correctly.

Description
Android app for SSH
Readme 510 KiB
Languages
Kotlin 88.1%
C 10.1%
CMake 1.4%
Just 0.4%