Open-source AirPlay 2 receiver for Fire TV and Android TV.
Install · What works · How it works · Build · Credits
AirReceiver, AirScreen, and AirPin all charge money to do AirPlay on Fire TV. Every open-source attempt I found on GitHub was either abandoned, audio-only, or required a Raspberry Pi. FirePlay exists because Fire TV already has the hardware to decode H.264 and play ALAC, and it should be able to do AirPlay without a license fee or a second computer in the loop.
iPhone Fire TV (FirePlay)
------ ------------------
Music -- ALAC audio --> ALACDecoder --> AAudio out
Photos -- H.264 video --> AMediaCodec --> SurfaceView
Video -- AAC-ELD sound --> AMediaCodec --> AAudio out
AirPlay 2 -- FairPlay pair --> UxPlay protocol library
Install the free Downloader app from the Amazon Appstore on your Fire TV.
Under Settings -> My Fire TV -> Developer Options, enable
Install unknown apps for Downloader. If Developer Options is hidden, go
to Settings -> My Fire TV -> About and click the "Fire TV" entry seven
times. Open Downloader, type is.gd/fireplay_tv, press Go, then Install,
then Open. You should see the FirePlay splash screen once the app boots.
On your iPhone, open Music or Photos, tap the AirPlay icon, and pick FirePlay from the device list.
adb connect <fire-tv-ip>:5555
adb install FirePlay-v0.1.4.apkAPKs are attached to every GitHub release.
The F-Droid recipe lives at metadata/org.fireplay.yml. Submission to the
main F-Droid repo is planned once the v0.2 release cycle settles. Amazon
Appstore is deliberately not a target because Apple has a pattern of
DMCA-noticing AirPlay reimplementations on commercial stores.
On an iPhone 13 running iOS 18 talking to a Fire TV Cube 3rd gen (AFTGAZL) on Fire OS 7.7.1, the following works reliably: lossless Apple Music playback through the TV speakers, full-resolution photos, photo clip videos with sound, and generic AirPlay video casts that use H.264 plus AAC-ELD. iOS picks FirePlay out of the AirPlay device list the same way it picks an Apple TV.
Two things don't work yet. iPhone screen mirroring from Control Center is a separate protocol path and is slated for v0.2. Netflix, Disney+, HBO, and anything else wrapped in FairPlay DRM will never cast to FirePlay, because Apple doesn't license FairPlay to third-party receivers. That's a platform restriction, not a bug in this project.
| Piece | State |
|---|---|
| mDNS advertisement via JmDNS | works |
| iOS 17/18 pairing (FairPlay 2-round) | works |
| Music playback, ALAC to AAudio | works |
| Photo + video path, H.264 via MediaCodec to SurfaceView | works |
| Video sound, AAC-ELD via MediaCodec to AAudio | works |
| Per-device identity on multi-receiver LANs | works |
| Auto-launch when iPhone connects, including cold boot | works |
| iPhone screen mirroring | planned for v0.2 |
| F-Droid submission | planned for v0.2 |
The protocol layer under lib-uxplay/ is a vendored copy of
FDH2/UxPlay (GPL-3). It handles SRP-6a
pairing, FairPlay emulation, RAOP RTP demux, and NTP sync. Everything
above that is native Android.
Audio runs through audio_renderer_aaudio.cpp. ALAC packets from the
Music app go through Apple's open-source
ALACDecoder, produce PCM, and land
on an AAudio output stream. AAC-ELD from video sources takes a detour
through AMediaCodec on the way to the same stream.
Video runs through video_renderer_mediacodec.cpp. H.264 NAL units from
the iPhone feed straight into AMediaCodec configured for hardware
decoding. The decoder writes directly to an ANativeWindow backing a
SurfaceView, so frames never touch the CPU after they arrive.
Discovery was the painful part. Android's built-in NsdManager advertises
well enough for Android clients but flakes out with Apple's dnssd resolver,
especially in the face of background renotification. The fix was dropping
back to JmDNS and building the Bonjour
TXT record by hand so it matches what a real AirPlay 2 receiver broadcasts.
You need Android NDK r27 or newer, an SDK with platforms;android-28, and
JDK 17. On Linux or macOS:
git clone https://github.com/jimnoneill/FirePlay
cd FirePlay
./gradlew :app:assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apkOn Windows ARM64 the build.ps1 helper sets up the env vars that gradle
otherwise can't find. Edit local.properties with your SDK and NDK paths
first.
The APK ships both armeabi-v7a and arm64-v8a native libraries, so any
Fire TV or Android TV running Android 9 or newer should install and run.
This project stands on top of other people's work:
- FDH2/UxPlay, the AirPlay 2 protocol
stack, vendored under
lib-uxplay/(GPL-3). - macosforge/alac, Apple's open-source ALAC decoder (APSL).
- KDAB/android_openssl, prebuilt OpenSSL for Android.
- libimobiledevice/libplist, the Apple property list parser (LGPL-2.1).
- jmdns/jmdns, Apple-compatible Bonjour in pure Java.
I'm not a lawyer and this is not legal advice. It's a description of what this project does and doesn't do, in case someone ever asks.
FirePlay contains no Apple code, no Apple-signed binaries, no Apple SDK,
and no files redistributed from Apple's developer resources. The protocol
implementation under lib-uxplay/ is vendored from
FDH2/UxPlay, a GPL-3 clean-room reverse
engineering project that has been public on GitHub since 2020. The ALAC
decoder is Apple's own open-source release under the APSL. OpenSSL,
libplist, and JmDNS are their respective upstream licenses. The Kotlin
and native C glue code in this repo is GPL-3 via UxPlay.
The project does not attempt to circumvent any DRM. FairPlay-protected content from Netflix, Disney+, HBO, and anything else that asks the receiver to prove a FairPlay license cannot play through FirePlay, and that is by design. If those services played through a non-Apple receiver, that would be a DRM bypass. They don't, and this project doesn't try to make them.
FirePlay is an interoperability tool. It exists to let an Android or Fire OS device act as a generic AirPlay 2 receiver for content the user already has the right to watch or listen to. Photos from your own camera roll, music you own or subscribe to, videos from apps that cast without DRM. That's the whole scope.
"AirPlay" appears in this README as a descriptive term for the Apple-defined protocol this receiver speaks. No Apple trademarks or logos are used in branding. The app is not distributed on the Amazon Appstore, and any future store distribution (F-Droid, direct APK) will carry the same posture.
If you're Apple and you have concerns, open an issue. I'd rather have the conversation than a surprise DMCA.
If FirePlay saved you the AirReceiver subscription, or if you just think open-source AirPlay on Android should exist, contributions toward keeping it maintained are welcome.
GPL-3.0, inherited from UxPlay. See LICENSE.