Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github: [VysseCodes, zpoon]
ko_fi: vyssecodes
custom: ["https://github.com/Open-HMG/HMG-API/wiki/Support"] # every maintainer's links
custom: ["https://open-hmg.github.io/HMG-API/guide/support"] # every maintainer's links
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
id: supported
attributes:
label: Is your car supported?
description: See [Supported cars](https://github.com/Open-HMG/HMG-API/wiki/Supported-cars). Only each region's newest head unit software is supported; on older software, updating often fixes it.
description: See [Supported cars](https://open-hmg.github.io/HMG-API/guide/supported-cars). Only each region's newest head unit software is supported; on older software, updating often fixes it.
options:
- Listed, with the software version shown there
- Listed, but my head unit has older software
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Install guide and help
url: https://github.com/Open-HMG/HMG-API/wiki
url: https://open-hmg.github.io/HMG-API/
about: Installing, removing, and fixing common problems.
- name: A bug in Wireless CarPlay + Android Auto
url: https://github.com/Open-HMG/hmgapi-wireless-cp-aa/issues/new/choose
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
- [ ] Anything written to `/system` keeps a stock check, a backup and an exact restore
- [ ] No manufacturer apps or libraries, no per-car data (VIN, serials, keys, `/data` contents)
- [ ] Vehicle commands go through the car's own services, no CAN frames of our own
- [ ] User-facing change: `CHANGELOG.md` and the wiki (`wiki/`) updated
- [ ] User-facing change: `CHANGELOG.md` and the website (`docs/`) updated
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Off-car tests for what a change touches (tools/test-select.py: a change to the app
# runs the app's tests, a mod its own, the build or an unknown path everything), several
# at once (tools/test-all.sh); a change to documentation only (docs/, wiki/, *.md, issue
# at once (tools/test-all.sh); a change to documentation only (docs/, *.md, issue
# forms) runs nothing. Every test, weekly and on demand (Actions > CI > Run workflow),
# with ImageMagick for tools/mkicon-test.sh and the downloads built. The fast tier
# (tools/test-all.sh --fast, what contributors run) on macOS too, so it keeps working there:
Expand All @@ -12,9 +12,9 @@ name: CI
on:
push:
branches: [main]
paths-ignore: ["docs/**", "wiki/**", "**.md", ".github/ISSUE_TEMPLATE/**", ".github/release-notes/**", "LICENSE"]
paths-ignore: ["docs/**", "**.md", "package.json", "package-lock.json", ".nvmrc", ".github/ISSUE_TEMPLATE/**", ".github/release-notes/**", "LICENSE"]
pull_request:
paths-ignore: ["docs/**", "wiki/**", "**.md", ".github/ISSUE_TEMPLATE/**", ".github/release-notes/**", "LICENSE"]
paths-ignore: ["docs/**", "**.md", "package.json", "package-lock.json", ".nvmrc", ".github/ISSUE_TEMPLATE/**", ".github/release-notes/**", "LICENSE"]
schedule:
- cron: "17 6 * * 1" # Mondays: every test
workflow_dispatch:
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# The website (docs/, VitePress) with the Community mods page made from the catalogue
# (tools/catalog.py site): built on every pull request that touches it, so dead links
# and pages Vue can't compile fail there, and published to GitHub Pages
# (https://open-hmg.github.io/HMG-API/) from main.
name: Website

on:
push:
branches: [main]
paths: ["docs/**", "catalog/**", "tools/catalog.py", "package.json", "package-lock.json", ".nvmrc", ".github/workflows/pages.yml"]
pull_request:
paths: ["docs/**", "catalog/**", "tools/catalog.py", "package.json", "package-lock.json", ".nvmrc", ".github/workflows/pages.yml"]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # "last updated" on each page comes from git
persist-credentials: false

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: npm

- run: npm ci

- run: npm run docs:build # makes the Community mods page first (docs:mods)

- if: github.event_name != 'pull_request'
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

- if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/.vitepress/dist

deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-24.04
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- id: deploy
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
18 changes: 10 additions & 8 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# The wiki's source is wiki/ in this repo: on each change to it on main, the GitHub
# wiki gets the same pages and images, plus the Community mods page made from the
# catalogue (catalog/, tools/catalog.py wiki).
# The GitHub wiki's pages moved to the website (docs/, .github/workflows/pages.yml).
# Head units, release notes and posts still link to /wiki/<Page>, so each old page
# stays as a one-line pointer to its new page (tools/wiki-stubs.py).
name: Wiki

on:
push:
branches: [main]
paths: ["wiki/**", "catalog/**", "tools/catalog.py"]
paths: ["tools/wiki-stubs.py", ".github/workflows/wiki.yml"]
workflow_dispatch:

permissions:
contents: write
Expand All @@ -17,16 +18,17 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Push wiki/ to the GitHub wiki
- name: Point the GitHub wiki at the website
env:
TOKEN: ${{ github.token }}
run: |
python3 tools/wiki-stubs.py check
git clone -q "https://x-access-token:$TOKEN@github.com/$GITHUB_REPOSITORY.wiki.git" "$RUNNER_TEMP/wiki"
rsync -a --delete --exclude .git wiki/ "$RUNNER_TEMP/wiki/"
python3 tools/catalog.py wiki "$RUNNER_TEMP/wiki/Community-mods.md"
find "$RUNNER_TEMP/wiki" -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} +
python3 tools/wiki-stubs.py stubs "$RUNNER_TEMP/wiki"
cd "$RUNNER_TEMP/wiki"
git add -A
if git diff --cached --quiet; then echo "wiki already up to date"; exit 0; fi
git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
commit -q -m "Wiki from $GITHUB_SHA"
commit -q -m "Wiki pages point to the website, from $GITHUB_SHA"
git push -q
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ tools/hook-trees.local
*.apk
*.img
car-report-*.json
# a local clone of the GitHub wiki (the wiki's source is wiki/, published by .github/workflows/wiki.yml)
# a local clone of the GitHub wiki (now only pointers to the website: tools/wiki-stubs.py)
HMG-API.wiki/

# the website (docs/, VitePress): dependencies, build output and the page made from catalog/
node_modules/
docs/.vitepress/cache/
docs/.vitepress/dist/
docs/mods/community.md
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

- **The guides moved to a website**, https://open-hmg.github.io/HMG-API/ (VitePress, from
`docs/`, published by `.github/workflows/pages.yml`), with search, and the developer
and maintainer pages next to the owners' guides. Each old GitHub wiki page now points
to its new page, so links from older releases and the app still lead somewhere. The
app's Settings → About names the website.
- **The Car Report no longer carries the unit's mobile-data address.** Its iptables dump only had
MAC addresses taken out, and Android's own chains (`st_mangle_EXEMPT`) hold the unit's
current mobile-data address and its carrier's servers. The rules are now scrubbed like the
Expand Down
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Owners get to decide for their own units. Follow these by default. If the user a
| `core/client` | `hmgapi-client.jar`: for mods' own apps and services (bundled in their APKs). |
| `install/` | `adb/`, `nemesis/` (`mod/`: the template for a mod as a NEMESIS package, `tools/mknemesismod.sh`), `usb/` (DSP OTA), `common/` (`install.sh`, `uninstall.sh`, `lib.sh`: where every route ends). |
| `mods/examples` | `hello` and the other API examples and test fixtures. No shipped mod is in this repo: `wireless-carplay-aa`, `adb`, `nemesis-shortcut` and `adbd` each have their own, `Open-HMG/hmgapi-<id>` (wireless: `hmgapi-wireless-cp-aa`, id unchanged) (`docs/mod-repos.md`). |
| `catalog/` | the mod catalogue (`tools/catalog.py`): per mod its download, SHA-256 and author key; the wiki's Community mods page. The release bundles `tools/release-mods.txt`'s ids from it. |
| `catalog/` | the mod catalogue (`tools/catalog.py`): per mod its download, SHA-256 and author key; the website's Community mods page (`docs/mods/community.md`, made at build time). The release bundles `tools/release-mods.txt`'s ids from it. |
| `docs/` | the website (VitePress, `npm run docs:dev`/`docs:build`; `.github/workflows/pages.yml` → https://open-hmg.github.io/HMG-API/): owners' guides in `guide/` (once the GitHub wiki; its old pages now point here, `tools/wiki-stubs.py`), developer and maintainer pages at the top. Bare `<word>` or `{{` outside code breaks the build (Vue). |
| `tools/sdk`, `./build.sh sdk` | the mod SDK (`hmgapi-mod-sdk-<version>.zip`, a release asset from 1.1.0-beta.1): what a mod repo builds, tests and packages with; `.github/workflows/mod.yml` is their reusable CI. |
| `tools/` | `lpatch`, `mkrecipe.py`, `mkdelta.py`, `mkicon.sh` (stock-style tile pictures; `mkicon-hmgapi.sh` makes HMG-API's own from the logo), `env.sh`, `test-all.sh`; `map-car.py` (partial maps), `maplib.py` (the repo keeps `maps/base/` + each build's differences in `car.json`; `build.sh` expands them into the per-app files the unit reads), `test-hooks.py` (points × cars, `maps/coverage.json`), `probe-test.py` (on-car mapper vs map-car.py); `cars.py` (stock trees in `$HMGAPI_CARS`, default `~/hmg-cars`: `list`, `test --report`; `docs/car-trees.md`). |

Expand Down
37 changes: 36 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,47 @@ Thanks for helping. Bug reports, Car Reports and ideas go in
to a mod go there. A new hook point a mod needs starts here ([docs/mod-repos.md](docs/mod-repos.md), section 4).
- Versions, release candidates and hotfixes (core and mods): [docs/releasing.md](docs/releasing.md).
Don't change `HMGAPI_VERSION` or a mod's `"version"` in a feature PR: the release PR sets it.
- The wiki lives in `wiki/`; changes there are published when merged.
- The website lives in `docs/`: see [Editing the website](#editing-the-website).
- Who reviews what (`.github/CODEOWNERS`): the core team (`@Open-HMG/core`) reviews root, signing, `/system`
writes and CI (`.github/`, `core/hmgapid/`, `core/zygote/`, `core/loader/`,
`install/`, `tools/lpatch/`, `SECURITY.md`, `CLAUDE.md`); everything else needs one
of the Open-HMG maintainers.

## Editing the website

The website, https://open-hmg.github.io/HMG-API/, is made from the Markdown in `docs/`
by [VitePress](https://vitepress.dev). A change to the website needs none of the
setup above: no JDK, no Android SDK, and the off-car tests don't run for it.

You need Node.js 20 or newer (CI uses the version in `.nvmrc`; with nvm, `nvm use`)
and Python 3. From the repository's root:

```bash
npm ci # once, and after package-lock.json changes
npm run docs:dev # live preview at http://localhost:5173/HMG-API/, reloads as you edit
npm run docs:build # what CI runs: fails on a broken link or a page that doesn't compile
```

- **Where things are.** Owners' guides are in `docs/guide/`; developer and maintainer
pages are directly in `docs/`. The sidebar and top menu are in
`docs/.vitepress/config.mts`: a new page shows in the sidebar only once it's listed there.
- **Links** between pages start at `docs/` and leave out `.md`:
`[Car Report](/guide/car-report)`, `[Troubleshooting](/guide/troubleshooting#an-anchor)`.
VitePress adds the site's `/HMG-API/` prefix itself. Link to code with a full GitHub
URL (`https://github.com/Open-HMG/HMG-API/blob/main/...`): a relative `../core/...`
link is a dead link on the website.
- **Images** go in `docs/img/` and are linked relatively from the page
(`![Mods](../img/screenshots/mods.png)`).
- **Placeholders in angle brackets go in backticks.** Each page is compiled as a Vue
template, so a bare `<version>` or `<you>` in the text is read as an HTML tag and fails
the build, and `{{ … }}` is run as code. Write `` `hmgapi-<version>-usb.zip` ``.
- **Generated pages: don't edit them by hand.** `docs/hook-points.md` comes from
`tools/mkhookdoc.py`; the Community mods page comes from `catalog/`
(`tools/catalog.py site`, run by `npm run docs:dev` and `docs:build`) and isn't in git.
- Changes go live when merged into main; a pull request that touches `docs/` builds the
site first. The old GitHub wiki pages only point to the website; edits made there are
overwritten.

## Rules

- Anything that writes to `/system` keeps a stock checksum check, a backup and an
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

[![Support HMG-API](https://img.shields.io/badge/Support_HMG--API-%E2%9D%A4-bf3989?style=for-the-badge&logo=githubsponsors&logoColor=white)](https://github.com/Open-HMG/HMG-API/wiki/Support)

> **HMG-API is free**, made by volunteers. If it saved you a dealer visit or made your drives nicer, please consider [supporting the people who build it](https://github.com/Open-HMG/HMG-API/wiki/Support): each maintainer has their own links there. It keeps the testing and new-car ports going.
> **HMG-API is free**, made by volunteers. If it saved you a dealer visit or made your drives nicer, please consider [supporting the people who build it](https://open-hmg.github.io/HMG-API/guide/support): each maintainer has their own links there. It keeps the testing and new-car ports going.

A mod manager for Hyundai, Kia and Genesis **Gen5W** navigation head units.

Expand All @@ -27,15 +27,15 @@ changed when it's removed.

Download the zip for your route from [Releases](https://github.com/Open-HMG/HMG-API/releases):
a **USB stick** (no computer), **NEMESIS**, or **adb**. Step by step:
[Installing HMG-API](https://github.com/Open-HMG/HMG-API/wiki/Installing-HMG-API).
[Installing HMG-API](https://open-hmg.github.io/HMG-API/guide/install).

HMG-API runs on any Gen5W navigation head unit. Cars with a hook map get everything;
on others, mods still install and run, and the app's **Car Report** sends what's
needed to add your car ([Supported cars](https://github.com/Open-HMG/HMG-API/wiki/Supported-cars)).
needed to add your car ([Supported cars](https://open-hmg.github.io/HMG-API/guide/supported-cars)).

After a firmware update, install HMG-API again: the update removes its system files,
and the install starts again from the new firmware's
([Troubleshooting](https://github.com/Open-HMG/HMG-API/wiki/Troubleshooting#after-a-firmware-update-hmg-apis-system-files-are-gone-or-uninstall-fails)).
([Troubleshooting](https://open-hmg.github.io/HMG-API/guide/troubleshooting#after-a-firmware-update-hmg-apis-system-files-are-gone-or-uninstall-fails)).

| Car | Region | Software | Hook map |
|---|---|---|---|
Expand Down Expand Up @@ -72,7 +72,7 @@ and the install starts again from the new firmware's

[Open an issue](https://github.com/Open-HMG/HMG-API/issues/new/choose): something
doesn't work, car or firmware support (the Car Report's QR code fills it in), a new
hook point, or an idea. Guides are in the [wiki](https://github.com/Open-HMG/HMG-API/wiki).
hook point, or an idea. Guides are on the [website](https://open-hmg.github.io/HMG-API/).

> **Status: 1.0.2; [1.1.0-rc.10](https://github.com/Open-HMG/HMG-API/releases/tag/v1.1.0-rc.10), the release candidate, is out for testing.** Tested on a US Kia EV6 (260507): the hook runtime,
> mods, the app, buttons, the side panel, Android Auto turn-by-turn and projection
Expand All @@ -96,8 +96,7 @@ hook point, or an idea. Guides are in the [wiki](https://github.com/Open-HMG/HMG
| `install/` | installers: `adb/`, `nemesis/`, `usb/` (DSP OTA), shared `common/` |
| `core/hookpoints`, `maps/` | the hook point catalogue (stable names; every point and the cars that have it: [docs/hook-points.md](docs/hook-points.md)) and each car's map (`maps/coverage.json`: which points every car has) |
| `mods/examples` | API examples and test fixtures: `hello`, `hello-service`, `side-panel`, `car-check` and more. The mods HMG-API ships live in their own repos: [Wireless CarPlay + Android Auto](https://github.com/Open-HMG/hmgapi-wireless-cp-aa), [ADB](https://github.com/Open-HMG/hmgapi-adb), [adbd](https://github.com/Open-HMG/hmgapi-adbd), [NEMESIS in the app menu](https://github.com/Open-HMG/hmgapi-nemesis-shortcut) ([docs/mod-repos.md](docs/mod-repos.md)) |
| `docs/` | `mod-reference.md` (the `mod.json` reference; `tools/mod-draft.py` drafts one from an existing package), `api-plan.md` (what each community project uses), `vehicle-commands.md`, `micom-map.md`, `car-test.md` (the on-car test session) |
| `wiki/` | the owners' wiki (GitHub wiki pages: installing, mods, the app, troubleshooting) |
| `docs/` | the website (VitePress, [open-hmg.github.io/HMG-API](https://open-hmg.github.io/HMG-API/)): owners' guides in `guide/`; for developers `mod-reference.md` (the `mod.json` reference; `tools/mod-draft.py` drafts one from an existing package), `api-plan.md` (what each community project uses), `vehicle-commands.md`, `micom-map.md`, `car-test.md` (the on-car test session) |
| `tools/` | `lpatch`, patch makers, build settings |

### Installers
Expand All @@ -121,7 +120,7 @@ Uninstalling puts every file and setting HMG-API or a mod changed back to the st

Everything goes to `out/`. Needs clang + lld, a JDK and the Android SDK (build-tools, a platform `android.jar`). No manufacturer files: the loader links against stand-ins for the head unit's libraries (`core/loader/syslib-stubs.sh`, the same bytes as linking the unit's own). Without HMG-API's signing key (`HMGAPI_KEY`) the app is signed with a throwaway key.

GitHub Actions: `ci.yml` builds and runs the off-car tests a push or pull request touches (`tools/test-select.py`; every one weekly), and the fast tier on macOS; `release.yml` turns a version tag (`v1.0.0-beta.1`) into a signed draft release (keys in the `release` environment; the bundled mods, by catalogue id in `tools/release-mods.txt`, come from their catalogue entries' downloads, SHA-256 and signature checked); `wiki.yml` publishes `wiki/` to the GitHub wiki.
GitHub Actions: `ci.yml` builds and runs the off-car tests a push or pull request touches (`tools/test-select.py`; every one weekly), and the fast tier on macOS; `release.yml` turns a version tag (`v1.0.0-beta.1`) into a signed draft release (keys in the `release` environment; the bundled mods, by catalogue id in `tools/release-mods.txt`, come from their catalogue entries' downloads, SHA-256 and signature checked); `pages.yml` builds the website from `docs/` (every pull request that touches it) and publishes it to GitHub Pages; `wiki.yml` keeps the old GitHub wiki pages pointing at it.

```
tools/test-all.sh
Expand Down
4 changes: 2 additions & 2 deletions core/app/java/hmgapi/app/SettingsTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ void about() {
fact("HMG-API", v);
fact("License", "AGPL-3.0 (mods have their own)");
fact("Source and help", "github.com/Open-HMG/HMG-API");
fact("Guides", "github.com/Open-HMG/HMG-API/wiki");
fact("Support the project", "github.com/Open-HMG/HMG-API/wiki/Support");
fact("Guides", "open-hmg.github.io/HMG-API");
fact("Support the project", "open-hmg.github.io/HMG-API/guide/support");
Ui.text(page, "HMG-API installs through NEMESIS, adb or a USB stick, and every change it makes to the head unit can be "
+ "put back to stock.", 16, false, Ui.GREY);
}
Expand Down
Loading
Loading