Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
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

  • CarPlay host applications for Android and Android Automotive OS.
  • Support for MFI chips connected through a CH341 bridge or native /dev/i2c-N devices, and Remote MFI authentication (see the API below).
  • Wired and wireless CarPlay connections.
  • CarPlay Ultra triggering (the protocol stack is untested/incomplete, but it can trigger the CarPlay Ultra prompt on an iPhone).
  • Voice, navigation, and music multi-channel audio output mapped to the corresponding Android channels.
  • Dynamic Activity resizing with automatic re-handshaking to the new resolution.
  • Vehicle head-unit location reporting.
  • Android 9 (API 28) support.

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

  • Bluetooth activity popup
  • more gesture for setting page
  • debug log caused stuck bug
  • microphone passthrough bug

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

PathPurpose
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

MethodPathPurposeRequest bodySuccess responseFailure response
GET/mfi/certificateGet the MFi chip version, certificate type, and certificate contents; cached by the client after the first callNoneCertificate JSON{"detail":"..."}
POST/mfi/signSign the challenge{"challenge":"...","requestId":"..."}{"signature":"..."}{"detail":"..."}
POST/mfi/resetRequest 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

  • JDK 17 or newer to launch Gradle. The daemon resolves Java 25 through the Gradle toolchain.
  • Android SDK Platform 37.
  • Android 9 (API 28) or newer. On Android 9, Wi-Fi P2P 5 GHz mode is unavailable and LocalOnlyHotspot is used instead.
  • Android NDK 28.2.13676358.
  • A physical USB Host/OTG Android device and MFi hardware are required for hardware validation.

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.

关于 About

Carplay on Android head unit using onboard mfi chip or via CH341.
carplayheadunit

语言 Languages

Kotlin99.5%
C0.4%
Makefile0.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
60
Total Commits
峰值: 49次/周
Less
More

核心贡献者 Contributors