# SSH Android proof: final capture index

Target: [#17239](https://git.cafe/pingdotgg/t3code/pulls/17239). Test/evidence work only; no forge writes.

Before: [909e4c9482](https://git.cafe/pingdotgg/t3code/commit/909e4c948278afc2b3e1e665075fb1755a13f894). Full SHA 909e4c948278afc2b3e1e665075fb1755a13f894.
After: [59fdabb266](https://git.cafe/pingdotgg/t3code/commit/59fdabb266c155c56c63866c8fb0cc52f710f9b9). Full SHA 59fdabb266c155c56c63866c8fb0cc52f710f9b9.

[Final provenance matrix](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/d8c2af5655ed7cf4/pr-17239-proof-matrix-final.md). Read in full; immutable implementation blobs verified unchanged from reviewed head. Final diff contains only sshDeviceScript.ts, its tests, and docs/user/devices.md.

## Result and coverage

PASS: 34 actual generated probes over isolated localhost SSH, plus two independent later SSH commands for C. Both revisions use identical fixture state for each case. Actual committed modules imported from git archive staging trees; remoteDeviceScript, remoteDeviceEnvironment, and quoteRemoteArg exports used for bootstrap. Generated full probe sources, source inputs, environment strings and SHA-256 digests retained.

A: PATH-only adb accepted before, SDK-not-found after.
B: adb-only SDK accepted before, missing Emulator with selected SDK path after.
C: custom ANDROID_SDK_ROOT plus two empty defaults accepted both times, but before later SSH selects empty mac default, fallback adb works, emulator exits 127. After later SSH selects custom root and both adb/emulator resolve and execute selected-root markers.
D: failed selected adb rejected before and after; selected adb markers present, no fallback marker; final reason names selected SDK and failed execution.
E: emulator-directory and independently avdmanager-directory cases rejected after, accepted before.
F: independently missing and chmod 0644 adb/emulator/avdmanager (six cases) rejected after with component/root diagnostics. Remote uid is non-root, so execute-access checks are meaningful.
G: explicit ANDROID_HOME beats complete ANDROID_SDK_ROOT, both when HOME is complete (accept) and incomplete (reject after).
H: complete mac default and complete Linux default separately accepted; both defaults with incomplete mac default reject after, preserving directory precedence.
I: every Linux probe reports iOS false. Source inspection confirms iOS expression, Node minimum and npm gate unchanged. No macOS runtime claim.
J: existing focused tests pass Java discovery and shell metacharacter/newline quoting; no removed lifecycle code restored.
K: docs inspected; ANDROID_SDK_ROOT and adb-insufficient guidance match implementation. No capture needed.

Focused test command: `vp test run apps/server/src/device/sshDeviceScript.test.ts apps/server/src/device/SshDeviceHost.test.ts apps/server/src/device/DeviceToolchain.test.ts` at full final SHA above. Exit 0; 3 files, 10 tests passed. Final log includes command and SHA. An earlier identical suite run also passed, but final log is authoritative.

## Environment and limits

Linux 6.1.102 x86_64 GNU/Linux; remote user ubuntu (uid 1000). Exporter Node v26.12.1; actual remote probe Node /usr/local/nvm/versions/node/v24.21.0/bin/node. Generated environment prepends /usr/local/bin, which selects that installed Node instead of fixture node symlink; recorded rather than hidden. npm --version is deterministic 10.0.0 stub. adb, emulator, avdmanager are executable marker stubs. This proves capability gating, diagnostics, executable regular-file checks, SDK selection and later command consistency; it does not prove real SDK functionality, emulator boot, real avdmanager invocation, npm installation or macOS/iOS operation.

No web/desktop/mobile render path changed; no browser or screenshots used. SSH server behavior is shared by client connection modes; no real remote environment, relay or tunnel exercised.

No source edits, commits, push, PR writes, watch, rebase or force push. No access to ~/.t3/userdata. No app server started. Owned sshd stopped using its captured startup PID; temporary private keys, known_hosts and SDK/HOME fixtures deleted. No other processes stopped; global SSH files unchanged. Full source staging trees remain outside repo for audit, alongside sanitized artifacts.

## Reproduce

Download bundle, extract to a new absolute directory, then run `python3 driver.py /home/ubuntu/wt/pr-17239 /absolute/extracted/directory`. Driver re-extracts the exact committed source and resolves dependencies through worktree apps/server/node_modules; exporter must remain alongside driver. Requires installed dependencies, git, tar, Node >=22, local ssh/sshd and sudo -n. New temporary keys generated each run; no uploaded keys required. Run `python3 validate.py` afterwards to verify diagnostic messages. Driver cleans owned transport and fixture state in finally. Do not interrupt with SIGKILL.

Local root: /tmp/pr-17239-evidence. Public bundle contains sanitized driver/seed construction, exporter, manifest, transcript, final test log, validator, initial transport failure record, generated probe sources and hashes. It excludes keys and full source staging trees. All uploaded files manually reviewed for secret material; no ambient environment dump.

FRICTION: transport | isolated sshd with UsePAM no rejected public-key authentication before probe execution; UsePAM yes succeeded | use temporary sshd with host-compatible PAM policy and password/keyboard-interactive authentication disabled.

## Artifacts

[runtime-transcript.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/ac1fb7fed025d4a2/runtime-transcript.txt)
[focused-tests-final.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5b77b128f1b5ba15/focused-tests-final.txt)
[pr-17239-reproducible-proof.tar.gz](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0031fede997585d5/pr-17239-reproducible-proof.tar.gz)
[driver.py](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/cd5b3b4e6a31535a/driver.py)
[export.mjs](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0eff0f3b546d695a/export.mjs)
[SHA256SUMS](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/cb40b98095f0a5ce/SHA256SUMS)
