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…

Что это?xcertplay превращает Android-магнитолу (head unit) в приёмник CarPlay: он подключается к чипу аутентификации MFi через I2C-мост CH341 или штатный I2C-контроллер платы и поддерживает как проводные, так и беспроводные CarPlay-сессии.
Это приложение, которое я устанавливаю на магнитолу, или что-то другое?Это Android-приложение с двумя целями сборки, использующими общий интерфейс CarPlay-хоста: стандартная мобильная цель и цель под Android Automotive OS с расширенным распределением аудиоканалов.
Как запустить CarPlay-сессию на магнитоле?Сопрягите iPhone с магнитолой по Bluetooth, откройте настройки до того, как начнётся видеопоток, настройте способ подключения чипа MFi, выберите Save & Reconnect, затем подключите чип и дождитесь завершения рукопожатия.
Какое железо и ПО мне нужны?Нужен физический чип аутентификации MFi, подключённый через мост CH341 или нативное устройство /dev/i2c-N, а также Android-устройство с поддержкой USB Host/OTG под управлением Android 9 (API 28) или новее; для сборки нужны JDK 17+, Android SDK Platform 37 и NDK 28.2.13676358.
Здесь всё реально работает, или что-то недоделано?Базовый CarPlay работает и проверен на реальных магнитолах и телефонах, но поддержка CarPlay Ultra не протестирована/не завершена (на iPhone она лишь вызывает соответствующий запрос), есть известный баг с передачей звука микрофона, а пока предоставляются только неподписанные release-APK.
Зачем нужен Remote MFI?Он позволяет удалённому HTTP-сервису выступать в роли чипа MFi через эндпоинты вроде /mfi/certificate, /mfi/sign и /mfi/reset, так что CarPlay можно аутентифицировать без физического подключения локального чипа MFi; реально протестирована только BAA-аутентификация.
Почему CH341, а не прямое подключение чипа MFi?CH341 — это мост USB-I2C для плат без встроенного I2C-контроллера; платы, где такой контроллер есть, могут общаться с чипом MFi напрямую через нативное устройство /dev/i2c-N.
Можно ли разделить звук навигации, голоса и музыки?Да: голос, навигация и музыка идут отдельными каналами, каждый привязан к соответствующему аудиовыходу Android.
Что делать, если моя магнитола с ним не работает?Автор просит создать issue с логом из /sdcard/Android/data/com.shilapi.xcertplay/files/logs/xcertplay.log, поскольку совместимость с разными магнитолами ещё проверяется.
Creator
shilapi
Size
7.2 MB
Stars
1.5K
Age
1mo
Commits · 90 Days