How to Build Your Own Android TV Box with Raspberry Pi

So you have got a new Raspberry Pi and want to build something useful? Well, first and foremost, if you don’t have a separate monitor, no need to worry. You can use your Windows laptop as a monitor for Raspberry Pi and even set up VNC Connect on RPi for remote connection. However, if you are looking to build an Android TV Box with Raspberry Pi then you will need a separate monitor or TV. In this guide, we have explained the details on how to install Android TV on Raspberry Pi and get Google Play Store and Services. So on that note, let’s begin.

Build Your Own Android TV Box with Raspberry Pi

I have written this guide keeping beginners in mind so if you are completely new to Raspberry Pi, don’t worry. Just go by the instructions and you will be running your custom Android TV on Raspberry Pi. For your ease, you can jump between sections from the table below.


1. You will need a monitor or TV to set up and install Android TV on Raspberry Pi. This can’t be done remotely.

2. HDMI cable based on your board. Raspberry Pi 4 will need a micro HDMI to HDMI cable whereas Raspberry Pi 3 will require an HDMI to HDMI cable.

3. Raspberry Pi 3 and 4 are only supported for Android TV and they must have at least 2GB of RAM.

4. A microSD card having free space of 16GB or more.

5. Keyboard and mouse. If you have a wireless combo one then that’s even better.

6. A power adapter based on your board.


  • First of all, to build an Android TV Box with Raspberry Pi, you need to download Android TV OS for Raspberry Pi. KonstaKANG is a popular developer known for building all sorts of Android ROMs for Raspberry Pi. The TV OS is based on Lineage OS and is available in many versions including Android 9, 10, and the latest 11. Based on your board, you can download any Android TV version but I would recommend Android TV 10 for stability. That said, for this guide, I am trying out Android 11 just to check how well it runs. You can click here to head over to the download page for RPi 4. If you want to download Android TV OS for RPi3 then click on the Devices menu on the top-right corner.
  • Next, you need to download the GApps package as the Android TV build does not come with Google apps and services. If you are installing Android TV 10 then open this link and simply click on the download button (make sure “tvstock” is selected). If you are like me, trying a newly released Android TV 11 build then click here and download the “tvstock” test build.
  • Next, you need to download balenaEtcher (Free) to flash the Android TV OS onto the SD card.

Install Android TV on Raspberry Pi (2021)

1. Once you have downloaded the Android TV build, extract it and you will get an IMG file.

2. Next, fire up balenaEtcher and select the Android TV IMG file. In my case, it’s an Android TV 11 build, but you may have a different version. After that, choose the SD card and click on “Flash!“.

3. Once the flashing process is done, remove the SD card and insert it into the Raspberry Pi. In addition, connect a mouse and keyboard. Finally, connect the power source and HDMI cable to the monitor/TV.

4. Within seconds, you will find Lineage OS loading up on the screen.

5. After a while, you will be on the barebone Android TV home screen. Now we need to add Google Play Store and Services on our Android TV. By the way, to go back, press the F2 key on the keyboard. And some keyboard shortcuts for Android TV on Raspberry Pi are: F1 = Home, F2 = Back, F3 = Multi-tasking, F4 = Menu, Press and hold F5 = Power Menu, F11 = Volume down, and F12 = Volume up.

Install Google Play Store and Services on Your Custom Raspberry Pi Android TV Box

1. Now that you have installed Android TV on Raspberry Pi, it’s time to add support for Google Play Store and other services. Use a thumb drive and move the GApps package (ZIP file) to Raspberry Pi from your computer.

2. Once you have moved the GApps package, open Settings -> Device Preferences -> About -> Scroll down to the Build menu. Now, click on the “Build” menu 7-8 times continuously. It will enable Developer Options on Android TV.

3. Next, go back to Device Preferences and scroll down. You will find “Developer Options“. Open it.

4. Here, turn on “Advanced Reboot“.

5. Now, to restart Android TV on Raspberry Pi, open Settings -> Device preferences -> Reboot -> Recovery. This will take you to TWRP Recovery.

6. You will now boot into the TWRP recovery. If prompted, click on “Swipe to Allow Modifications”. After that, open “Install“.

7. Here, choose the GApps package that we transferred to the Raspberry Pi.

8. Finally, click on “Swipe to confirm Flash“.

9. Now, click on the TWRP icon on the top-right corner and it will take you to the main menu. This time, move to Wipe -> Swipe to Factory Reset.

10. Once the reset is complete, click on “Reboot” on the same page.

11. Voila, you will boot directly into Android TV on your Raspberry Pi. And this time, you will be prompted with the Google Setup. Now, go ahead and follow the on-screen instructions. I will suggest you not add your primary Google account as Google has been lately terminating accounts for unknown policy violations. If you get a popup to set up a remote, press “Esc” on the keyboard. Further, if you face an error during Google login, use the remote option for on-device login.

12. So here it is. Google Play Store, Chromecast, and all Google services are available on your Raspberry Pi-based Android TV and working absolutely fine. In case, Chromecast is not working or apps like Netflix are not available then follow the below fix.

Fix Chromecast on Raspberry Pi-based Android TV Box

1. If Chromecast is not working on your Raspberry Pi, there is nothing to worry about. You can manually enroll your custom Android TV on Google’s list of certified devices. To begin with, install the Device ID app by Evozi (Play Store / APKMirror) on Raspberry Pi. Since the Play Store on Android TV does not have this app, you will have to sideload it.

2. Next, open the Device ID app and it will display the code for Google Service Framework (GSF). Click on it and copy the code.

3. Now open on Raspberry Pi or your computer and log in with the same Google account that you have used on the Raspberry Pi. After that, paste the GSF code and click on “Register“. You have finally done it. Now, wait for 5-10 minutes and Chromecast should start working.

4. If you are still facing issues then restart your RPi-based Android TV. Press and hold the F5 key and click on Restart. This time, Chromecast should work fine.

5. To further customize your Raspberry Pi-based Android TV, head over to Settings -> Device Preferences -> Raspberry Pi Settings.

6. You can even add an IR remote to your Raspberry Android TV setup. Just enable the Infrared remote toggle and use your IR remote to control Android TV. For more information, head over to the developer’s documentation.

Install Android TV on Raspberry Pi to Make Your TV Smart

So that is how you can install Android TV and utilize Raspberry Pi as an Android TV Stick or Box. I know the installation process is a bit lengthy, but once you set it up, everything works fine. I even tested the latest Android 11 build and it worked like a charm. So go ahead and try it out.

Additionally, we would recommend you install Pi-hole on your Raspberry Pi to clean your home network from ads and trackers. And if you are wondering, yes you can set up Raspberry Pi remotely without a monitor or Ethernet/HDMI cable. Anyway, that is all from us. If you are facing any issues then let us know in the comment section below.

Comments 17
  • All versions are borked. You can load the Lineage 20 based version and get it to boot but there’s no GAPPS available (older versions won’t work) so you’re stuck with an Android TV box with no apps.

    Earlier builds all boot into the Recovery window with no way to get to the Android TV OS.

    This definitely feels like a side project that was started and since abandoned. Highly recommend anyone who hasn’t wasted time down this rabbit hole avoid at all costs.

  • Tried a few konstakang versions and also PrimeOs, it all sucks. The rpi4 with 8GB can simply not do better than my cheap 50 euro Android tv box. Bluetooth interferes with wireless mouse. Google play says there is no internet while other things work with internet. Rpi is good for projects and a little server. But absolutely not for Android, hence the rpi creators don’t even supply an Android version, only their linux clone.

  • Hi,

    I am really struggling with the android Tv Box I installed on my Pi. I have Raspberry Pi 4B with 8Gb Ram yet I am not getting quality input.

    I tried installing 2 setups –
    1. Android 10 setup didn’t install properly. I always get stuck in an infinite loop of loader animation when trying to complete basic setup.
    2. Was able to install Android 11 one. But facing below problems –
    a. Prime Video Won’t work.
    b. Extreme Frame Drops in Hotstar, SonyLiv, MxPlayer etc. These are the apps that I had access to their premium content.
    c. Chromecast won’t work. Will try your solution to see if it works.
    d. I have a Jellyfin server that works flawlessly but it did on OSMC too. Only other app which works is Youtube
    e. I have a LG TV which has a smart Link functionality, which is really cool as I can use TV’s remote to control external connected devices too. It works on FireTV, Kodi, OSMC, Playstation. But not on this Android Setup.
    f. I have fan installed in my PI. Its extremely noisy. If I remove it becomes extremely hot. Even Jellyfin starts dropping frames.
    g. I think Widevine is the problem. But Android 11 setup I got from konstacong link is Arm64 and Widevine is only supported in ARM version. I am screwed here

    I want advise, which android tv version is stable and will run Jellyfin, Hotstar, SonyLiv, Youtube, Prime Videos and MxPlayer flawlessly ?

  • Was able to get the setup done, until trying to install the GApps section. Using a keyboard with touch pad, I’m unable to swipe to confirm flash. Any Ideas anyone?

  • Hi, I am going step by step, but after TWRP reboot my device not start. Only showing moving logo. I tried several times from the first step, but nothing else. Have you any idea please?

  • Anybody get CEC to work on this box? Got it all setup but I can’t figure this out. Seems like a simple thing to do but I don’t see the option.

    Also, thanks for this guide. Super easy to setup following your guide.

  • Hi… couldn’t test. Unfortunately Lineage OS doesn’t run on Raspi Pi4B instead it only enter on loop reboot. Tried all versions on Konstakang and even Pi3 version – none works.

  • I tried to do this with an extra pi I had running around but for some reason the Raspberry Pi couldn’t connect to my wifi network and the KonstaKang Lineage OS has no way to skip adding a wifi network, even if you’re hard wired.

    I’ll add that I had Kodi installed in the Pi which could connect to wifi no problem, it was specifically an issue with KonstaKang, not the pi itself. And yeah, almost any android box or stick is gonna do the job better. Pi sucks.

  • Pi 4 4GB = 67€, case 10€, power supply 10€, SD card 16GB 4€, HDMI cable 10€, remote 10€…

    Most cheap Android sticks that do only SD content = <40€

    Nice guide for tinkering, but not worth it for dedicated Android TV box 🙁

  • Your requirements state:
    3. Raspberry Pi 3 and 4 are only supported for Android TV and they must have at least 2GB of RAM.

    The Raspberry Pi 3 came with only a maximum of 1 GB of RAM therefore the only Raspberry Pi candidate suitable for this project is the Raspberry Pi 4.

    Be guided accordingly.

    • completely agree. But for fun I tried it on my Raspberry Pi 3B and it didn’t work. It installed lineage, but no Android TV. I got all the way to step 11 but my Pi 3B is just stuck on the lineage loading screen and won’t go past it. It’s been like this for the past 4 days. I left it thinking maybe because it has 1GB of RAM it may take a little longer but, nope! Just won’t load at all.

      Not sure why listing the Raspberry Pi 3 as part of the minimum requirements is there if 2GB of RAM is required.

  • I have a 4K UHD TV and am currently using a generic Android TV box (running version 8.1) which is giving me high quality video output. Would Raspberri 4A or 4B be able to produce quality video output?
    Also, would I be able to install Android 10 on my current device A95X Max?

  • Can widevine certified working for level 1. To play full hd 1920x1080p from Amazon prime video and netflix.

Leave a Reply