dev
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dev [2026/08/08 01:12] – external edit 127.0.0.1 | dev [2026/08/18 21:47] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| How to set a machine up to build, sign, install and debug apps for the Aiways U5 head unit | How to set a machine up to build, sign, install and debug apps for the Aiways U5 head unit | ||
| - | (Adayo i.MX6, Android 4.4.2). See [[hardware|Hardware & OS]] for the platform and [[access|Root / ADB]] | + | (Adayo i.MX6, Android 4.4.2). See [[hardware|Hardware & OS]] for the platform and [[access|How to get in]] |
| for getting in. | for getting in. | ||
| - | ===== What you need ===== | + | ===== Examples ===== |
| + | |||
| + | Four small apps you can install on the car — good starting points that show how the pieces fit together. Each runs as system ('' | ||
| + | |||
| + | ^ App ^ What it does ^ Download ^ | ||
| + | | **OpenAiways Connect** | Automatically connects to a given Wi-Fi and enables ADB-over-Wi-Fi. | [[https:// | ||
| + | | **OpenAiways Telemetry** | Reads CAN signals and publishes them to MQTT with Home Assistant auto-discovery. | {{: | ||
| + | | **OpenAiways Terminal** | A VT100 terminal with an advanced keyboard; runs as system, or as **root** if you press the **su** button . | {{: | ||
| + | | **OpenAiways Speedwarning** | Shows the current speed limit on the driver panel and warns when you exceed it — fully offline, from an on-board map index. | {{: | ||
| + | |||
| + | ==== Installing ==== | ||
| + | |||
| + | - Sideload the '' | ||
| + | - **Open each app once** after installing. Android keeps a freshly-installed app in a " | ||
| + | - Configure it (below). Connect and Telemetry then **auto-start on every reboot**; Terminal is launched by hand when you want a shell. | ||
| + | |||
| + | ==== OpenAiways Connect ==== | ||
| + | |||
| + | Add your Wi-Fi networks (SSID + password, as a priority list) and tick **ADB**. After boot it reconnects Wi-Fi and re-enables adb-over-Wi-Fi. | ||
| + | |||
| + | Source: https:// | ||
| + | |||
| + | ==== OpenAiways Telemetry ==== | ||
| + | |||
| + | Enter your MQTT broker (host, port, user, password) and a base topic. With Home Assistant auto-discovery the car shows up automatically — state of charge, voltage, current, range, charging and more. | ||
| + | ==== OpenAiways Terminal ==== | ||
| + | |||
| + | A proper terminal (based on jackpal' | ||
| + | |||
| + | * The **'' | ||
| + | * The **×** in the top-right corner closes the terminal. | ||
| + | * **One adb client at a time:** the unit's adbd serves a single connection, so while the terminal holds the root shell a laptop' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ==== OpenAiways Speedwarning ==== | ||
| + | |||
| + | Shows the current **speed limit** on the driver panel and blinks + beeps when you drive faster than it — fully **offline**, | ||
| + | |||
| + | **How it works:** live speed comes from the **CAN bus**, position from **GPS**. An on-board **HMM map-matcher** (Newson–Krumm style) fits the GPS track to the road // | ||
| + | |||
| + | **The map index (required): | ||
| + | |||
| + | * {{: | ||
| + | |||
| + | For another area you build your own index from OpenStreetMap with the map-matcher pipeline (source to follow). Without an index the app runs but shows no limit. | ||
| + | |||
| + | **Install: | ||
| + | - Sideload '' | ||
| + | - Put the index on the unit as ''/ | ||
| + | - Drive — the limit shows on the driver panel and warns when you're over it. | ||
| + | |||
| + | //It also records your drives to ''/ | ||
| + | |||
| + | ===== What you need to make your own software | ||
| * **Android Studio** (any recent version) + the **Android SDK**. The unit is **Android 4.4.2 (API 19)**, so set **'' | * **Android Studio** (any recent version) + the **Android SDK**. The unit is **Android 4.4.2 (API 19)**, so set **'' | ||
| Line 22: | Line 76: | ||
| 5555'' | 5555'' | ||
| - | ===== Signing — the one thing to know ===== | + | ===== Signing — the platform key ===== |
| - | Several of our apps declare **'' | + | Several of these apps declare **'' |
| - | and use system | + | |
| - | **On this setup no signing config | + | **The head unit was never re-keyed.** (at least for my 1.7.0 firmware) It is a Freescale/ |
| - | the AOSP platform | + | |
| + | Subject : C=US, O=Android, CN=Android, emailAddress=android@freescale.com | ||
| + | Valid : 2011-07-14 -> 2038-11-29 | ||
| + | SHA-256 : 7F: | ||
| + | |||
| + | Because that key is **public**, anyone can sign a system-privileged app for this unit — an OEM security lapse, and exactly what makes this project possible. NXP reused the same key across every i.MX BSP for about a decade, so it is easy to find. | ||
| + | |||
| + | ==== Where to get it ==== | ||
| + | |||
| + | It lives in the i.MX device tree under '' | ||
| + | |||
| + | https:// | ||
| + | |||
| + | Check you have the right one — the certificate must match the fingerprint above: | ||
| + | |||
| + | openssl x509 -in platform.x509.pem -noout -fingerprint -sha256 | ||
| + | |||
| + | ==== Make a keystore | ||
| + | |||
| + | Turn the BSP key pair into a keystore Gradle can use ('' | ||
| + | |||
| + | openssl pkcs8 -inform DER -nocrypt -in platform.pk8 -out platform.key.pem | ||
| + | openssl pkcs12 -export -in platform.x509.pem | ||
| + | |||
| + | Point the app's '' | ||
| ./gradlew : | ./gradlew : | ||
| adb -s < | adb -s < | ||
| - | '' | + | '' |
| - | so it' | + | |
| - | sharedUserId won't install — put the platform test-key at '' | + | |
| - | explicit | + | |
| ===== Talking to the car from an app ===== | ===== Talking to the car from an app ===== | ||
| Line 59: | Line 133: | ||
| ===== No-code CAN probing ===== | ===== No-code CAN probing ===== | ||
| - | To try keys without writing an app, the **CarMqttBridge** bridge | + | To try keys without writing an app, **[[dev# |
| - | binds '' | + | probe (it already binds '' |
| - | **[[canbus# | + | See **[[canbus# |
| + | |||
| + | ===== Also: the ESP32-S3 companion (separate hardware) ===== | ||
| + | |||
| + | Not a head-unit app — a standalone **ESP32-S3** you wire into the car, for people who don't want to (or can't) get onto the head unit at all. One board does four things at once: | ||
| + | |||
| + | * **Talks to the TBox over BLE** (BlueGate protocol) → **preconditioning** and **remote control** (lock/ | ||
| + | * **Reads a BLE OBD2 dongle** (ELM327) → SoC, HV voltage/ | ||
| + | * **Publishes to MQTT with Home Assistant auto-discovery** — sensors plus Precondition/ | ||
| + | * **Runs a Wi-Fi hotspot + web dashboard** at the same time as the home-Wi-Fi/ | ||
| + | |||
| + | A prebuilt image and a browser-based flasher (no toolchain needed) are on its own page: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | //🤖 AI-assisted development — reviewed before trusting it on a real vehicle, same disclaimer as the apps above.// | ||
dev.1786144355.txt.gz · Last modified: by 127.0.0.1