I turned my non-smart TV into an Android TV with Raspberry Pi — here’s how you can too

I watch TV and films primarily from streaming companies, however one in every of my televisions lacks the good options you discover on Roku or Android TV. Regardless of its lack of good options, that TV works nice, so I turned it into an Android TV slightly than shopping for a brand new one. I pulled it off utilizing a Raspberry Pi 5, and so are you able to. Right here’s methods to do it.



Associated
5 obscure Raspberry Pi operating systems that deserve more love

Boost your Raspberry Pi recreation with these cool distros

Android TV in your Raspberry Pi: what you’ll want

You may flip your Raspberry Pi into an Android TV field in a number of methods. One method is to install Emteria OS, then obtain the apps you want and a extra TV-friendly launcher. Nonetheless, the free model of one of the best Android TV launcher hasn’t been up to date in fairly a while.

Happily, KonstaKang has up-to-date builds of Lineage OS, one other Android distribution, with a very good launcher already put in. It’s unofficial and is taken into account beta high quality. The official Lineage OS workforce received’t provide any assist.

So, let’s get began putting in Android TV on our Raspberry Pi. You’ll want a Raspberry Pi 4B or 5, which I like to recommend has 8GB of reminiscence. You’ll additionally want a microSD card with at the least 32GB of free house, however extra is all the time higher.


First, obtain the required information from KonstaKang’s website. Then, choose the Raspberry Pi mannequin you will have from the Gadgets dropdown menu after which LineageOS 21 Android TV. Don’t obtain the TWRP flashable OTA package deal until Android TV is put in.

Whereas on the web page, scroll down and obtain any extra information you assume you want. You’ll undoubtedly need KonstaKANG-rpi-resize.zip, as a result of flashing the Android TV picture to the micro SD card will depart lots of space for storing unallocated. Different packages I like to recommend downloading are:

Bundle

What it does

Widevine 14

Permits you to stream DRM-protected content material from streaming companies like Google Play, YouTube, Netflix, and extra.

Magisk

Supplies a simple path to root entry.

MindTheGapps

Installs Google Play apps and companies.

Putting in the Android TV picture to your Raspberry Pi

You’ll want to jot down the LineageOS picture to your microSD card to get began. Insert the cardboard into your SD reader, launch the Raspberry Pi Imager app, and comply with these steps.


  1. Click on Select Machine and choose your Raspberry Pi mannequin.
    RPi Imager Choose Device
  2. Subsequent, click on Select OS > Use customized. Select the LineageOS zip file you downloaded earlier.
    RPi Imager Use custom OS
  3. Click on Select Storage, then choose your micro SD card.
  4. Now, click on Subsequent > No, then affirm you need to erase the micro SD card and write the Android TV picture.

Copy the opposite zip information to your microSD card as soon as the picture is flashed. That means, they’ll be available once you want them. Insert the microSD card into your Raspberry Pi, plug it into your TV, and energy it up. You may additionally need to join a keyboard and mouse for the preliminary setup.


First steps with Android TV in your Raspberry Pi

After your Pi boots, the very first thing you are able to do is join a recreation controller. It will show you how to navigate Android TV till you get a distant arrange. If you happen to don’t have a controller to attach, press F1 on the keyboard to exit the pairing course of.

AndroidTV pair bluetooth controller

KonstaKang’s LineageOS distribution helps different keyboard shortcuts, too.

Keyboard key

What it does

F1

Return to Android TV Dwelling display screen

F2

Return

F3

Multitasking menu

F4

Menu

F5

Energy

F11

Quantity up

F12

Quantity down


Subsequent, we have to allow superior reboot choices to entry the TWRP Restoration Software. To take action, navigate to Settings (gear icon) > System > Buttons and allow Superior Restart.

We have to reboot into TWRP Restoration and set up any additional software program required.

TWRP Recovery Main Menu

  1. Select Settings > System > Energy and Power > Restart > Restoration.
  2. Click on Set up. If you happen to copied the packages to the micro SD card, they are going to be within the boot folder.
  3. At all times run KonstaKANG-rpi-resize.zip first to reclaim the unallocated space for storing in your micro SD card. Reboot to restoration when you have extra to put in; in any other case, reboot to the system.
  4. Set up another packages you need, reminiscent of Widevine 14, Magisk, or the Google Apps package deal.
  5. If you happen to’ve put in Google Apps, make sure you select Wipe > Manufacturing unit Reset after set up finishes.
  6. Lastly, reboot to system.


Doing extra with Android TV in your Raspberry Pi

If you happen to’ve put in Google Apps, your new Android TV field will immediate you to log in to your Google account when it boots up. This offers you entry to your complete Google Play Retailer, the place you’ll be able to obtain apps and purchase or hire music, motion pictures, or TV reveals.

As of this writing, Netflix is just not obtainable on the Android TV Google Play Retailer. You may, nevertheless,
find it on APKPure
.

You can even customise it additional, reminiscent of connecting an IR distant, configuring a bodily energy button, organising SSH, and extra.

Connecting an IR distant

You probably have an IR distant that’s Android TV-compatible, you’ll be able to set it up in Settings. Allow it in Settings > System > Raspberry Pi settings > Infrared distant.


To arrange key mapping for the distant, see the FAQ on KonstaKang’s net web page in your machine. I selected simply to make use of my Xbox controller, which works very properly. For an Xbox controller, the button features on Android TV are as follows:

Controller button

What it does

Xbox button

Return to Android TV Dwelling display screen

Left stick or D-pad

Navigate up, down, left, proper

Proper stick up/down

Quantity management

Proper stick left/proper

Channel management

A button

Choose an choice

B button

Again to earlier display screen

Press and maintain B button

Exit app


Enabling SSH entry to your Android TV field

Many of us like to have the ability to SSH into their Android TV field for upkeep, putting in functions, or in any other case managing the system and information. Android doesn’t have person accounts with passwords, so it makes use of key-based authentication with SSH as a substitute. While you first boot your Android machine, it generates the required keys. You may both pull the non-public key to your laptop or push your individual beforehand generated keys to the machine.

To perform this, you will use the Android Debug Bridge command line instruments. If you happen to’ve put in Android Studio, these instruments are already in your laptop. If not, you’ll be able to obtain the command line tools directly and set up them.

As soon as the ADB instruments are put in, you’ll be able to connect with your Raspberry Pi Android TV to get your SSH keys. First, discover your Android TV’s IP deal with at Settings > System > About > Standing > IP deal with. For this text, I’m utilizing 192.168.0.100. Additionally, be certain that to allow Android debugging and rooted debugging below Settings > System > Developer choices. With that info, subject these instructions.

  1. Hook up with your Raspberry Pi Android TV:
    adb join 192.168.0.100
  2. Authenticate as root:
    adb root
  3. Subsequent, obtain your SSH keys:
    adb pull /information/ssh/ssh_host_ed25519 key myprivatekey
  4. Set the right permissions on the important thing to make sure your safety:
    chmod 600 myprivatekey
  5. As soon as completed, you can SSH into your Android TV with this command:
    ssh -i myprivatekey root@192.168.0.100


When you’re completed retrieving your non-public key, it’s best to disable adb.

Connecting a bodily energy button

Whereas the Raspberry Pi 5 has an influence button, earlier fashions don’t. You may make your individual by connecting an influence button to the GPIO header in your Pi. Simply join it to floor and GPIO 21 (proper subsequent to floor).

To allow the ability button, toggle Settings > System > Raspberry Pi settings > Energy button. If obligatory, you should utilize the identical button to entry TWRP Restoration by urgent and holding it whereas powering on the machine till you see the TWRP display screen.

Take pleasure in your new Android TV field

You need to now have a working Android TV set up in your Raspberry Pi. If you happen to put in the Google Apps, you even have the Google Play Retailer and all that comes with it. After all, you may also install APK packages directly or use a special app retailer, like F-Droid or APKPure. Now, all that you must do is sit again and luxuriate in your new leisure choices.

Sensi Tech Hub
Logo