How to Install Android TV on a Raspberry Pi with LineageOS

Maybe by now you already have a multimedia device with Android TV or, better yet, a television with Android TV, but if you like strong emotions, you want to have a good time distracted and you have a Raspberry Pi 3 or Pi 4 at home, you will like this guide. Today we are going to teach you how to mount your own multimedia device with Android TV using the famous development board.

Details to be considered

Install Android TV on a Raspberry Pi with LineageOS

The whole process requires a couple of installations and the execution of some other command from the Android terminal, so you better arm yourself with patience and follow the steps with ease. If everything goes as planned, you will end up with a small device with which you can turn any television into a very complete Smart TV.

The performance offered by the Raspberry Pi may not be as expected, so we recommend doing it with a RaspBerry Pi 4 with 4GB of RAM, since the management of the services will be much more fluid than with other versions of the development board.

What I need?

  • A Rasberry Pi 3 or Raspberry Pi 4
  • A microSD card of at least 16 GB
  • A pendrive
  • A LineageOS image for Raspberry Pi 3 or Pi4 depending on your model
  • The OpenGApps package
  • The Etcher app
  • Installing LineageOS

The first thing we will have to do is install Android on the RaspBerry Pi, and for this we will be based on LineageOS, an operating system based on that of Google that leaves us the Raspberry Pi perfectly configured to work immediately. The problem is that this will not be enough for it to do the functions of Android TV, so we will have to install additional packages so that everything is perfectly.

Installing LineageOS on Raspberry Pi

LineageOS Rasp

We start by installing LineageOS on our micro SD card. This is what you will have to do:

  • Download the LineageOS version that corresponds to your version of Raspberry Pi and unzip the zip to get the .img image inside. If you are going to use a Raspberry Pi 3, download the version based on Android 8.1 (LineageOS 15.1) . If instead you have a Raspberry Pi 4, download the Android 9 version (LineageOS 16) .
  • Record this image on your microSD card with the help of Etcher. You just have to choose the image location and the destination drive where the data will be recorded. Remember that this destination drive (your microSD card) will be completely erased.

Etcher

You have already installed LineageOS on the microSD card. Now enter it in your Raspberry Pi and let’s start the system. The startup process will take a few minutes to complete. Once we are on the home screen, we will complete the configuration by selecting the time zone, language and other aspects.

How to install GApps

We already have a Raspberry Pi with Android functions, however, we still have to turn it into a full Android TV device, and for this we need to install Open GApps . This pack of applications will transform the installation into a fully functional Android version, so we will have to install it to achieve our goal.

Of course, we will have to take into account a couple of factors, and that is that the Raspberry Pi 3 due to its performance, could have problems if we install the Android TV package in full. To avoid a malfunction, we will select the pico package , and if instead you have a Raspberry Pi 4, you can select the tvstock package . The installation process is similar, so you will not encounter problems in the following points:

  • Download the package that best suits you for your Raspberry Pi, always in ARM version:

Open GApps

  • Save the zip on a USB memory.

LineageOS Rasp

  • Activate developer mode in LineageOS. To do this, press the Build Number option 7 times in Settings> Tablet Information.
  • With developer mode unlocked you will need to enable root administrator access (Apps and ADB) in Settings> Developer Options.
  • Also activate the local terminal in the option that you will find below.

LineageOS Rasp

  • Connect the USB memory that you previously saved the .zip to.
  • Open Terminal and type the following commands:

# its
# rpi3-recoverty.sh >>>>>> (if you do it from a Raspberry Pi 3)
# rpi4-recovery.sh >>>>>> (if you do it from a Raspberry Pi 4)

  • When the process finishes, type reboot to reboot the system.
  • The Raspberry Pi will now start in recovery mode. In this menu, we will have to choose the install option, and choose the .zip package that we have stored in the USB memory.

GApss Raspberry

  • Then, we will have to restore the factory settings with the Wipe option that you will find in the main menu.
  • And finally, we will restart the Raspberry Pi in the operating system mode, to avoid re-entering the recovery mode. To do this, we will first have to activate the system partition in Mount> System .
  • Then access the Advanced> Terminal menu, and run the following command:

# rpi3-recovery.sh boot (if you do it from a Raspberry Pi 3)

# rpi4-recovery.sh boot (if you do it from a Raspberry Pi 4)

Android TV Raps

The system will restart and you will already have the Android version perfectly working. Remember that if you installed the Pico package for Raspberry Pi, you must install a Launcher to achieve the aesthetic similar to Android TV.