Wallezy/mgu-setup-skills / skills/mgu-setup
mgu-setup
VerifiedSet up and maintain an owner-authorized BMW MGU over ENET using SSH and Store tools. Use for environment checks, backup preparation, initial root, Store setup, supported distribution migration, map/HUD setup, live read-only log collection and diagnostic bundles, updates, and supported rollback or removal. Supports Chinese and English.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 34.3 KB |
| NOTICE.md | markdown | 958 B |
| SKILL.md | skill md | 7.7 KB |
| agents/openai.yaml | config | 358 B |
| assets/wechat-code.png | binary | 613.2 KB |
| references/contact.md | markdown | 437 B |
| references/diagnostics.md | markdown | 15.3 KB |
| references/evidence.md | markdown | 14.3 KB |
| references/maintenance-update.md | markdown | 7.9 KB |
| references/network-mirrors.md | markdown | 16.1 KB |
| references/network-sources.json | config | 976 B |
| references/recovery.md | markdown | 23.4 KB |
| references/release-channels.md | markdown | 11.0 KB |
| references/root-tool.json | config | 568 B |
| references/root-tool.md | markdown | 9.8 KB |
| references/session-record.md | markdown | 7.3 KB |
| references/store-distributions.md | markdown | 11.7 KB |
| references/workflow.en.md | markdown | 13.6 KB |
| references/workflow.zh-CN.md | markdown | 12.2 KB |
| scripts/check_environment.py | script | 6.5 KB |
| scripts/collect_diagnostics.py | script | 21.7 KB |
| scripts/diagnose.py | script | 18.8 KB |
| scripts/mirror_resources.py | script | 18.8 KB |
references/workflow.en.md
View on GitHub# Setup and maintenance workflow
## 1. Scope and local readiness
Identify the requested endpoint: preparation, first root, Store repair/install, map/HUD setup, update, rollback or removal. Read instructions in every checkout used. Preserve owner choices and unrelated changes.
For a first installation, apply [edition selection](store-distributions.md#choose-edition):
recommend CN in mainland China and official elsewhere; honor the user's choice.
The commands in sections 4–5 describe the official edition. CN uses its own
[installer and readiness checks](store-distributions.md); do not execute those
official examples for CN.
An existing installation moving to another fork or back to official uses
[full-distribution switching](store-distributions.md#switch-distribution),
including the computer's installer and vehicle components, without repeating root.
Run `scripts/check_environment.py` with the Python intended for the SSH source tool. It checks Python, cryptography, Node and OpenSSH locally; it does not certify vehicle readiness.
For Root work, follow [Root tool preparation](root-tool.md) to select a stable
release and separate local folder, then use `--profile root --root-repo <prepared-root-source>`
to check its runtime and revision. The reviewed baseline is v1.4.0; that reference
covers source fallback, offline reuse and newer releases. Do not keep using an
unverified old path or download the same release again.
| Platform | Check |
|---|---|
| macOS | Dock Ethernet interface, link-local address and routes alongside hotspot/VPN; interface names vary |
| Windows | OpenSSH availability, selected Python dependencies, upstream administrator requirements for ENET; PowerShell syntax |
| Linux | Link, permissions, OpenSSH and routing; do not copy macOS interface-binding options |
Source SSH setup needs Python 3.9+ and upstream `requirements.txt`; a Windows executable is an alternative. Direct `mgu-install.js` needs Node 18+. Current shell/PowerShell wrappers provide another runtime setup route. Verify current minimums and prefer a maintained compatible runtime.
Review current README, releases and relevant known failures. Pin downloaded installer source to an inspected revision when practical. Case-study versions are not permanent recommendations. Do not disable TLS verification to work around computer certificate errors.
Before planned vehicle writes, prepare missing dependencies in the selected environment and rerun the appropriate check profile. Download the selected upstream tools and scoped artifacts/dependencies locally using section 5. Record source, version, size, supplied checksum and local hash; inspect the archive. Do not begin first flash or installation with required downloads still pending.
Root assets must match the selected architecture and remain private. Read-only vehicle identification may precede downloads to select them. Once the vehicle and resources match, record a readiness result in the session template. Re-evaluate if the target or release selection changes.
## 2. Vehicle identity and backup preparation
Discover the gateway/HU through upstream status/discovery verified to be read-only. Observe architecture, firmware, interface, IP and vehicle identity. Do not reuse another session's VIN or gateway. Do not change coding or arm debug merely to discover an already accessible unit. A name is insufficient: deploy 0.8.8 `status` can repair directories or restart the manager; apply [read-only versus repair](recovery.md#read-only-status-versus-repair--只读检查与修复).
Before first flash, establish that the car is parked, awake and on power appropriate for programming. Confirm the pre-flash HU/MGU coding backup, selected module, tool and location. Keep these categories outside the public repository:
| Backup | Coverage and verification |
|---|---|
| Coding | A compatible coding tool's HU/MGU backup; owner completes unavailable tool steps. Does not restore executables. |
| Access | Matching root key, enrollment metadata and connection information; a key is not necessarily unique per vehicle. |
| Deployment | Before-state, versions, registry/tile state and deploy snapshots. Check archive contents, exit status and retention. |
| Patch originals | Verified originals, patch records, modes and owners for changed files. Not a firmware image. |
A capture's `verified=true` or matching hashes do not establish complete coverage
or restoration capability. Supplemental DID records alone do not satisfy recovery
readiness or allow first flash. Confirm the matching HU/MGU backup and supported
restore tool/format; see [coding capture limits](root-tool.md#coding-capture-limits).
The current root README documents loss of coding/CAFD and Digital Key pairings on flashing. Coding backups do not cover Digital Keys. Do not promise a recovery time or guaranteed rescue.
## 3. Root SSH: branch before writing
Try existing authorized credentials against the discovered HU first. If root login works, skip bootstrap.
For an unprovisioned unit, inspect the verified checkout's CLI help and architecture handling. At v1.4.0:
```text
python <verified-root-folder>/ssh_enable.py status
python <verified-root-folder>/ssh_enable.py flash --arch <verified-variant> --vin <verified-vehicle-vin> --persist
```
These are workflow examples, not commands for every connection. Select `id7`,
`id8-bdc3` or `id8-bcp` from verified HU evidence. v1.4.0 GUI requires a selection,
but CLI still defaults to ID7: always supply `--arch`, never infer it from a
model/VIN alone. Execute flash only for authorized first setup with prerequisites
satisfied. GUI “Flash + Enable” and CLI `--persist` already request persistence;
verify its result rather than automatically appending enable/persist.
For provisioned SSH that fails, distinguish timeout, changed host key and public-key rejection. Check routing, wake state and credentials first. `enable` repairs existing setup; it is not routine connection setup. `fix-key` reflashes and requires a separate repair decision plus flash prerequisites. Do not enable optional key replacement by default.
After bootstrap, verify fresh root login and intended persistence/debug state. Restore pre-flash coding with the appropriate tool when required by the procedure or actual state, then verify normal startup/access. Do not repeatedly flash to repair missing coding.
## 4. Official Store installation or repair
For the selected official edition, use its reviewed published installer from
`robertnisipeanu/mgu-store`. CN installation follows its matching distribution
procedure; Chinese UI support alone does not determine the update source.
For the inspected standalone installer:
```text
node mgu-install.js first-install --from <prepared-folder>/mgu-repo/mgu-store --identity <private-key-path>
```
Use the locally prepared, verified catalog from section 5. If choosing an online updater path for later apps, retain the verified local artifacts and confirm the HU can access the same intended release; do not silently change versions between preparation and install.
The inspected installer supports rerunning and keeps newer installed components. `first-install --from` can also refresh a compatible Store bundle over ENET from local packages, without physical USB or HU internet. Check current health and release scope first; it does not update arbitrary third-party apps.
Use observed host/port options if discovery chooses the wrong path. Reuse a working interface-bound relay if needed, without hard-coding a case-study port. Inspect SSH argument ordering and effective host-key behavior in the selected installer.
The installer uses published artifacts, catalog size/hash checks and their deploy tool. Capture exit status/logs; reconcile partial success and actual versions.
For a missing Store tile, compare actual app registration, manager state and tile visibility with deployment history. A retained package or stale record is not proof of installation. Restore through official setup/repair; do not manually rewrite registries or flash SSH again.
## 5. Offline resources and network diagnosis
Reuse the chosen edition and source. For official-package downloads, use
[network sources](network-mirrors.md) and [configuration](network-sources.json)
only when needed; backup resources include Gitee source and official-package OSS.
The examples below are official GitHub, not CN catalogs. There is no `gitee:`
updater source type. Fallback preserves the same edition, versions and SHA-256.
Test computer access and HU updater access separately. GitHub API access does not prove release-asset access; test the required artifact and hash. A connected hotspot does not imply GitHub reachability.
Prefer official offline preparation. Create the destination folder first:
```text
node mgu-install.js usb-repo <existing-folder> github:robertnisipeanu/mgu-store github:robertnisipeanu/idrive-apps
node mgu-install.js first-install --from <existing-folder>/mgu-repo/mgu-store --identity <private-key-path>
```
The second command installs the Store over computer-to-HU transport. Later apps can be installed from prepared physical USB media through the Store's USB page. A computer folder alone does not become a USB source on the car.
Alternatively use the Store's supported HTTP/SOCKS proxy setting with a reachable owner-controlled proxy. Computer loopback does not address the computer from the HU unless a real forwarding path exists. Scope any ENET tunnel to the task, record previous settings and restore them before disconnecting. Do not disable HTTPS checks or disclose proxy credentials in shared logs.
## 6. Maps and HUD
Reuse the edition choice: CN uses its managed domestic map catalog; official
uses direct GitHub or its verified backup according to network availability,
preserving explicit source choices. Do not ask another source question.
An official backup-source workaround uses [source switching](network-mirrors.md);
that map backup does not change
the built-in Store/core source. Retain one matching catalog and unrelated
authors' sources. Install `robertn_waze_cluster` through Store/updater and let
declared requirements choose `waze-on-cluster` and `cluster-render`.
Inspect patch state: installation may preserve a previously disabled CarPlay patch. Use the app's Patch control within the requested scope and supported compatibility. Android Auto patching is separate and coding/architecture dependent.
Choose Cluster, HUD or both in the app, checking that Show on is not Off. HUD is experimental upstream. For cluster output, select the vehicle's central Map view as documented. Reconnect CarPlay if necessary, start navigation, inspect stream/renderer state and obtain actual display evidence. App 0.6.6's Off toggle needs no reconnect/reboot; preserve the owner's 0.6.7 "Keep HUD map over BMW pop-ups" preference. See [map diagnostics](recovery.md).
App 0.6.4 with map service 0.9.3 provides "Own settings for this driver". Settings are shared by default; opting in keeps the display target, HUD size and position per driver, not every map setting. Enable it only when requested and verify settings after switching drivers. An unknown driver or unavailable service can disable the control; this is not a reason to reflash. See [recovery.md](recovery.md) for configuration backup and downgrade considerations.
Use the offered normal restart and respect its cooldown. Afterwards inspect boot ID/uptime, core services, mode/owner, boot verification, registered apps and pending restarts. The recorded build expected 0755 for carplay/aapd; derive expectations from verified originals/current upstream on other builds.
No video can mean patch disabled, restart pending, no phone secondary stream, HUD off, renderer failure or navigation-app incompatibility. Do not promise Amap/Baidu quality or a fixed frame rate without observing that combination.
For latency, map service 0.9.2 onward adds frame assembly, decoder buffering and H.264 diagnostics. Additional logging is not a frame-rate improvement; cluster-render 0.4.2 raises layer capacity without raising video bandwidth.
## 7. Update, downgrade and remove
For a working Store, follow [maintenance updates](maintenance-update.md): reuse local resources/private records, inventory installed versions, then choose missing downloads and the actual transfer path. A computer-side offline folder, an HU USB source and an OSS network source are distinct; do not silently choose network installation after preparing local packages.
Record current versions and known-good resources, refresh published catalogs, check dependencies and request only chosen updates. Let the updater resolve requirements, perform necessary restart and verify versions afterwards. Do not falsify version fields to bypass checks.
For a backup source, verify the required live catalogs and artifacts, not just
the Skill/Gitee revision. Resolve the selected release's actual dependencies.
After a vehicle firmware update, handle "Needs setup / Set up" through the current
Store's setup flow and verify its requested restart/result; do not restore
system-file snapshots from old firmware.
For downgrade/rollback read [recovery.md](recovery.md); for patch removal, complete
Store uninstall or SSH close/disable, use [removal scope and order](recovery.md#removal).
These do not restore factory firmware.
## 8. Validation and handoff
Use [session-record.md](session-record.md). Allow the installed release's deferred startup checks to run and inspect their result; elapsed time alone proves nothing. Distinguish background tools with no launcher from user-facing apps with missing tiles.
Restore temporary settings and close task-only tunnels. Preserve permanent SSH if requested; turning it off is another endpoint. Report observed results and any necessary physical-screen or coding-tool action still outstanding.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |