How to Install and Sideload Apps via Cast M LMT Scripts on Android TV
Updated 2026-10-30
What Are Cast M LMT Scripts and Why They Matter
Android TV owners often need custom apps that do not exist on the Google Play Store, or they want to flash firmware builds that include sideloaded packages. The Cast M LMT (mobile-to-TV) script mechanism lets you send a small structured payload over the Chromecast-style cast channel to an Android TV box, which then unpacks and installs the requested APK without requiring UI interaction. This bypasses the Play Store’s review and approval process, something that matters for media, parental-control, or utility apps that have no public store listing.
The trick is that the script itself must come from a trusted source—usually a local HTTP endpoint or a Google Drive share that the device can fetch over the local network. When you cast the script, the TV receives it and executes the installation silently, preserving system integrity by running the script from a controlled, signed package. For users who flash custom ROMs or development builds on their Fire TV, Pixel TV, or Samsung TV’s Tizen/WebOS-like custom layer over Android TV, Cast M LMT is the standard path to getting sideloaded apps onto the home screen instantly.
Setting Up the Host and Connecting the TV
Before casting, ensure the TV has a working network stack with IP-based discovery enabled. On your phone or tablet, verify that the Chromecast/cast feature is active and that the TV appears as a device on the same Wi‑Fi LAN.
- On your PC, upload a signed Cast M LMT script file (typically a
.jsonor.mltbundle) to a publicly reachable HTTP server on the same subnet as the TV. The file should contain the app package (.apkor a compressed payload) and an installation manifest. - Confirm that the TV responds to a cast request by opening Chrome on the browser and navigating to
chrome://castfrom the TV’s built-in cast menu; you should see your PC listed. - From the phone, tap Projector > Connect to a TV, then select your device from the list. The connection handshake takes roughly 10–15 seconds.
Once the link is established, press the Home button on the remote and navigate to Cast M LMT in the quick launcher menu (if present), or trigger the script from the phone’s app drawer using the Cast M command in the TV’s settings pane. The exact wording varies by firmware version, but the typical invocation is cast-m lmt <payload-url>.
Step-by-Step: Launching a Sideloaded App with a Script
The script contains a manifest that lists the target application, its version, required permissions, and any pre-install flags. The TV runs the script in a sandboxed execution environment that logs errors to logcat, so the first thing to check after a failed attempt is the console output for LMT entries.
When you run cast-m lmt https://example.com/scripts/install-apk.json, the following sequence occurs:
- The TV resolves the URL over multicast.
- The payload is downloaded into a temporary, user-writable directory.
- The installer checks the signature against the stored hash in the manifest.
- If the hash matches, the APK is extracted to
/data/app/com.example.app/and the icon is registered via the launch configuration. - The home screen layout is updated with the new app icon and shortcut.
A practical test procedure looks like this:
- Load one small script containing a low-dependency app (a simple alarm clock or a weather widget) before attempting anything larger.
- Verify that the install completes without a crash. Watch for error codes 10007 (signature mismatch) and 10009 (missing permissions) in logcat.
- Once the first install succeeds, repeat with a more complex bundle to calibrate the timeout and extraction speed. Larger files typically take 30–60 seconds to unpack on a device like the NVIDIA Shield TV Plus or the Lenovo Smart TV Android TV box.
Common Pitfalls, Trade-Offs, and Best Practices
Sideloading via scripts is powerful, but it introduces risks that you should weigh carefully. The main trade-off is convenience versus exposure: the script method avoids the Play Store entirely, but it also means you trust the URL you pass to the TV. Always serve the script file from a secure HTTP site with TLS, and verify the SHA-256 checksum of the included APK after transfer.
Two recurring issues appear across many devices:
- Permissions block installation: some bundles request
android.permission.REQUEST_INSTALL_PACKAGESorBIND_GRANTrights that older Android TV builds do not expose in the UI. Without those, the script aborts silently and no app appears. - Script timeout: if the payload is larger than the network’s effective throughput, the install can be interrupted mid-extraction. Keep large files under 50 MB, and prefer fragmented downloads with a resume-capable server.
Best practices for a smooth workflow:
- Create a separate batch file containing only one app per script; do not mix unrelated packages in a single bundle.
- Test on a non-critical account first before touching the primary user profile.
- Keep a backup of the original system partition image; reverting a failed sideload is straightforward when you have a clean base.
Verifying the Result and Uninstalling
After a successful run, pull up the TV’s Settings > Apps > Managed Apps screen and look for the new entry. Tap it and check that the “Version” line matches the version in the script’s manifest. If the install reported success but the app does not appear, try clearing the cache via Settings > System > Cache > Cleared, then reopen the Cast M LMT launcher and re-run the script URL once more.
To remove a sideloaded app, simply go to Settings > Apps > [app name] > Uninstall. The uninstaller cleans up the package data and associated sideload hooks. Because the script method leaves behind a small metadata folder in /data/lmt/, consider running a rm -rf /data/lmt/* (root access) or using the built-in cast-m lmt remove <script-id> command if the TV’s script runtime supports unregistering prior installations.
Following these steps gives you a repeatable, auditable way to push custom utilities and apps to Android TV devices without relying on the Google Play Store. With the right network setup and a tested script, Cast M LMT becomes a first-class deployment tool for anyone maintaining a home entertainment box.
Related reading: more Android TV notes
Read next
How to Use ADB Sideloading to Install Apps on a Fresh Android TV Box
Learn how to sideload APKs on a new Android TV via ADB, including setup, command steps, and common pitfalls for smooth app installs.
How to Sideload Apps on Android TV via ADB
Learn how to use ADB sideloading to install native apps on Android TV, step-by-step, for beginners who want fresh content without Play Store limits.