DIY Entertainment

How to Build an Android TV Box With a Raspberry Pi

Christian Cawley 10-12-2019

Want to make a Raspberry Pi-based media center, but find that the basic Kodi install doesn’t offer enough features? Don’t worry, there is a tried and tested alternative: Android TV!


Here’s how to install Android TV and enjoy the benefits of every popular streaming app that runs on Android, on your Raspberry Pi.

Android in a Box

This is a relatively straightforward project, requiring you to:

  1. Install a dedicated Android ROM on your Raspberry Pi
  2. Install some specific Android TV software
  3. Start watching TV

It really is that simple. If you know how to install an operating system to your Raspberry Pi How to Install an Operating System on a Raspberry Pi Here's how to install an OS on your Raspberry Pi and how to clone your perfect setup for quick disaster recovery. Read More , you shouldn’t have any trouble.

Before you get started, make sure you have:

You’ll also need the following software downloads:


Ready to start? Let’s go.

Step 1: Unpack and Install Android

Installing LineageOS on your Raspberry Pi gives you the benefit of the Android operating system. This means potentially better support for media software, such as YouTube and Kodi. With the right Google apps installed, however, your Android powered Raspberry Pi makes a great Android TV.

This is possible with various versions of Android for Raspberry Pi How to Install Android on a Raspberry Pi Want to install Android on your Raspberry Pi? Here's how to do so—and why to install Android on Raspberry Pi in the first place. Read More (one of which we’ve looked at previously), but for the best results, use the LineageOS version linked to above. Before proceeding, ensure the ZIP file is unpacked.

Install Android on the Raspberry Pi With Etcher

To install, first insert your Raspberry Pi’s microSD card into your PC card reader and run Etcher.


Here, click Select image and browse to the unzipped image file. Select this, then ensure your SD card is selected under Select drive. Once you’re satisfied, click Flash to commence writing the Android disk image.

Install Android on the Raspberry Pi with Etcher

Wait for writing to finish—Etcher will inform you when the process is complete—then eject the SD card. Insert it in your Raspberry Pi, then boot up.

On the first run, it may take for Android a little while to load. Once running, if you have a keyboard and mouse to hand, set up Wi-Fi. If not, connect your Raspberry Pi to your network by using an Ethernet cable hooked up to your router.


Following installation and a successful boot, LineageOS will require basic configuration. This will just be the usual stuff: set country, time zone, etc.

Step 2: Prepare Android TV for Google Apps

Your Raspberry Pi is now running Android. This is a version based on AOSP which means that no Google apps are installed. Instead, you will need to do this manually.

You should have already downloaded the GApps package to your PC. Visit and select:

  • ARM
  • 8.1
  • Pico

(It’s tempting to select the Android TV option rather than Pico—don’t. This is simply a larger file, and doesn’t really do anything other than cause problems down the line.)


Select Download, then when the GApps file is saved to your PC, copy it to your USB flash stick. Safely remove this and insert it into your Raspberry Pi.

Next, on LineageOS, open the app drawer and select Settings > System > About tablet. Here, scroll down to Build number and click it repeatedly. Eventually, this will add the Developer options menu to the previous screen.

Click back until you’ve exited the Settings app, then reopen it and navigate to System > Developer options. Select Root access and choose the Apps and ADB option, clicking OK when the warning is displayed.

Next, scroll down to Local terminal and enable the app. This gives you local shell access, which means you can enter commands via the keyboard.

Head back to the app drawer, where you will find the Terminal app. Click to open and Allow the app permissions to access your device.

Next, enter the superuser command:


A Privacy Guard warning box will appear. Check Remember my choice (to ensure future permission for what you’re about to do) and then Allow.

Next, enter the command

This loads the recovery script. Enter the reboot command to launch it.


The Raspberry Pi will boot into the TWRP recovery console. Here, select Install, then Select Storage to choose your USB flash device.

Select your USB device to install GApps

Select the GApps file, then Install Zip, and in the next screen check Reboot after installation, then Swipe to confirm Flash.

Flash Google Apps GApps package on Raspberry Pi

When the device reboots, you should be able to access the Play Store.

Step 3: Configure Your Android TV Interface

So far, you’ll notice that the interface on LineageOS on your Raspberry Pi basically looks like Android, not Android TV. To change this, you’ll need a launcher.

Several are available; we used an ad-supported launcher, ATV Launcher Free from the Play Store. Simply sign in with your usual Google account, search for it, and install. (Note that your initial sign-in to the Play Store will take a few moments to complete thanks to verification steps.)

Android TV Launcher running on Raspberry Pi

With the interface sorted, you’ll need to add some useful media apps. Things like YouTube, Plex, Amazon Prime Video, Kodi, and more work, and are all available on Google Play. Simply install these as usual to get the benefit of your existing subscriptions.

Note: Performance of these apps has proven mixed at best. For the best results, stick to YouTube. If you’re looking for other apps, research to find the best versions to install.

Step 4: Controlling Android TV on Raspberry Pi

With everything up and ready, you will probably want to disconnect your mouse and keyboard in favor of something lightweight. Several remote options are available for the Raspberry Pi, which should work with Android TV.

One option is the Mini Wireless Keyboard/Air Remote Control which is combination device with configurable LED backlight.

Mini Wireless Keyboard/Air Remote Control Mini Wireless Keyboard/Air Remote Control Buy Now On Amazon $18.99

Alternatively, you might prefer the iPazzPort Wireless Mini Keyboard with Touchpad. This combines the keyboard and touchpad along with a D pad and media controllers into one unit.

iPazzPort Wireless Mini Keyboard with Touchpad iPazzPort Wireless Mini Keyboard with Touchpad Buy Now On Amazon $13.99

Both devices are wireless and ship with a dedicated Wi-Fi dongle specifically keyed to remote controls.

Enjoy Your Media With Android TV on Raspberry Pi!

By now you should have a Raspberry Pi 3 or later pumping out videos and music using the LineageOS with an Android TV user interface. To all intents and purposes, you have an Android TV box!

Admittedly, you may run into trouble with performance, so ensure your microSD card is up to scratch. Also, check you’re using an approved Raspberry Pi power supply. This will ensure the Pi gets the power it needs without risking undervoltage and microSD card corruption.

Like the feel of Android TV but aren’t getting the best results? Consider our list of the best Android TV boxes The Best Android TV Box for All Budgets Android TV boxes are a great way to add smart features and streaming to any television. Here are the best Android TV boxes. Read More .

Related topics: Android TV, Cord Cutting, Raspberry Pi.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Natan
    June 12, 2020 at 8:05 pm

    Guys, the apps that are requiring root access were tested by you? I'm seeing a lot of articles and YT videos teaching how to make a DIY Android TV, but none are talking about the security issues with it.
    I think that you should be concerned of telling people to install unverified applications on a computer in their homes.

  2. ooooo
    May 20, 2020 at 9:22 am

    it always reboots back into twrp.
    How to reboot normally?

    • Basil Ruys
      May 22, 2020 at 12:12 pm

      AYou can execute the same script in TWRP terminal (Advanced->Terminal) if you have boot and system partitions mounted (Mount->Boot & Mount->System): boot

  3. Liton
    April 20, 2020 at 2:00 pm

    hi has anyone managed to get a IR remote or something similar to work with the Raspberry Pi as in turning it off and controlling the features

  4. Kevin
    April 8, 2020 at 10:48 pm

    Installed Lineage OS 16.x with Android 9, Gapps, and finally IPTV Smarters pro on a Rpi3.
    It took ages to install, also to boot the os. Every single click is a pain in the a** as you have to wait between 15 sec and 2 minutes to see something finally happen (not to mention the numerous "app is not responding" messages). Even when you disable all unneeded apps, it's still too slow.
    Video quality is between a dvd and a poorly encoded bluray (when connected by ethernet), and between vhs and dvd when connected by wifi.
    After one full day trying lots of things to speed up the rpi... I finally gave up, went to amazon and bought an android tv box.
    It may be fun for the challenge to give it a try, but nothing more.

    • Natan
      June 12, 2020 at 8:07 pm

      thanks for sharing.
      I would like to warn you about the danger of installing unverified apps in your raspberry. We don't know what have inside those apps.

  5. ShadowDNE
    February 2, 2020 at 5:43 pm

    It's really slow. Don't waste your time installing it. !!

  6. Thabzzz
    January 8, 2020 at 9:52 pm

    It's too slow, way too slow.

  7. Ale
    August 27, 2019 at 12:49 pm

    One word to describe this "thing": AWFUL.
    Slow as hell; low quality even with a FHD-TV and a 60Mbs network; works only wifi and not with ethernet.
    Slow as hell, slow as hell, slow as hell!!!

    This is NOT Android TV box, but this "thing" is Android FOR TV, on TV.

    A lot of better alternative, faster and stabler and better than this one, are available since years. I do NOT reccomand this one. Wasting your time. At the end of this "thing", you will only want to eject your MicroSD and format it. And i bet, you will do it! ;)

    • Luca
      October 23, 2019 at 1:08 pm

      Don't install gapps even the author of this script says that it will make it so slow. Just use an alternative app store

  8. Matrx
    August 2, 2019 at 5:54 pm

    After step 2 it reboots back into twrp.

    • eli
      August 3, 2019 at 1:23 pm

      same here

    • tmt
      August 8, 2019 at 4:56 am

      same here.

      • Dangustown
        August 11, 2019 at 5:01 am

        Same as well.

        • Stanislav
          February 9, 2020 at 6:13 pm

          same here!

    • s4w
      August 11, 2019 at 10:11 pm

      same here

      • Bentcircuit
        August 18, 2019 at 1:37 am


        Wonder how many user hours the writer of this article wasted, and what he got paid for doing it.

    • Joe
      August 20, 2019 at 8:10 pm

      Same here. Enough time wasted.

      • jankys
        September 17, 2019 at 1:55 pm

        Q: How to boot out of TWRP recovery?
        A: You can execute the same script in TWRP terminal (Advanced->Terminal) if you have boot and system partitions mounted (Mount->Boot & Mount->System): boot

    • Snyper
      August 23, 2019 at 10:23 am
  9. Alberto
    August 1, 2019 at 6:54 am

    Just use LibreELEC

  10. dbinott
    July 31, 2019 at 5:32 am

    This is not Android TV, this is Android on TV. Android TV is not open source.