Android port: finish remote mux attach and consolidate startup/UI fixes #101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Finish the Android port in
/Users/user/work/jerboa-shell-android-implso the packaged app starts reliably, shows a usable terminal, accepts ordinary Android keyboard input, and supports the intended remote workflow:HOST:PORT.,mux attach HOST:PORTand reaches a usable remote mux prompt.This issue is a handoff for a batch implementation pass. Treat the current worktree and the handoff document as evidence, not as a claim of completion.
Repository/worktree state
ober/jerboa-shellfix/android-shell-startup/Users/user/work/jerboa-shell-android-impldocs/android-startup-unblock-2026-09-24.md.dist/android/jsh-0.10.68-arm64-v8a-debug.apk.2c638880fc01c9ad0d409429f13a5912cb1c5fe71e9aab9f3923ab357e581f4./data/data/com.termux/files/home/jsh.apk; the remote checksum matched.Do not discard the dirty changes. Review and consolidate them before committing.
Verified work already completed
Startup crash diagnosis and fix
HOSTNAMEwas absent./bin/hostname; the packaged Android worker then died with SIGSEGV.HOSTNAME=androidbefore mux server and pane startup keeps the pane alive..jshrcproduced a liveuser@androidprompt and passedecho HOSTNAME_ONLY_FIX_VERIFIEDin an independent mux attachment..jshrcworkaround as the production fix.Blank terminal diagnosis and fix
TerminalView.onDrawused RGB-only integers as Android ARGB colors.0x00FFFFFFand0x00000000are fully transparent.Local command-entry UI
EditTextplusSendrow was added above the transcript.LinearLayout.LayoutParamsfix was added after discovering that long commands could measure the EditText at full width and push Send off-screen.echo IME_COMMAND_OK, pressed Send, and observed the field clear while the local shell prompt remained live.,mux attach 10.66.60.3:1234 --no-mtlsstring remained editable with Send visible after the weighted-layout fix.Connect UI
HOST:PORT.,mux attach HOST:PORTinto the live shell pane.10.66.60.1:1234.Build and packaging
make androidexists as the human-facing APK target.~/.embedby default, supports an explicit temporary passphrase file for encrypted embed generation, and cleans an internally created passphrase file.jerboa_check_balancereportsBalance OKforandroid/app.ss.git diff --checkis clean.Current changed files and what they contain
These are the pending dirty changes that must be reviewed/consolidated:
Makefile:make androidnow orchestrates all-feature selection, personal embed source, encrypted passphrase handoff, and APK packaging.android/app.ss: typed terminal transcript/ANSI cleanup, opaque colors, Connect dialog, command-entry EditText/Send row, weighted layout params, content descriptions, and related Android externs.android/native/jsh_android_bridge.c: HOSTNAME injection, Android passphrase-file environment setup, mux debug log path, and existing Android launcher environment changes.docs/android.md: documents the one-command personal Android build and embed/passphrase behavior.support/patch-extras-build.sh: applies Android embed handoff, mux passphrase, worker fork/exec, environment preservation, and related extras build overlays.support/gen-embed-early-passphrase.patch: early encrypted-embed passphrase handling.support/extras-android-embed-handoff.patch: Android embed passphrase handoff support.support/extras-android-mux-passphrase.patch: mux worker passphrase handoff support.support/extras-android-worker-fork.patch: Android worker fork/exec path changes.docs/android-startup-unblock-2026-09-24.md: full diagnostic and test handoff.docs/evidence/android-startup-2026-09-24/: emulator screenshots and trace/log evidence, includingterminal-visible.png,terminal-fresh-hostname.png,connect-ip-port.png,command-row-pty.png,command-row-weighted.png, andconnect-termux-clean.png.build/: generated Android build output; decide what is intentionally ignored versus deliverable.There are also pre-existing modifications in the dirty checkout. Do not blindly remove them; determine whether each is required by the Android path and preserve only verified, maintainable changes.
Remaining implementation work
1. Make remote Connect reach a verified remote prompt
A real Termux mux listener was started at
10.66.60.3:1234, and the emulator could reach the port (nc -zsucceeded). The Android Connect dialog changed the status toConnecting to 10.66.60.3:1234, but no remote prompt or command output was verified.Investigate the full path:
android/app.ssConnect callback and command dispatch.android/native/jsh_android_bridge.c.vendor/jerboa-shell-extras/jerboa-src/src/jsh/mux-client.ssremote TLS, certificate pinning, mTLS,MSG-ATTACH, and password authentication.Connectingto a useful state.echo ANDROID_REMOTE_OK.The current JNI bridge itself starts a local mux server with
--server --name defaultand reconnects to${HOME}/mux/default.sock; it does not directly accept a host, port, certificate, or password and does not itself issue remoteMSG-ATTACH. If the intended design is to keep remote attach in the shell pane, prove that path end-to-end. If the intended design is native remote transport, implement the typed/native bridge and lifecycle deliberately rather than changing only the Unix socket path.Use a server configured with matching embed TLS material for a real acceptance test. Do not claim success from TCP reachability alone.
2. Finish terminal input/output acceptance
adb shell input text.3. Review Android worker patches
The current patch stack includes speculative or risky changes from the startup investigation. Audit each one against a clean build and runtime evidence:
posix_spawn.close_fds_exceptbypass did not fix the startup crash and can leak descriptors; do not ship it without proof.Remove dead experiments and narrow compatibility overlays to the smallest verified implementation.
4. Reproducible build/release workflow
features-allgate from absentvendor/and the platform build gate before PR creation.VERSIONand user-visible/package versions as required by repository policy.Required acceptance evidence
The implementation is not complete until a fresh install demonstrates all of the following on the emulator:
.jshrcworkaround.HOST:PORT.echo ANDROID_REMOTE_OKreturns visible output through the Android UI.make androidbuild reproduces the APK from the documented inputs.docs/android-startup-unblock-2026-09-24.md.Useful commands and evidence
The handoff document has the detailed timeline and screenshot references. Keep secrets such as the personal embed passphrase out of the issue and out of committed documentation.