Skip to content

HMG-API 2.0 checklist: leaving NEMESIS, clean install, safety, catalogue #468

Backlog

Description

@AwsomeFox

2.0 is the release where HMG-API stops depending on NEMESIS (Discussion #444). It's a major version because owners on NEMESIS have to move to one tool or the other (docs/releasing.md in #449: "needs owners to reinstall" → MAJOR).

Work collects on release branches. Each PR merges after review by someone other than its author and green CI. A change to boot, app_process, the installers or /system also needs a test-* build and an on-car report first (#444). We release when every box below is ticked.

Branches

Repo Branch Made from Next version
HMG-API release/2.0 release/1.1 @ 1389eb7 (has all of main's code) 2.0.0
Wireless release/3.0 main @ 23c564f 3.0.0 (3.0.0-beta.1 in #124)
Phone Turn-by-Turn release/1.0 main @ ee4e734 1.0.0 (1.0.0-beta.1)
EV routing release/1.0 main @ ace94cc 1.0 (proposed; both halves combined)

1. Leaving NEMESIS (standalone)

These are the "separated install and cleanup" pieces.

  • What 2.0 does when NEMESIS is installed (decided Dec 1): HMG-API and NEMESIS are never installed together. An install on a unit with NEMESIS stops and offers the guided "keep HMG-API, remove NEMESIS" path first; the owner can stop there, and nothing is installed.
  • The install gate itself: #480. A new install on a unit with NEMESIS stops before anything changes, on every route; a unit with HMG-API already on it is still updated and repaired (or the NEMESIS 1.17: uninstalling HMG-API can stop Android from starting (fix in #396, recovery steps) #397 rescue couldn't run). It offers the guided path once that exists. Off-car only.
  • #479 "Wipe NEMESIS" keeps HMG-API and its mods (the hooks only drop the listing; hooks refreshed in every listed package), and the zygote wrapper runs hmgapid boot, so the boot steps run after a wipe deletes install-recovery.sh and put HMG-API's line back. The guided path is built on this wipe. Off-car only.
  • app_process under NEMESIS 1.17's LivePatch script and .real: install, update and uninstall handle it (CRITICAL: NEMESIS 1.17 LivePatch brick risk and mitigation  #396, Installer: never take NEMESIS's LivePatch script for the stock app_pr… #406).
  • Guided path: keep HMG-API, remove NEMESIS. Checks, confirmations, resume after a power cut, and cleanup of what NEMESIS leaves behind. Tested off-car in every order, then on cars. Also:
    • files a NEMESIS package changed under /system/app have no stock copy after the wipe: mods on those files get a warning, not a silent re-apply
    • a car where NEMESIS turned SELinux off boots Enforcing afterwards (SELinux: an owner's option to start Permissive (test build) #334)
    • mods installed only in NEMESIS: listed, and installed into HMG-API before the wipe where the package carries the mod's own zip
  • NEMESIS installed or updated after HMG-API: noticed at boot, and the owner is asked to pick one.
  • Guided path: keep NEMESIS, remove HMG-API. Built on uninstall.sh; safe with 1.17's LivePatch app_process (CRITICAL: NEMESIS 1.17 LivePatch brick risk and mitigation  #396 handles it today). Same testing.
  • A recovery path that doesn't need Android, tested on a car, before we tell anyone to remove NEMESIS.
  • No way to install or update HMG-API or any mod through NEMESIS in 2.0. Take NEMESIS out of core, keeping only what the "keep NEMESIS" path and the wipe handling (NEMESIS's wipe keeps HMG-API and its mods; boot steps run without install-recovery.sh #479) need:
    • NemesisSync (engine nemesis-sync) and boot.sh's two-minute sync
    • HMG-API's NEMESIS package and its update path (install/nemesis/), the release's NEMESIS downloads (tools/mkinstallers.sh, nemesis-meta.py), the wiki's NEMESIS install section
    • mods through NEMESIS: engine install --from-nemesis, tools/mknemesismod.sh and the SDK's NEMESIS packaging
    • the boot service HMG-API gets started from
    • NEMESIS package-version (nemesis-version.py). Without it, versions no longer have to be alpha/beta/rc only.
    • the nemesis-d fallback in install/adb/hmgapi-adb.sh, the nemesis remount fallbacks (hmgapid's own remount covers them), the engine's reads of /data/nemesis/backup (must work when it doesn't exist), and the app's NEMESIS menu entry
    • check that the app's self-update never calls nemesis install
  • Keep every NEMESIS attribution the licence requires (AGPL-3.0): NOTICE.md's NEMESIS section (only its "installs as a NEMESIS package" sentence changes) and core/hmgapid/hmgapid.c's header stay; removing the NEMESIS route mustn't take a notice with it. Release notes and README: notice that HMG-API is separating from NEMESIS #445 credit NEMESIS.
  • Docs for owners moving off NEMESIS. How to get to HMG-API only (jdhorner's question on HMG-API is separating from NEMESIS #444); what replaces NEMESIS-only features (hmgapi-adb, hmgapi-comfort); whether nemesis-shortcut stays in the catalogue.
  • Install without NEMESIS: USB route A (Engineering Mode → DSP → Update OTA) exists. Confirm it on each supported car family, and say which route the docs lead with.
  • Priority — NEMESIS 1.17.1 (released): mods' file changes as LivePatch outputs #405 (xwtk, mods' changes as NEMESIS LivePatch outputs): maintainers to decide and reply. It goes the other way from 2.0's split.
  • README: notice that HMG-API is separating from NEMESIS #445 README notice (approved, draft): update it for 2.0 when 2.0 ships.

2. Clean install and uninstall

3. Safety and reliability

Merge order (VysseCodes): #434 → #430 → #433, and #429 → #432.

4. Mod catalogue and updates over Wi-Fi

Stack, in order (VysseCodes): #419 → #420 → #422 → #423 → #457 → #458 → #424. Every requested fix was pushed on Nov 30; all are waiting on re-review.

4b. Mods keep working on 2.0, with no update from their authors

Every SDK-built mod is a signed HMG-API zip, and its NEMESIS package only wraps it. All catalogue mods declare "hmgapi": ">=…" with no cap, but the engine checks the range against the product version, so a ^1.0 or <2.0.0 cap would refuse 2.0 (EV routing had one).

  • The mod API stays 1.x while the product is 2.0 (mod.json, hook point ids, ModEntry/ModContext, the client jar): #483. A mod's "hmgapi" range made for 1.x (^1.0.0, <2.0.0) is met on 2.x as on 1.x's newest. Off-car only.
  • A mod that only ships as a NEMESIS package: the owner docs for moving off NEMESIS say how to take the mod out of it. The package holds the mod's own signed zip (mod/package.zip); copied into HMGAPI/updates/ on a USB stick, it installs from the app's Updates with the usual signature check. No engine change.
  • A compatibility check before every 2.0 release (CI): #485. Each catalogue mod's listed release through the engine (install, plan, remove, hook points), on PRs that touch the engine, hook points or catalogue, and weekly. All 7 pass on release/2.0 today.
  • Mods that use NEMESIS at runtime (nemesis root, nemesis-d, /data/nemesis): find them, and point their authors at HMG-API's root services and the hmgapid client.
  • A heads-up to mod authors before the first beta.

5. Projection mods

Wireless 3.0 (release/3.0)

Phone Turn-by-Turn 1.0 (release/1.0)

EV routing 1.0 (release/1.0)

  • #39 CarPlay and Android Auto in one repo (Isaac OK'd).
    • carplay/mod.json's "hmgapi" cap was <2.0.0, so it wouldn't have installed on 2.0. Now >=1.1.0-rc.3 <3.0.0-0.
    • Decide who releases carplay/: Isaac's key, or his key as a second secret.
  • #40 works with Wireless 3.0 and turn-by-turn. ✅ loads alongside turn-by-turn.
  • Core hook points it waits on: #212 → #214 → #221. Into 2.0, or keep EV on 1.x points for now?
  • Car Report: null KOR 260902 #41 (links, docs only) stays on main.

CarPlay: none of the CarPlay side has been tested (no iPhone). Find a tester before any beta.

Also headed for 2.0 (not the focus)

Mod SDK and tooling: #215, #216 → #220, #219, #230. Others' hook points: #392, #303, #293.

Release

  • Version PR on release/2.0: HMGAPI_VERSION and the app manifest. Start at 2.0.0-alpha.1 or -beta.1.
  • Beta from release/2.0 → off-car check of the draft → on-car check → published as a pre-release.
  • rc.1 = feature freeze, with a tracking issue that gives maintainers the cutoff date.
  • Final: release notes with the move-off-NEMESIS steps; release/2.0 merged into main; README: notice that HMG-API is separating from NEMESIS #445's notice updated.

Activity

  1. VysseCodes commented on Dec 1, 2026

    @VysseCodes
    Collaborator

    Thanks for putting this together. Decisions from today, and what I'd add.

    Decided

    To add to the list

    Section 1, leaving NEMESIS

    • The "keep HMG-API" path runs NEMESIS's own LivePatch safe mode and wipe, not a removal of our own, and needs these in HMG-API first:
      • handle every state of the app_process chain (app_process / .real / .hmgapi-stock) on install, update and uninstall, and repair it at boot
      • NEMESIS's wipe must only unlist HMG-API's packages, not run HMG-API's uninstall
      • conflicts for NEMESIS packages that change the same files as an HMG-API mod (LivePatch outputs included)
    • After the wipe, files a NEMESIS package changed under /system/app have no stock copy left to go back to. Mods on those files can't re-apply on stock: warn the owner rather than re-apply silently.
    • If NEMESIS was turning SELinux off at boot, the car boots Enforcing after removal (SELinux: an owner's option to start Permissive (test build) #334).
    • NEMESIS installed or updated after HMG-API: notice it at boot and ask the owner to pick one.
    • Remaining NEMESIS calls in core: the nemesis-d fallback in install/adb/hmgapi-adb.sh, the nemesis remount fallbacks in install.sh / uninstall.sh / hook-check.sh (hmgapid's own remount covers them), and the engine's reads of /data/nemesis/backup (it has to work when that folder doesn't exist). Also check that the app's self-update never calls nemesis install.

    Section 2, clean install and uninstall

    • Install lock. install.sh has none, and the USB stick carries both ota_package.tar and NEMESIS.data, so two installs can run at once on a NEMESIS unit. O_EXCL on tmpfs, as hmgapid boot does, and drop NEMESIS.data from the stick.
    • Install status as a screen, not only toasts: one state file written by every route (installer, uninstaller, engine, USB), shown full-screen by the HMG-API app with the step, "stay in P" and the result, and shown again after the rear camera or another screen takes over.
    • Close NEMESIS 1.17: uninstalling HMG-API can stop Android from starting (fix in #396, recovery steps) #397 once 2.0's install and uninstall have the chain handling above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions