An Android TV and Fire TV client for watching and recording DTV programs through KonomiTV, EDCB, EPGStation, or Mirakurun backends.
addozhang/leancast
Ad-free DLNA/UPnP cast receiver for Android TV that plays videos sent from phone apps with hardware decoding.
- Stars
- 152
- Forks
- 12
- Open issues
- 0
- Last commit
- 6 days ago
What is it?
LeanCast turns an Android TV or Fire TV box into a DLNA/UPnP media renderer. Any phone app with a cast button can discover the receiver over SSDP, send it a video URL through SOAP AVTransport commands, and the video plays fullscreen. Playback uses ExoPlayer (Media3) with the device's MediaCodec hardware decoding, and supports HLS, progressive MP4, Matroska and HTTP-FLV.
The TV-side controls are handled with the remote: OK pauses or resumes, the left and right keys seek with an accelerating fast-forward step, and Back exits. An on-screen display shows progress, the media title and seek feedback, in English or Chinese. The receiver name is user-editable, and the app can start on boot.
The APK is pure Kotlin with no native libraries, so one build runs on common 32-bit and 64-bit Android TV hardware. The project includes a domain layer with unit tests for the protocol logic and a Python control point script for end-to-end testing against a device.
Key features
- 01Discovers the receiver from DLNA/UPnP phone apps via SSDP
- 02Plays HLS, progressive MP4, Matroska and HTTP-FLV streams with hardware decoding
- 03Remote-driven controls with accelerating seek and on-screen progress display
- 04Pure-Kotlin APK with no native libraries, covering four CPU architectures
- 05No analytics and no non-LAN network calls
Use cases
- Casting videos from Chinese streaming apps to a TV without their ads
- Watching LAN-hosted video files from a phone on a living-room TV
- Turning an older Fire TV or Android TV box into a dedicated cast target
Quick start
- 1
Build the debug APK with Gradle
./gradlew assembleDebug - 2
Connect to the TV over ADB
adb connect <TV-IP>:5555 - 3
Install the built APK on the TV
adb install -r app/build/outputs/apk/debug/app-debug.apk - 4
Launch the app once to start the receiver service
adb shell am start -n io.leancast/io.leancast.app.MainActivity
Things to know
- Requires JDK 17+ and Android SDK platform 34 to build from source.
- Casting is DLNA/UPnP only; phone system Miracast casting is not supported.
- Samsung, LG, and Huawei TVs are unsupported because they lack an Android app runtime.
- Some CN smart TVs and YunOS boxes are experimental.
Topics
FAQ
- What is leancast?
- Ad-free DLNA/UPnP cast receiver for Android TV that plays videos sent from phone apps with hardware decoding. LeanCast turns an Android TV or Fire TV box into a DLNA/UPnP media renderer. Any phone app with a cast button can discover the receiver over SSDP, send it a video URL through SOAP AVTransport commands, and the video plays fullscreen. Playback uses ExoPlayer (Media3) with the device's MediaCodec hardware decoding, and supports HLS, progressive MP4, Matroska and HTTP-FLV.
- Is leancast free to use? What license does it have?
- leancast is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is leancast still maintained?
- Actively maintained. The last commit to leancast was on Nov 1, 2026.
- What can I use leancast for?
- Casting videos from Chinese streaming apps to a TV without their ads Watching LAN-hosted video files from a phone on a living-room TV Turning an older Fire TV or Android TV box into a dedicated cast target
- How do I install leancast?
- Build the debug APK with Gradle: ./gradlew assembleDebug Connect to the TV over ADB: adb connect <TV-IP>:5555 Install the built APK on the TV: adb install -r app/build/outputs/apk/debug/app-debug.apk Launch the app once to start the receiver service: adb shell am start -n io.leancast/io.leancast.app.MainActivity
- Where can I get leancast?
- The source code and installation instructions are on GitHub: https://github.com/addozhang/leancast
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A UPnP media server that streams your home music, video and photos to DLNA and UPnP compatible devices on your network.
An Android TV and Fire TV client for EPGStation that lets you watch recorded TV programs with a TV remote.
Free, open-source Android media player for audio, video and IPTV, focused on files organized in folders and playlists.
Shell scripts that debloat Fire TV and Android TV sets over ADB without root, removing ads, telemetry and unwanted apps, all reversible.
A minimal, ad-free home screen launcher for Android TV and Google TV with a 0.4 MB APK and no tracking.