C++17 · protocol implementation

Turn a head unit into
a CarPlay receiver.

AllPlay implements the phone-facing stack end to end — AirPlay RTSP, iAP2, MFi-SAP, USB lockdown/TLS, and Android Auto AAP — decodes H.264 and AAC-LC locally, and sends touch back as HID reports. No Apple binary, no MFi code.

The AllPlay launcher on macOS waiting for a phone to connect
The desktop host, waiting for a wireless CarPlay phone.
4protocol backends
5platform targets
13.7klines in the platform-free core
0Apple binaries or code

What runs today

Honest labels: hardware-validated, protocol-complete, and interface-only are kept separate.

hardware-validated

Wireless CarPlay

Bluetooth iAP2 trigger → mDNS discovery → RTSP negotiation → encrypted H.264/AAC streams → touch and media keys.

hardware-validated

Wired CarPlay

USB configuration switch → usbmux v2 → lockdown → in-place TLS → com.apple.carkit.service → iAP2 → kernel NCM media plane.

protocol-complete

Wired Android Auto

AOAP 51/52/53 → AAP VERSION → TLS 1.2 → service discovery → control, video, audio, and input channels. Awaiting a real-phone run.

Layered on purpose

core/ has zero platform headers and one third-party dependency (OpenSSL). Every platform is an adapter around it.

TransportUSB · RFCOMM · TCP · mDNS
SessioniAP2 · MFi-SAP · lockdown · TLS
StreamingRTSP · RTP · AES-CTR · ChaCha20
MediaH.264 · AAC-LC · Opus · LPCM
HostSDL2 · Android · HarmonyOS

Build and test

Linux needs the platform headers; the core-only build needs nothing but OpenSSL and a C++17 compiler.

sudo apt-get install -y cmake g++ pkg-config libssl-dev \
  libavahi-client-dev libbluetooth-dev libdbus-1-dev \
  libusb-1.0-0-dev libsdl2-dev libsdl2-ttf-dev \
  libavcodec-dev libavutil-dev libswscale-dev
scripts/build.sh
./build/iap2_test && ./build/m3_test && ./build/aa_wire_test

Credential prerequisite

The last gate of both CarPlay paths is the Apple-issued MFi identity.

identity/ (EC P-256 private key + Apple certificate) is not in this repository and is not covered by the GPL. Supply your own; a self-signed identity walks the chain during development but is not a shipping path. AllPlay is not an Apple product and is not MFi-authorized.

Design documents

Long-form documents live next to the code and stay in sync with it.