xcertplay README

The project's README from github.com/shilapi/xcertplay. As one markdown file: README.md.

xcertplay icon

xcertplay

English | 中文

An Android head-unit CarPlay receiver. It supports connecting to the MFi chip through a CH341 I2C bridge or directly through the board's I2C controller, and supports both wired and wireless CarPlay connections.

Features

Usage

  1. Pair your iPhone with the head unit via Bluetooth.
  2. Before a CarPlay video stream starts, tap the Settings button in the lower-right corner. You can also swipe down with three fingers to open Settings.
  3. Make sure all the settings are configured as desired. To enable another entry gesture, turn on More gestures to Settings page. Start with one finger in the upper quarter of the left eighth of the screen, slide down along that strip, and lift in the lower quarter.
  4. Scroll to the bottom and select Save & Reconnect.
  5. Connect your MFi chip using the method you selected.
  6. Wait for the connection to complete, then enjoy.

TODO

Current progress

It works 👍. It has been tested on car head units and phones. If you encounter an incompatible car head unit, please open an issue and attach your log from /sdcard/Android/data/com.shilapi.xcertplay/files/logs/xcertplay.log.

Adapter board: CH341-to-MFI

Waiting for the MFI chip adapter board to arrive...

Project structure

Path Purpose
common/ Shared CarPlay host activity, settings UI, persistence, and app resources used by both targets.
mobile/ Standard Android target using the shared CarPlay host UI.
automotive/ Android Automotive OS target with the shared host UI and advanced audio channel mapping.
shared/ Car App Library code plus the CH341, I2C, MFi, iPhone, iAP2, NCM, VPN, AirPlay, and media implementations.

Remote MFI

The Remote MFi client treats a remote service as an MFi chip for remote calls, or uses BAA authentication. Remote authentication avoids the process of connecting to a local MFi chip for authentication.

Endpoints

Method Path Purpose Request body Success response Failure response
GET /mfi/certificate Get the MFi chip version, certificate type, and certificate contents; cached by the client after the first call None Certificate JSON {"detail":"..."}
POST /mfi/sign Sign the challenge {"challenge":"...","requestId":"..."} {"signature":"..."} {"detail":"..."}
POST /mfi/reset Request a reset of the remote MFi chip {} {"detail":""} {"detail":"..."}

(Optional) Standard Bearer Authentication can be used for verification.

Currently, only BAA Authentication has been tested.

Requirements

Build

On Windows PowerShell:

$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"
.\gradlew.bat :shared:testDebugUnitTest :common:lintDebug :mobile:lintDebug :automotive:lintDebug :mobile:assembleDebug :automotive:assembleDebug

On macOS or Linux:

./gradlew :shared:testDebugUnitTest :common:lintDebug :mobile:lintDebug :automotive:lintDebug :mobile:assembleDebug :automotive:assembleDebug

Unsigned release APKs:

.\gradlew.bat :mobile:assembleRelease :automotive:assembleRelease

Acknowledgements

Thanks to LIVI for providing important reference for this project. Thanks to the showcase project for providing important reference for the BAA authentication in this project.

License

Licensed under the GNU General Public License v3.0.

xcertplay (shilapi/xcertplay)

Searching Database…

What is this?xcertplay turns an Android head unit into a CarPlay receiver, connecting to an MFi authentication chip through a CH341 I2C bridge or the board's native I2C controller, and supports both wired and wireless CarPlay sessions.
Is this an app I flash onto the head unit, or something else?It is an Android application with two build targets sharing the same CarPlay host UI: a standard mobile target and an Android Automotive OS target with advanced audio channel mapping.
How do I get a CarPlay session running on the head unit?Pair your iPhone with the head unit over Bluetooth, open Settings before the video stream starts, configure your MFi chip connection method, choose Save & Reconnect, then connect the chip and wait for the handshake to complete.
What hardware and software do I need?You need a physical MFi authentication chip wired through a CH341 bridge or a native /dev/i2c-N device, plus a USB Host/OTG capable Android device on Android 9 (API 28) or newer; building requires JDK 17+, Android SDK Platform 37, and NDK 28.2.13676358.
Does everything here actually work, or is some of it half-finished?Core CarPlay works and has been tested on real head units and phones, but CarPlay Ultra support is untested/incomplete (it only triggers the prompt on iPhone), there's a known microphone passthrough bug, and only unsigned release APKs are currently provided.
What is Remote MFI for?It lets a remote HTTP service act as the MFi chip over endpoints like /mfi/certificate, /mfi/sign, and /mfi/reset, so you can authenticate CarPlay without wiring a local MFi chip; only BAA authentication has actually been tested.
Why CH341 instead of connecting the MFi chip directly?CH341 is a USB-to-I2C bridge used on boards that lack a built-in I2C controller; boards that do have one can instead talk to the MFi chip directly through a native /dev/i2c-N device.
Can it split navigation, voice, and music audio?Yes, voice, navigation, and music are each routed as separate channels mapped to the corresponding Android audio outputs.
What if my head unit doesn't work with it?The author asks you to open an issue with the log from /sdcard/Android/data/com.shilapi.xcertplay/files/logs/xcertplay.log, since compatibility across different head units is still being validated.
Creator
shilapi
Size
7.3 MB
Stars
1.5K
Age
1mo
Commits · 90 Days