Building APKs From Android Source And Sideloading On Android TV
Updated 2026-11-01
Why build and sideload Android TV apps yourself
If you need a custom app on your Android TV that isn’t in Google Play, compiling the APK from source is often the cleanest path. You control the binary, you avoid the Play Store restrictions on sideloaded software, and you can experiment with newer APIs than the store ships.
This guide walks through every step: pulling the AOSP tree, enabling the TV-specific target, building the image, and sideloading the resulting APK. It also covers what you accept when you pull a signed system partition.
Getting the Android TV source tree
Start by downloading the AOSP source for the exact Android TV version you are running. The official source mirror for Samsung’s Tizen-like builds is indexed on the main AOSP site under the “Android TV” channel, but most community guides use the Pixel TV fork because it includes TV-specific patches.
Clone the tree:
git clone https://android.googlesource.com/system/library/android.tv.git -b r1.0
The build directory needs the target and arch flags set for x86_64 if your box is a console-class box, or arm64 for many ARM-based sticks. Set those in build/tools/makefiles/target.mk before you run m
Then verify the tree produces a working image with lunch android-tv-x86_64 (or the appropriate variant), because the TV build is built with different system images and media features than the phone build.
Compiling the APK for TV
Once you have lunched the target, compile the image. The vanilla AOSP build produces a full system image, but you only need the APK side for sideloading. You can narrow the output with:
make -j$(nproc) product=tv-custom
The resulting out/target/product/vr1/tv-custom.img contains the system partition including any compiled apps. To extract individual APKs, look in out/target/product/vr1/
A typical sideloadable app might come from out/target/product/vr1/app.tar or from a dedicated apk folder inside the output tree. Extract the .apk and confirm its signature isn’t tampered with by checking the META.CONTENTS and signing hash.
Safely sideloading an APK on Android TV
Connect a USB drive, copy the signed APK into the TV, then open Settings → Applications → Install from unknown sources and enable it for the specific account you used. On some Android TV boxes, you must grant Permission > Install unknown apps for the screen output. On Chromecast-enabled sticks or Nvidia Shield TV that acts as a TV, the setting is labeled “Install apps from other sources.”
After the download finishes, the Android TV installer verifies the APK signature. If it fails, stop—do not try to force the install. A mismatched or unsigned APK will not work, and on locked-down hardware it may simply refuse to launch.
Trade-offs and practical tips
Building your own APKs and sideloading means you’re managing updates by hand. The Play Store pushes patches automatically, while your manual build has to be rebuilt whenever you want a new version of a supported app.
Keep three things in mind:
- Sideloaded apps won’t get Play Store security reviews or automatic updates, so plan for a replacement when the original developer releases a new package.
- Compiling a full AOSP TV image uses several gigabytes of storage and can take an hour to build on modest hardware.
- Only install APKs from reputable creators; the sideload attack surface is larger than the official store.
For devices like the Ayaka X900H or ASUS TV Pro with custom firmware, the process is identical once you identify the correct build branch. For more locked-down boxes, a lightweight alternative is pulling the APK over ADB from a PC and installing with adb install -r directly.
Testing the sideloaded app on your TV
Launch the app immediately after install—Android TV boots slower than phones, and first-run latency can hide installation errors. If the launcher crashes on startup, re-run the build with TARGET_SYSTEM_PARTITION = "system" re-enabled, and check that the app’s manifest doesn’t request permissions the TV build blocks (for example, camera or voice access may require additional TV-specific permissions).
If the app runs, verify the icon placement matches expectations. The sideloaded APK usually replaces the Play Store version’s icon set, and Android TV’s Launcher groups apps by installation time, so the freshly installed one will appear at the end of the list.
Final thoughts
Sideloading compiled APKs gives you freedom but requires discipline. Build a reproducible script: source checkout, build flags, and install command. Store the script outside your TV, test on a similar board first, and keep a backup of the original firmware image along with your custom build.
By following these steps, you can bring new apps, remove bloat, and roll out custom tools to your Android TV box without ever touching the Google Play ecosystem. That is a durable setup that works across multiple years of hardware refreshes.
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.