Skip to content

Android 12 phones, the power watcher, the benchmark design and a window fix - #13

Merged
Axoineo merged 7 commits into
mainfrom
p1/android-12
Nov 17, 2026
Merged

Axoineo merged 7 commits into
mainfrom
p1/android-12

Conversation

@Axoineo

@Axoineo Axoineo commented Nov 17, 2026

Copy link
Copy Markdown
Owner

What this adds

Phone fidelity benchmark design (docs/benchmark.md, decision D-016, accepted)
A public, repeatable test that scores Verone, redroid, the Android Emulator, Cuttlefish and Waydroid against a real phone. Not built yet; this is the design plus the first prerequisite checks (BM-01):

  • A-17 pass: the Android Emulator runs Android 14 on the reference laptop (boot 37 s).
  • A-21 partial: the reference phone (vivo V2027) works over adb but runs Android 12, so the benchmark runs in two sets: Android 12 (main, like-for-like) and Android 14.
  • A-18 (Cuttlefish), A-19 (Waydroid) and A-20 (compatibility tests) are recorded as not done, with reasons.

Android 12 phones
verone create NAME --android 12 uses redroid/redroid:12.0.0-latest, pinned by digest. Android 14 stays the default. Tested on the reference laptop (A-22): boots in about 5 s.

Power watcher for Android 12 (docs/design/android-12-power.md, decision D-017, accepted; tasks P12-01 to P12-05)
Android 12 ignores "Restart" and "Power off" chosen inside it. While an Android 12 phone exists, Verone runs one small helper container per data folder, verone-power-<code>, that carries the request out with the real reboot system call, so the phone ends with exit code 129 or 130, just as Android 14 does by itself.

  • Restart from inside: back in 6.2 s, files kept.
  • verone stop: 1.2 s with exit code 130 (was 20 s, then a kill).
  • Cost: 1.7% of one core on average, at most 3 MB of memory.
  • Acts only on Verone's own Android 12 phones; Android 14 phones and other containers are never touched.
  • Limit, stated in the docs: not a clean Android shutdown (files are synced, then the phone ends at once).
  • SECURITY.md describes the helper (privileged, host process view, no network, read-only).

Fix: verone open showed no window
scrcpy asks for Opus audio, which the redroid images cannot encode, and then gave up. Verone now passes --audio-codec=raw unless the user gives their own audio option.

Tests

  • cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings: clean.
  • cargo test --workspace: 237 passed.
  • Real phones (VERONE_TEST_DOCKER=1): 5 of 6 passed, including the new Android 12 test. The adb port test failed for the known, unrelated reason: the xt_tcpudp firewall module was not loaded on the laptop.

Owner steps after merging

  • The installed verone (0.1.0) has none of this until the next release.
  • Disk: the system partition had 1.4 GB free after pulling the Android 12 image (2.8 GB).

🤖 Generated with Claude Code

Axoineo and others added 7 commits November 17, 2026 00:27
- docs/benchmark.md: the phone fidelity benchmark (D-016, accepted), with
  BM-01 results for A-17 (Android Emulator) and A-21 (reference phone,
  Android 12) and the two-set plan (Android 12 and 14).
- Android 12 phones: redroid 12.0.0-latest pinned by digest; Android 14
  stays the default. Tested on the reference laptop (A-22).
- docs/design/android-12-power.md: how restart and power-off inside
  Android 12 will work (D-017, accepted).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-02)

Each Verone data folder gets its own watcher, verone-power-<code>, so a
test run with a temporary folder never replaces the user's watcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the reference laptop the phone was back 6.2 s after a restart request
inside Android, and verone stop took 1.2 s with exit code 130.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
redroid images have no Opus encoder, scrcpy's default audio codec. The
audio stream failed, scrcpy's helper in the phone was killed and no
window appeared. verone open now passes --audio-codec=raw unless the
user gives their own audio option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading every process every second cost 21% of one core. Looking for
phones every 10 s, and at once when a watched phone ends, brings it to
1.7% on average with at most 3 MB of memory. Also stop a redirection
from printing 'can't open' for processes that end mid-read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
User guide, SECURITY.md, architecture, benchmark notes, changelog and
the design's results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Axoineo
Axoineo merged commit 9e777d6 into main Nov 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant