Iomatex_OS/android_console/README.md

13 KiB

EVAx10 Android Console — development 0.4.1

Separate APK (com.iomatex.console) for the rooted RK3566 Android 13 lab device. It preserves the EVAx10 client package and registration. The package identifier is retained from the prototype; product UI, launcher, icon and theme are EVAx10.

Access

  • Default username/password: iomatex / iomatex, as requested. Existing stored passwords survive upgrades. The original lab password was explicitly reset.
  • Local: ADB forward tcp:18080 tcp:18080, browser http://127.0.0.1:18080/ on the ADB workstation. The Android HTTP listener binds loopback only.
  • Remote: device-owned outbound SSH, using the existing platform enrollment and Web Gateway. Open Edge Console in the registered device's SSH/access tab. The platform authorizes the link; Console additionally requires its own login. ADB is not part of this remote transport.
  • Sessions expire after 15 minutes; HttpOnly/SameSite cookies, login throttling, bounded request bodies/worker queue, asset allowlist. Unsupported actions fail.

Shared owners

stage_ui/console_core/frontend owns rendering, authentication UI, themes, responsive layout and service cards. Build-time packaging reuses those exact assets and excludes unsupported tabs. The explicit evax10 brand modifier uses It-screenClient SettingsTheme colors and the canonical EVAx10 launcher PNG. Debian's existing branding remains the default. No duplicate frontend source.

RemoteAccess owns connection lifecycle. The root-only lab registration adapter reads the client's canonical no_backup/registration.ini (RegistrationStore v1). It never uses cached configs.json credentials or obsolete Qt settings. A change of server/device/password closes the old connection before enrolling the new one. Cleared registration closes the tunnel. Read errors also disconnect fail-closed. Polling interval is 15 seconds; registration files are read-only.

Enrollment: HTTPS /v2/device/reverse-tunnel with the device's own credentials. The receiver assigns the SSH host/user/port and webui port. Ed25519 keys are created on-device, private to the agent. Only webui is forwarded to local 18080; Cockpit/Z2M remain unavailable. No ADB or arbitrary local-port exposure.

Host keys require an administrator-provisioned files/known_hosts, obtained through an already authenticated management channel. Strict verification is mandatory; there is no ssh-keyscan auto-trust or disabled host verification. A new environment without a trusted key reports host_key_required. On this bench the eva host key was read through the existing verified dev SSH session (the environments share the host), then installed into private agent storage.

Health separates SSH connectivity, receiver health, remote HTTP availability, and Web Gateway health through /v2/device/reverse-tunnel-status. It never marks browser access ready merely because the local service runs. Stale healthy snapshots expire, and a disconnected SSH session immediately degrades.

The foreground service uses START_STICKY, BOOT_COMPLETED and MY_PACKAGE_REPLACED. Stopping/force-stopping the package from Android settings suppresses normal background behavior until it is opened again. This is not a Device Owner agent.

Build / install

Read the client docs/client-local-development.md. Use the existing iomatex-android-dev toolchain and lab signing certificate:

bash android_console/build.sh

Output: ~/.local/share/iomatex-dev/android-console/console-dev.apk. Build verifies pinned dependencies, registration parser tests and APK signature. Use configured ADB install -r; never uninstall/clear EVAx10. For first install, open EVAx10 Console once. Updates restart the foreground service automatically. Provision trusted SSH public keys to files/known_hosts with mode 0600 through an authenticated local/admin channel. Private device keys stay on Android.

python3 android_console/test_bench.py checks the installed API through Windows SDK ADB forwarding. Override ADB and ANDROID_SERIAL for another development bench. Credentials read via run-as are never printed. The code remains debuggable and lab-signed: no production publication or updater manifests have been changed. Dependency provenance and licenses: THIRD_PARTY.md.

Verified 2026-10-29

RK3566 / Android13, 192.168.0.186:5555, client 5.1.42 unchanged. Registration: Android-bfa7e4de55c90543 on https://Rest.eva.iomatex.com. Native SSH: eva.iomatex.com:2200, allocated remote webui 41998.

  • Login/logout, unauthorized denial, status/health/services, rejected unsupported mutation and asset allowlist passed on the device.
  • Authenticated server -> reverse tunnel -> Android Console request succeeded while ADB forward 18080 was removed; local forward was restored afterward.
  • Android automatically restarted a killed agent process and restored its tunnel.
  • APK replacement automatically restarted the agent and remote access.
  • Gateway/receiver/remote web endpoint confirmed healthy; unused services false.
  • Chromium login and service cards passed at 360/768/1024/1440 without horizontal overflow or JavaScript errors. Dark EVAx10 theme and original icon inspected.
  • Canonical registration/reset/legacy isolation/escaping tests pass. Shared Console stale-session response regression passes.

Full OS reboot and live re-registration onto a different environment have not been tested. Browser link issuance through a human platform account has not been exercised; the existing gateway diagnostic and actual remote HTTP path were. System terminal, live screen streaming/touch control, client start/stop and updates are outside this iteration. Display diagnostics and registration status/transfer reuse the g-box contracts as described below. Non-root Android needs a supported registration handoff from EVAx10; this lab implementation must not be described as working on ordinary phones.

Shared g-box contracts — 0.3.0-dev

AndroidPlatform adapts Android OS / DisplayManager into existing health and Display cards. AndroidClient adapts the existing DeviceSettingsMessenger MQTT contract, with background status snapshots and one serialized transfer action. The shared frontend owns tabs, display layout, registration form, server selector, confirmation, dirty/same-server disabling, error messages and responsive layout. Capability fields are additive and preserve the Debian default behavior. No Android frontend copy or independent registration endpoint exists.

Initial enrollment and reset remain local because that is the current Android client policy. Register can transfer an already confirmed Android registration; it calls the client's register action without first changing its settings. Console does not write RegistrationStore, Qt settings or cached configs. The reverse owner watches the resulting canonical registration and reconnects. Device credentials never appear in diagnostic responses or logs.

Run python3 android_console/tests/test_shared_contract.py and the existing test_bench.py / tests/browser_bench.cjs. The browser test checks both Health and registration at 360/768/1024/1440 and excludes Linux-only controls.

0.3.0 bench evidence — 2026-10-29

  • Android DisplayManager: built-in display 1280x800, approximately 56 Hz, rotation 0 degrees, power On. APK/client identity and registration preserved.
  • Existing MQTT settings channel confirmed registered/logged EVA identity and client 5.1.42. Broker control prefix is it-screen under contract v1.
  • Invalid registration target rejected before any command. Initial/reset actions remain blocked. Form same-server/changed-server/restored-server states passed without issuing a registration change.
  • Health and registration screens passed four responsive widths without JS errors; Linux display/audio/storage controls absent. Reverse Tunnels uses the shared g-box card and reports browser path readiness, not just SSH state.
  • Authenticated remote Console request passed with the ADB forward removed; forward restored. Gateway, receiver and Console endpoint reported available.
  • MQTT packaging regressions (resource bundles and ServiceLoader descriptor) now have an APK-level test invoked by build.sh.

Remote server transfer is implemented through the existing client action but has not been executed on this registered bench. Full reboot, live screen stream, remote touch and first-time remote enrollment are not claimed as validated.

0.4.0 settings bench — 2026-10-29

Shared tabs now expose Health, Security & Region, Network and Registration. Region reads Europe/Warsaw; network reports wlan0, addresses, routes and DNS. The bench was granted ACCESS_FINE_LOCATION for Wi-Fi diagnostics; Android may still throttle scans or require system Location to be enabled. No Wi-Fi switch, password replacement or different timezone was performed during validation. Browser tests cover four tabs at four widths, password validation/dirty state, and registration unchanged/changed/restored behavior. API tests reject incorrect current passwords, invalid zones and invalid Wi-Fi inputs.

Version checks use the same canonical Android feed as MaintainService and show installed/public 5.1.42 as latest. The shared version controls are visible again. APK installation through Console is not implemented: native EVAx10 owns its updater, and this separate Console development APK has no published update feed. Those limits are displayed on the cards, not hidden behind missing controls.

Local recovery instructions are Android-specific; the Console password is separate from the Android lock screen and EVAx10 registration. Password change revokes other web sessions while preserving the submitting session.

0.4.1 thermal adapter

Health now reads /sys/class/thermal/thermal_zone*/{type,temp} using the existing Console name, value_c, label contract. This is the same OS source as the client NativeSystemMetrics, with sensor names retained rather than relabeling SoC as CPU. No frontend copy or extra root permission is needed. Vendor test and battery zones are excluded. Read failures are unavailable, never a zero reading. JVM fixtures validate units, names, unavailable/invalid/range values and zero.

Bench validation: authenticated health API returned soc-thermal 64.4 C and GPU 60.6 C during the 0.4.1 check. Those are observations, not fixed values.

Deployment boundary

Verified client compatibility: EVAx10 Android client 5.1.42 on the rooted Android 13 RK3566 bench. A minimum compatible client release has not been established by testing older versions. Agent manifest minimum is Android 8.0 (API 26), which is not a claim of validation on every Android 8+ firmware. The separate com.iomatex.console APK is not bundled in the client update feed. Updating/re-registering only the client therefore does not provision Console or its SSH host trust on a fresh device. EVA's existing receiver/gateway can serve the device after the agent is installed, started and provisioned with trusted server host keys. Non-root registration handoff remains outside this prototype.

0.4.2-dev: CPU and reboot

The Android adapter now handles the shared /api/actions/reboot endpoint and projects CPU utilization plus 1/5/15-minute load averages into health summary. Both use the existing rooted-device command adapter. Samples refresh every five seconds; unavailable data remains unknown. Reboot returns request acceptance, not completion; the device and reverse tunnel must return after boot.

Verified on the Android 13 bench: full reboot through Console, changed kernel boot ID, automatic agent start, CPU/load readings and authenticated server-to- Console reverse access after reboot. DHCP assigned 192.168.0.100 after reboot. This supersedes the earlier full-reboot limitation above. The client-bundled agent installation remains separate unfinished work; 0.4.2 is a local agent build.

Embedded client library (0.5.0-dev)

export-client-library.sh builds the shared adapter/frontend and exports evax-console.aar plus evax-console.json to the development output directory. The client imports these together and verifies the SHA-256 during Gradle build. Source remains here; the AAR is the client's generated dependency, not a fork. ConsoleBootstrap starts by default on Android 8+, at boot and APK replacement. The embedded agent reads registration in its own UID without root; SSH host keys come from the authenticated HTTPS enrollment's ssh_host_keys field. The server receiver must support that additive field (or already have provisioned trust). Root remains required for privileged OS operations and standalone lab migration.

Verified on the Android 13 bench: embedded startup, password/key migration, full reboot, automatic reverse restoration, host trust recovery without a manual known_hosts, and automatic startup after APK replacement. The old separate lab package is disabled, with its data preserved. No public client release/feed was published; this supersedes the earlier note that integration is unfinished.