Warning: installing or modifying this software can brick your head unit. Recovery may require professional service or replacement, at your expense. Provided AS IS; use at your own risk, subject to applicable law. Read the risk and liability disclaimer.
Put NBT Manager on the car from a laptop,
over the ENET cable: install, update, diagnose.
Installs, updates and removes NBT Manager on a BMW NBT Evo (iDrive 6) head unit over SSH, from a computer on the car's ENET cable or a Wi-Fi ENET adapter. A Rust desktop application (egui) and the installer core it shares with the NBT Manager phone app.
Supported head units: BMW NBT Evo (iDrive 6). Support for the earlier NBT may come later.
Part of NBTFoundry: manager (what it installs) · mobile-app (phone app, shares the core) · sdk (application SDK) · nf-doom (example application)
Not affiliated with or endorsed by BMW AG or BlackBerry Limited. BMW, iDrive and NBT are trademarks of BMW AG; QNX is a trademark of BlackBerry Limited.
- Install verifies and streams the signed release it downloaded at start (the newest, betas included unless unticked, or an older one chosen), provisions the manager and registers its iDrive plugin.
- Update stages a signed release on an existing installation with the release's own launcher, whatever launcher is installed. The update is confirmed once the manager GUI and worker stay healthy for 30 seconds.
- Test tools collect diagnostics, manage the debug log, install a test application, edit the controller settings, restart the head unit and remove NBT Manager.
flowchart LR
A["Connect<br/>SSH to the head unit"] -->|refused or unreachable| B["Find the vehicle gateway<br/>(HSFZ discovery)"]
B --> C["Enable SSH<br/>(activation relay, after the user agrees)"]
C --> A
A -->|uname -s = QNX| D["Install or Update"]
D --> E["Upload the release's launcher<br/>to a private /tmp folder"]
E --> F["Launcher verifies the signed release<br/>and installs or stages it"]
F --> G["Clean up, plugin partition read-only"]
G --> H["Restart the head unit<br/>to load the iDrive plugin"]
Releases: Windows (64-bit), macOS (Apple silicon and Intel) and Linux (64-bit). They carry no NBT Manager release: they download the newest at start, so the computer needs internet (Wi-Fi beside the ENET cable). The programs are not signed by a publisher: Windows and macOS ask to confirm the first start.
Rust 1.99 or later.
cargo run --locked # development build (no release bundled)
cargo test --locked --workspaceThe workspace has three crates:
| Crate | Path | Contents |
|---|---|---|
nbt-installer-core |
core/ |
Everything but the window: the SSH session with Install, Update and the test tools, gateway discovery, the activation relay, the head-unit search, and the release and test application a test kit embeds at build time (core/build.rs, core/src/bundle.rs). Feature fetch (core/src/fetch.rs, the desktop installer only): looking up and downloading the release from the online catalog. Every socket is opened through core/src/net.rs. |
nbt-manager-installer |
. |
The egui window and the terminal launcher. |
nbt-installer-mobile (library nbt_installer) |
mobile/ |
The core for the phone app through UniFFI: a Session with a Listener for events; confirm_activation, install, update, tool and disconnect act on it. install_file and update_file send a release the app downloaded. |
core/src/release.rs is tested against packages made by NBT Manager's own
packer (core/tests/fixtures/release/). After a change to the release format,
rebuild them with NBT_MANAGER_DIR=../manager python3 core/tests/fixtures/release/regenerate.py.
End-to-end test against a mock SSH server, with the manager's native host
launcher (from a sibling NBTFoundry/manager checkout):
make -C ../manager build/launcher-host
NBT_TEST_LAUNCHER_HOST="$(realpath ../manager/build/launcher-host)" \
cargo test --locked -p nbt-installer-core native_install_then_update_over_ssh -- --ignoredIt installs into an empty manager root, then updates to a second release staged and applied by the uploaded launcher, with a temporary signing key.
README screenshot. tools/capture_window.sh builds the installer with the
test release fixture bundled (into target/capture) and renders
docs/assets/installer.png under Xvfb (needs Xvfb, xwd and ImageMagick).
A release build carries the manager's public key and no release; the private key stays on the signing workstation:
NBT_MANAGER_PUBLIC_KEY=release/manager-public.pem cargo build --release --lockedA test kit also embeds a release (NBT_MANAGER_RELEASE=/path/to/manager.nbtr):
the build rejects an invalid one, the application verifies it again at start,
goes online only when asked and then takes only a newer release. From the
manager repository, make release installer-release builds and signs the
release and then this application (NBT_INSTALLER_DIR, default
../installer). A test application can be embedded too: NBT_TEST_APP_PACKAGE,
NBT_TEST_APP_KEY and NBT_TEST_APP_COMPAT, all three or none. Development
builds may omit everything and report that no release is bundled. The phone
app's store build is the key alone too (On a phone).
Published downloads come from a vX.Y.Z tag (the version in Cargo.toml):
.github/workflows/release.yml runs tools/release_build.sh per platform, with
release/manager-public.pem and no release or test application. A manager
release needs no new installer.
Both send the NBT Manager release named under the buttons, and wait while a download runs.
- At start the installer reads the online catalog
(
nbtfoundry.github.io/catalog.json, as the phone app does), picks the newest release for NBT Evo head units and downloads it from NBT Manager's GitHub releases, checked against the catalog's size and SHA-256, into its data folder: one file, replaced by the next download, used offline at the next start. - Beta releases (on by default) includes pre-releases. Unticked: the newest stable release, even an older one than kept; kept for the next start.
- Version (Newest by default) picks any release the catalog lists (betas only with the box ticked); kept for the next start, back to Newest when the box changes or the version leaves the catalog. Update refuses a release older than any the car has run: Remove NBT Manager, then Install.
- Check online looks again.
- A
.nbtrfile dropped on the window, or given as the program's argument, is taken instead, for a computer without internet.
Each is used only when it verifies with the built-in key (beside a kit's embedded release: for the same head units and not older).
Install takes five steps, the same every time:
- Make the iDrive plugin partition writable:
mount -uw /net/hu-omap/fs/sda0(it is mounted read-only at boot). - Upload the launcher to a private
/tmp/nbt-manager-<random>folder. - Run it: it verifies the signed release, checks the plugin folder and the
manager storage, and installs. A refusal names the failed check (for example
HMI layout: plugin filesystem is read-only). - Remove the staging folder, also after a failure.
- Make the plugin partition read-only again, also after a failure
(
mount -ur /net/hu-omap/fs/sda0). If that fails the installer says so; the partition is read-only again after the next reboot either way.
Update takes six: the same remount, upload and clean-up around two runs of the
uploaded launcher, --stage-update <bytes> <sha256> (the release on stdin,
expects PENDING) and --refresh-setup (replaces the installed launcher and the
iDrive plugin; REFRESHED or REFRESHED plugin). The installed launcher is never
run, so an older launcher needs no preparation. On a head unit without NBT
Manager, Update says to use Install.
A failure leaves the connection usable, so Install can be retried at once. After an install, or an update that replaced the iDrive plugin, the installer offers to restart the head unit; the application never reboots it on its own.
iDrive loads the plugin only on a head unit coded for apps: HU_NBT
REMOTE_HMI, A4A and A4A_REMOTE_APPS set to aktiv. A Toyota GR Supra,
and a BMW or MINI without the Apps option, has them off; iDrive then refuses
the plugin without a message and App Manager never appears.
- On every Connect the installer reads the three values with iDrive's own
coding shell (
/opt/sys/bin/sysetshellevo:dumpc, read-only; throughon -f hu-omapwhere SSH lands onhu-jacinto) and says whether the head unit is coded. Where they cannot be read, an installed launcher's--plugin-statusstill tells a head unit that never loads the plugin. - Code for apps… (shown when a value is
nicht_aktiv) asks first, saves the values found to/var/opt/nbt-manager-coding/backup(first change only), sets what is off toaktiv(setc,store), reads the values again and offers the head unit restart that applies them. Other values (notaktiv/nicht_aktiv) are never written: code those with BimmerCode or E-Sys. - Restore coding… (shown while a backup exists) puts the saved values back and deletes the backup. Remove NBT Manager keeps it.
A dealer's coding or software update puts the factory values back; Connect then offers Code for apps again. BimmerCode (expert mode) or E-Sys do the same by hand.
- Collect everything: one read-only report over SSH, saved as
collect-<time>.txtin the logs folder. Each section has its command, output, standard error and exit status:uname -aandmount, the debug log,sloginfo, each application's log (state/<app>/output.log.1andoutput.log),audioconn -l,pidin arg, the process manager's overview, the capture shim's state and files, andls -lRof the manager's folders and/dev/shmem. A section that fails or times out is noted and the others still run (core/src/collect.rs). Read a report before sharing it: the system log can hold phone names and Bluetooth or Wi-Fi addresses, andpidin argthe head unit's MAC address. - Debug log: switch it on (creates
manager/debug.log), save it, or switch it off and delete it. - System log: runs
sloginfoon the head unit and saves it asslog-<time>.log. Works with or without NBT Manager installed. - Install test application v1: provisions the application
testfrom the embedded signed package through the launcher's--provision-app. The head unit verifies it and refuses to replace an existing application. - Controller settings: edit and write
manager/controller.conf(prefilled with the documented defaults,core/assets/controller.conf.example), or remove it. - Restart the head unit: runs
OnOffDSICommander appreset, which restarts the whole head unit as switching the car off and on does. SSH goes down with it, so the installer disconnects; once the head unit is back, Connect offers to enable SSH again. - Remove NBT Manager: after a confirmation, deletes
/var/opt/nbt-manager, the applications' files on the hard disk (/mnt/share/nbt-manager) and the plugin foldersPlugins/NbtManagerandPlugins/.NbtManager.setupunder/opt/hmi/ID5/data/ro, nothing else. Running copies keep their open files until the reboot that unloads the plugin.
Logs and reports go to Documents\NBT Manager logs on Windows, else the
application data folder.
Each remote command runs in a login shell (/bin/sh -l -c '…'), which has the
session's PATH and LD_LIBRARY_PATH. Commands use only the QNX shell's
built-ins (echo, test, umask, :) and mkdir, cat, chmod, rm,
mount, sloginfo, OnOffDSICommander, iDrive's coding shell
sysetshellevo and on, and contain no user input; the controller settings
and the coding shell's commands travel on standard input. The head unit has no printf and
no rmdir; a test keeps both out.
The default address (169.254.199.119), port, user and root password are the
head unit's published defaults, built in (core/src/lib.rs); the password field
is plain text so it can be read and corrected. Passwords are never logged. Every
SSH host key is accepted without a prompt: the installer only talks to a head
unit on the car's own network, and a reflash changes the key. The key's SHA-256
fingerprint is logged.
Open SSH terminal (next to Connect) starts ssh from the PATH in a new
terminal with the connection settings (-o HostKeyAlgorithms=+ssh-rsa -m hmac-sha1, host keys not recorded, -p <port> <user>@<address>). OpenSSH takes no
password argument, so the installer acts as ssh's askpass program
(SSH_ASKPASS_REQUIRE=force, OpenSSH 8.4 and later); an older ssh asks for it.
The fields are validated first (letters, digits, ., -, _; port 1–65535).
The terminal: Windows start; macOS Terminal, through a private .command
script that deletes itself (Terminal does not pass on the installer's
environment); Linux x-terminal-emulator, else the first of gnome-terminal,
konsole, xfce4-terminal, kitty, alacritty, foot, wezterm or xterm found.
The head unit's sshd predates rsa-sha2, hmac-sha2 and curve25519/ECDH; group
exchange is the only key exchange it shares with a modern client, and it may
answer with the 2048-bit group 14. The client therefore accepts groups from 2048
bits, as OpenSSH does, and appends HMAC-SHA1, the SHA-1 key exchanges and AES-CBC
after the modern algorithms. A test server configured the same way covers this.
After authentication the client runs uname -s to check for QNX.
Progress: two bars over the log show the operation's steps and the current step's bytes, speed and time left. Upload progress counts bytes written to the SSH socket, not bytes queued.
Debug log (checkbox, off by default) shows each remote command (fixed commands
with generated paths, sizes, digests and the compatibility token) and, for a
failed step, its exit status, signal, output and error (up to 4 KiB, escaped),
plus host key and handshake errors. Detail is always recorded, so ticking it after
a failure shows what led there. While ticked, the log is also written to
installer-<time>.log in the logs folder.
When the SSH connection cannot be opened (refused, unreachable or timed out), the installer asks whether to enable SSH:
- It finds the vehicle gateway by HSFZ discovery (UDP 6811 broadcast). The gateway is a different module from the head unit.
- It relays between the gateway's port 6801 and the activation service
(
wss://pretzel.bavarian-aa.uk:8443), showing the service's status messages. It sends diagnostic commands to the vehicle; it does not record vehicle messages. - It connects again.
Service messages the installer does not know (tag 0x84 since 2026-11) are skipped; an error that follows names their tag and size, never their content. If activation ends with a protocol or transport error, the installer keeps the error and checks whether SSH became reachable anyway; an explicit negative result stops the attempt. Failures after the connection opens (handshake, authentication) never offer activation.
Gateway discovery (core/src/discovery.rs) sends the request from every local
IPv4 address (including link-local ones), each to its own subnet's broadcast and
to 255.255.255.255, plus once from an unbound socket to 169.254.255.255.
Windows sends a limited broadcast out of one interface only, and a car that took a
DHCP address from a Wi-Fi ENET adapter keeps it after the adapter is unplugged and
answers only on that subnet. Answers are merged by VIN, so one car answering on
two subnets is one gateway. Connection settings → Gateway skips the search
and uses the typed unicast IPv4 address.
Head-unit search (core/src/sweep.rs): behind a Wi-Fi ENET adapter the
computer gets a DHCP address from the adapter and loses its 169.254 address, so
the built-in head-unit address is unreachable, while the head unit itself takes a
DHCP address on the adapter's network. When the configured address does not
answer, the installer searches for the SSH port on the networks a vehicle gateway
answered on, leaving out this device's own addresses and the gateways (which
refuse SSH, and must not be offered the password). Whatever answers still has to
pass uname -s. Only those networks are searched; the link-local /16 is too
large, so the built-in address covers the cable. The search runs before the
Enable SSH offer, since SSH is often already on, and again after enabling it.
Without a 169.254 address (a phone, or a computer behind the adapter), the
built-in address is not tried; after enabling SSH the search repeats every 2
seconds for up to 60 seconds. When nothing is found and the configured address is
link-local while this computer has none, the log and the Enable SSH window give
the addresses to set.
The NBT Manager phone app (NBTFoundry/mobile-app, module car-install) runs the
same core over a Wi-Fi ENET adapter, or over the ENET cable on a USB Ethernet
adapter with the phone's Ethernet sharing (tethering) on: the car has no DHCP
server and Android takes no link-local address, so the phone serves the
addresses and the car's modules take theirs from it; its
scripts/build-installer-core.sh builds
the library from this workspace. By hand, with the Android NDK and cargo-ndk
(rustup target add aarch64-linux-android):
cargo ndk -t arm64-v8a -P 29 build -p nbt-installer-mobile --release --locked
cargo build -p nbt-installer-mobile # host build: the binding is read from it
cargo run -p nbt-installer-mobile --features bindgen --bin uniffi-bindgen -- \
generate --library target/debug/libnbt_installer.so --language kotlin --out-dir <dir>The release library is stripped of the metadata the binding is generated from; a host debug build carries the same interface.
The phone app is not rebuilt for a manager release. Its store build embeds the
manager's public key and no release (NBT_MANAGER_PUBLIC_KEY alone); the app
downloads the release, and release_file takes it when it verifies with that
key. install_file and update_file then send the file, which is read where
it lies. Beside an embedded release (a kit build), a file must also be for the
same head units and not older. A build without the key takes none.
A phone cannot rely on routes: the adapter's Wi-Fi has no internet, so Android
either keeps mobile data as the default network and sends car traffic there, or
makes the adapter's Wi-Fi the default and loses the internet. The app therefore
passes Networks: the car network's handle (Network.getNetworkHandle(): the
adapter's Wi-Fi, or the cable's Ethernet) and addresses, and the mobile-data
handle. net.rs ties every car socket to the
first with android_setsocknetwork, and the activation service's socket to the
second, resolving its name there with android_getaddrinfofornetwork. Gateway
discovery and the head-unit search then use only the car network's addresses.
A computer sets nothing and keeps the system's routes.
Copyright (c) 2026 Fabien Poussin. The desktop installer, its tests, build scripts and documentation are licensed under GPL-3.0-or-later; see LICENSE.
Original NBTFoundry logos, artwork and screenshots are under MPL-2.0, including copies in other NBTFoundry repositories. Third-party code, fonts, game data and their notices retain their own terms. Copyright permission for artwork does not grant trademark rights or imply endorsement by BMW AG or id Software.
See legal/README.md for third-party license notices.
The shared Rust core (core/) and mobile bindings (mobile/) are MPL-2.0, including their tests and build scripts; their directories contain the applicable LICENSE. This lets the MPL-licensed phone app use the same core.
