Replace `adolin.lan`, device serial `84TY004PW`, and LAN IPs
`192.168.68.*` scattered across e2e tests, device-tests, and docs
with placeholder syntax (`<your-dev-host>`, `<your-device-serial>`,
`<your-lan-ip>`). These values were defaults for local development
and had no reason to live in a public repo.
- `e2e/build.gradle.kts` no longer defaults `adb.host`; the `e2eTest`
task now fails fast via `doFirst` if it's unset.
- e2e test classes read `adb.host` and throw a helpful error when
missing instead of silently falling back to a host that only exists
on the author's LAN.
- `device-tests/DeviceIntegrationTest` reads `lan.ip` from a system
property (or env var) and skips via JUnit `assumeTrue` when unset.
- README grows a short "End-to-end tests" section documenting the
required properties.
Git history still contains the leaked values — per the issue,
rewriting history is disruptive and unlikely to undo exposure on an
already-public repo.
Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
Three root causes prevented the wake flow test from passing:
1. TunnelForegroundService and FcmReceiver were not declared in the work
module's AndroidManifest.xml, so Android couldn't find or start them.
2. ADB broadcasts to FirebaseInstanceIdReceiver require the C2DM sender
permission, which the ADB shell (uid 2000) lacks. Added a debug-only
TestWakeReceiver that starts TunnelForegroundService without requiring
any sender permission.
3. The relay URL was hardcoded to wss:// but the test relay runs without
TLS. Added configurable relay.scheme build property (defaults to wss,
tests pass ws). The relay now injects a test DeviceIdentity when running
without TLS so /ws accepts connections. Added cleartext network security
config for debug builds.
Also fixed: TunnelForegroundService now catches connection errors instead
of crashing, and installApk() auto-uninstalls on signature mismatch.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The relay rejected plain HTTP connections when TLS was disabled because
SNI routing requires a TLS ClientHello. Non-TLS traffic now routes to the
relay API when tls_config is None.
Test harness fixes:
- Set ANDROID_HOME in ApkBuilder subprocess environment
- Use correct debug package name (com.rousecontext.debug) in DeviceController
and FakeFcmServer
- Use fully qualified activity class name for ADB launch command
The third test (full wake flow) remains blocked on incomplete app-level DI
wiring for TunnelForegroundService. See BLOCKERS.md for details.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New :device-tests Gradle module (pure JVM) that orchestrates full E2E flows:
- RelayProcess: starts Rust relay binary as subprocess on random port
- FakeFcmServer: Ktor HTTP server that translates FCM requests into ADB broadcasts
- DeviceController: ADB wrapper for install, launch, logcat, screenshots, wake broadcast
- ApkBuilder: builds debug APK with custom relay host/port via Gradle properties
Three test scenarios: full wake flow, relay status check, and APK build/install.
Tests skip cleanly via Assume when no device or relay binary is available.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>