Skip to content

Hooks on with an unverified map; the installer checks it and leaves a Car Report - #464

Open
VysseCodes wants to merge 5 commits into
release/2.0from
fix/install-map-check
Open

VysseCodes wants to merge 5 commits into
release/2.0from
fix/install-map-check

Conversation

@VysseCodes

@VysseCodes VysseCodes commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Owners who install without NEMESIS or adb can't turn HMG-API on. A Discord report: 2024 Ioniq 5, US 260903, USB stick install, "installed" in the log, no tile after restarts, including a hard reset.

The chain:

  • That car's map (hyundai/neev23/usa/260903) is mapped, not verified.
  • An unverified map only ran its hooks after engine verify-map passed on the car.
  • Only the HMG-API app runs verify-map, and the app's tile needs the hooks.
  • NEMESIS owners got in through NEMESIS Manager → Launch, so nobody hit this before.

35 of the 38 maps are unverified.

Change

  • Gate (CarMap): a mapped or probed map whose stock files match the car runs without a check. Only a failed verify-map for that map on that car turns it off, with no override: a failed check is evidence the map is wrong for that car. "Try unchecked maps" now only lets every hook use the points mapped on the car itself (the app's description says so).
    • Unchanged: the installer's stock app_process gate, the zygote's boot guard, and hooks off when the framework doesn't match the map.
  • engine install-check [--usb]: install.sh runs it before the restart (the zygote decides at start).
    • It checks a map that isn't checked yet (read-only).
    • When the map isn't verified, or there's none, it writes a Car Report. A stick install also puts the report on the stick (HMG-API reports/).
    • It always exits 0, so it never fails the install.
  • troubleShooter passes HMGAPI_FROM_USB=1.
  • The app opens once after an install or update, so owners see the status (hooks on or off and why, the map, the Car Report) with no tile, NEMESIS or adb. install.sh leaves state/open-once; boot.sh runs open.sh once Android is up, the app's own install is done and the car is explicitly in P: gear.park 1 from HMG-API's vehicle service or, with no reading there, from the car's own system service (The gear reading on every car: straight from the car's system service when the map has none #489, no map needed). No reading is never taken for P. Then it waits 20 s for the launcher and projection apps. Given up after an hour, tried again at the next start.

Now targets release/2.0 (decided 2026-12-01: part of 2.0, not a 1.1.x release), rebased onto it.

Tested

Off-car only:

  • tools/test-all.sh --fast (33 ok, after the rebase onto release/2.0)
  • install/common/test.sh: 8 new checks for the app opening once (opens once and not again, waits while not in P, while Android is down, and while the app's own install is pending)
  • core/runtime/map-test.sh (37), core/runtime/local-map-test.sh (54), install/common/install-test.sh (259), install/usb/test.sh (63)

Not yet on a car. Still to check on one:

  • how long install-check takes during a stick install;
  • the tile appearing after one install and restart on an unverified-map car;
  • the app opening once after that restart, and not again after the next one.

test-install-map-check-1 was built before the last two commits; a new test build follows.

@VysseCodes
VysseCodes requested a review from a team as a code owner December 1, 2026 00:58
@VysseCodes
VysseCodes force-pushed the fix/install-map-check branch from da1a82d to 4e32aa9 Compare December 1, 2026 01:00
DY-Jeong added a commit to DY-Jeong/HMG-API that referenced this pull request Dec 1, 2026
…installer checks it and leaves a Car Report

From VysseCodes/fix/install-map-check (Open-HMG#464).
@VysseCodes
VysseCodes requested a review from a team as a code owner December 1, 2026 21:14
… Car Report

Owners without NEMESIS or adb couldn't turn HMG-API on: an unverified
(mapped or probed) map ran only after engine verify-map passed on the car,
and only the HMG-API app ran it, whose tile needs the hooks. NEMESIS owners
got in through NEMESIS Manager's Launch. Seen on a 2024 Ioniq 5 (US 260903)
installed from a USB stick.

A map whose stock files match the car now runs unchecked; only a failed
verify-map on that car turns it off ("Try unchecked maps" overrides). The
installer runs engine install-check before the restart: checks the map and,
when it isn't verified or there's none, writes a Car Report (also to the
stick for a stick install).

Tested off-car only (test-all.sh --fast, map, local-map, install, usb tests).
… no longer overrides that

A failed verify-map on the car is evidence the map is wrong there, and a wrong
hook in system_server crash-loops Android until the boot guard turns hooks off.
Maps nobody has checked still run when their stock files match. The app's
description of the switch now says what it still does: every hook may use the
points mapped on this car.

Tested off-car only (map-test.sh, local-map-test.sh).
…ts status

Owners without NEMESIS or adb had no way into the app on a car whose hooks
are off (its tile needs the hooks). install.sh leaves state/open-once; boot.sh
runs open.sh once Android is up, the app's own install is done and, when the
car gives a gear reading, it's in P, then 20 s for the launcher and projection
apps. Given up after an hour, tried again at the next start.

Tested off-car only (install/common/test.sh).
@VysseCodes
VysseCodes force-pushed the fix/install-map-check branch from 7211c75 to ae4d35b Compare December 1, 2026 21:44
@VysseCodes
VysseCodes requested a review from a team as a code owner December 1, 2026 21:44
@VysseCodes
VysseCodes changed the base branch from main to release/2.0 December 1, 2026 21:44

@zpoon zpoon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change before merge: boot.sh opens the app whenever the gear reading isn't an explicit "not in P" (*) break ;; # no reading: open). With no reading, an error, or hmgapid not answering, the app can open mid-drive. Please open only on gear.park 1, and otherwise try at the next start. Also worth a clear line in the 2.0 notes that unverified maps now run by default (35 of 38), protected by the boot guard. Nit: @SuppressWarnings("unchecked") moved from checkedHere to the new checkFailedHere. Tested together with #478/#479/#480/#483/#485 on release/2.0: install-test 269, test.sh 61, orders 8.

@GeofG-2

GeofG-2 commented Dec 2, 2026 •

Copy link
Copy Markdown

v1.1.0 Test Build Car Report and install.log for US EV6 MY2022 (First Edition) 20260903. HMG-API app reported installed but did not show up in the HU app menu.
car-report-cvev-usa-260903-20261201-2122.json
car-report-cvev-usa-260903-20261201-2122.md
install.log

With no gear reading, an error or hmgapid not answering, the app could open
mid-drive. It now opens only on gear.park 1 from HMG-API's vehicle service or,
when that gives no reading, a 1 from the car's own system service (lib.sh
stock_gear_park, #489: no map needed, so cars without a map get it too, used
once the installed lib.sh has it). "Not in P" from the vehicle service wins
over the other. Otherwise it waits, and tries again at the next start.

Tested off-car: install/common/test.sh in sh and bash (no reading at all: not
opened; the car's service P / not P; the vehicle service's "not in P" wins).
@VysseCodes

Copy link
Copy Markdown
Collaborator Author

Thanks. All three are in:

@GeofG-2: thanks for the report. Your car had no hook map for 260903, so hooks stayed off and the tile couldn't appear. #488 adds one, made from the stock 260903 files: your car's files match them, and the map your car made of itself is identical to it in all 393 points. This PR also opens the HMG-API app once after an install, so the status shows even without the tile.

This branch has not been deployed

No deployments
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.

3 participants