Skip to content

waze-on-cluster: Android Auto changes wait for the next head-unit start - #284

Merged
robertnisipeanu merged 10 commits into
mainfrom
waze-on-cluster-aa-no-lone-restart
Nov 24, 2026
Merged

robertnisipeanu merged 10 commits into
mainfrom
waze-on-cluster-aa-no-lone-restart

Conversation

@robertnisipeanu

@robertnisipeanu robertnisipeanu commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

patchd never restarts aapd. Android Auto's Patch, Remove patch, Zoom and Hide phone's turn card are armed or disarmed at once and take effect at the next head-unit start: the app shows Patched after restart / Removed after restart and Restart head unit. Every Android Auto setting can be changed again while a change waits, and that one restart applies the last choice. CarPlay is unchanged.

Why: on main, patchd applies an Android Auto change at once by SIGKILLing aapd and starting it again (where recmgr had loaded aapd's entry). An aapd started while the head unit runs gets no touch or iDrive controller input until the next head-unit start (reproduced on a car in #85). A user who pressed Patch after Android Auto's patch had been removed reported exactly that: the patch applied, then Android Auto's screen took no touch.

waze-on-cluster

  • patchd.js: aapd's target refuses a restart (restartRefused), so every Android Auto change takes the deferred path (the same one a boot without recmgr's aapd entry takes).
  • The turn card's crop override waits only while the running render read another one at its start (its WOC_SRC_CROP); with no render running, any change of the file waits. Changing a setting back to what already runs leaves nothing waiting.
  • woc-patch.sh aa-revert says the change takes effect at the next head-unit start and warns never to kill, stop or restart aapd on its own.
  • README, PATCH.md and CHANGELOG describe it. aapd_test.js checks that Patch, Zoom, the card and Remove patch leave aapd running and write the pending marker, and that several changes before one start end as the last asked: Patch then Remove patch (nothing waits), Remove patch then Patch (nothing waits), Zoom twice, Zoom and back, Remove patch and Patch over a waiting Zoom, the card hidden and shown again with a render running, a Zoom over a waiting card, each followed by the start.

Maps on cluster (app)

  • While an Android Auto change waits, the app still offers Zoom and the turn card (while the patch is planned), Patch over a waiting Remove patch, and Remove patch over a waiting change of the patch. The user sets what they want, then restarts once.
  • The cluster map row follows what the running aapd runs (runDpi in patchd's status): a Zoom or Remove patch waiting over the running patch keeps it on until the restart; a Patch waiting over a stock aapd shows Off.
  • The fake patchd used by the app's tests answers Android Auto changes with the waiting states patchd sends, and simulates the head-unit start.

Rollback: nothing new is stored. A downgrade runs this version's deactivate (record, plan and copy of aapd.conf removed) and then the earlier release's install.

AI: Claude Code, Claude Opus 5.5 (investigation, change, tests, PR).

Tested:

  • node patch/test/aapd_test.js with aapd 22.39.3 and its aapd.conf: all 252 checks pass, with the earlier Zoom-spacing check's 10 s window widened locally: on this loaded machine the 240 dpi plan takes over 10 s, and that check fails the same way on unchanged main.
  • node apps/robertn_waze_cluster/tools/test_control.js: 53/53; test_page.js: all passed.
  • make -k -j4 test on the first commit (stopped before it finished; the PR's CI runs the whole suite): every result it printed passed except recovery_test.js "the real boot step puts back … in about a second" (2.1 s against its 2 s bound on this busy machine; it fails the same way on unchanged main; recovery.js is not changed here).
  • On a test unit (iDrive 7, MGU P18_23w44.2-1-3, aapd 22.39.3), this branch packaged locally (tool numbered 0.14.13 before the release of that number, app 0.6.16): two Zoom steps taken while the first waited (rows still offered, "Zoom: 160 dpi (after restart)", the map row on); with the card hidden, Zoom back to the running value and Remove patch then Patch each left nothing waiting (the crop read from the running render); aapd kept its PID throughout. Earlier, with the first commit: the next head-unit start ran the patch with the changed copy of aapd.conf, and downgrading to 0.14.12 (with the patch on, and with Remove patch pending) ran this version's deactivate and a clean 0.14.12 install.
  • Not tested: a real car, and an Android Auto phone session (the test unit has no phone), so the restored touch input itself was not observed here.

Human review: none before opening.

Screenshots: the app on a test unit.

A change waiting for the restart:

Before (0.14.12): Zoom and the card greyed After: Zoom taken twice while waiting, Zoom and the card still offered
before after

The cluster map row while that change waits and the patched aapd still runs:

Before (0.14.12): Off After: on
before after

After, the Android Auto status with the Zoom waiting:

after: Patched after restart

Right after Remove patch:

Before (0.14.12): aapd restarted at once After: waits for the head-unit start
before after

After, further down the same page: Restart head unit offered.

after: Restart head unit

🤖 Generated with Claude Code

robertnisipeanu and others added 10 commits November 24, 2026 17:52
patchd never restarts aapd: an aapd started while the head unit runs gets
no touch or iDrive controller input until the next head-unit start (#85).
Patch, Remove patch, Zoom and the turn card are armed or disarmed at once
and shown as pending, with Restart head unit. woc-patch.sh aa-revert says
the same instead of suggesting a kill and start. CarPlay is unchanged.

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

The app offers Patch, Remove patch, Zoom and the turn card while an
Android Auto change waits for the head-unit start, as patchd takes them;
that start applies the last. The cluster map row follows what the running
aapd runs, so a waiting Zoom or Remove patch keeps it on. The fake patchd
answers Android Auto changes as patchd does. patchd's tests cover several
changes before one start; unused test helpers and an aapd mention in
restartUnit's comment go.

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

patchd compares the turn card's crop override with the one the running
render read at its start (its WOC_SRC_CROP), not with the file: hiding and
showing the card again, or Remove patch then Patch with the card hidden,
leaves nothing waiting when the render and aapd already run it. patchd's
tests cover the card with a render running and a card change over a
waiting Zoom.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robertnisipeanu
robertnisipeanu merged commit 8f121fd into main Nov 24, 2026
9 checks passed
@robertnisipeanu
robertnisipeanu deleted the waze-on-cluster-aa-no-lone-restart branch November 24, 2026 20:39
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