You recently purchased a Raspberry Pi, and you want to construct something helpful. First and foremost, don’t panic if you don’t have a separate display. You may set up VNC Connect on the Raspberry Pi to allow remote connections and use your Windows laptop as a monitor for the device. However, a separate monitor or TV is required if you want to use the Raspberry Pi to make an Android TV Box. We have covered every step in this guide for installing Android TV on a Raspberry Pi and obtaining Google Play Store and Services. So let’s get started on that point.
Build Your Own Android TV Box with Raspberry Pi (2021)
Since I wrote this manual with absolute novices in mind, don’t worry if you are unfamiliar with Raspberry Pi. You may use the Raspberry Pi to run your customised Android TV if you follow the instructions. You may easily navigate between sections by using the table below.
1. To set up and install Android TV on a Raspberry Pi, you will need a monitor or TV. This cannot be carried out remotely.
2. Depending on your board, an HDMI cable. While Raspberry Pi 3 needs an HDMI to HDMI cable, Raspberry Pi 4 needs a tiny HDMI to HDMI cable.
3. Raspberry Pi 3 and 4 models must have at least 2GB of RAM in order to work with Android TV.
4. A microSD card with at least 16GB of free space.
5. A mouse and keyboard. Even better is if you have a wireless combination model.
6. An appropriate power adaptor for 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. Extract the Android TV build after downloading it to obtain an IMG file.
2. Launch BalenaEtcher after that, and choose the Android TV IMG file. It’s an Android TV 11 build in my instance, however yours can be different. Next, select the SD card and then click Flash!
3. Remove the SD card from the flashing process and put it into the Raspberry Pi. Connect a keyboard and mouse as well. Finally, attach the HDMI cable to the monitor or TV together with the power supply.
4. The screen will show Lineage OS launching in a matter of seconds.
5. Eventually, you’ll arrive at the basic Android TV home screen. The Google Play Store and Services must now be added to our Android TV. By the way, use the F2 key on the keyboard to return. Additionally, the Raspberry Pi’s Android TV has the following keyboard shortcuts: F1 stands for “Home,” F2 “Back,” F3 “Multitasking,” and F4 “Menu.” Keep pressing. F5 opens the power menu, F11 lowers the volume, and F12 raises it.
Install Google Play Store and Services on Your Custom Raspberry Pi Android TV Box
1. Add support for Google Play Store and other services now that Android TV has been installed on the Raspberry Pi.
Use a thumb drive to transfer the GApps package (a ZIP file) from your computer to the Raspberry Pi.
2. Open Settings -> Device Preferences -> About -> after moving the GApps package. To access theBuild menu, scroll down. Now, repeatedly click on the Build menu 7–8 times. On Android TV, it will activate Developer Options.
3. Scroll down in Device Preferences after returning there. There are Developer Options available. Launch it.
4. Activate Advanced Reboot here.
5. Next, visit Settings -> Device Preferences -> Reboot -> Recovery to restart Android TV on the Raspberry Pi. You will reach TWRP Recovery by doing this.
6. You will now enter TWRP recovery mode. Click on Swipe to Allow Modifications if requested. Next, run openInstall.
7. Select the GApps package that we downloaded to the Raspberry Pi in this box.
8. To confirm Flash, click onSwipe.
9. To access the main menu, click the TWRP icon in the top-right corner of the screen. This time, swipe to Factory Reset from Wipe.
10. Click Reboot on the same page after the reset is finished.
11. Suddenly, your Raspberry Pi will boot into Android TV. And this time, the Google Setup window will pop up. Follow the instructions that appear on the screen right away. As Google has recently been cancelling accounts for unidentified policy infractions, I will advise you not to add your primary Google account. Press Esc on the keyboard if a popup asking you to set up a remote appears. Additionally, use the remote option for on-device login if you have a problem during Google login.
Fix Chromecast on Raspberry Pi-based Android TV Box
12. So, this is all. On your Android TV powered by a Raspberry Pi, Google Play Store, Chromecast, and all other Google services are available and functioning flawlessly. If apps like Netflix are not available or Chromecast is not working, use the below fix.
1. You shouldn’t be concerned if Chromecast on your Raspberry Pi isn’t working. Your customised Android TV can be manually added to Google’s list of approved devices. Install the Device ID app by Evozi from the Play Store or APKMirror first on the Raspberry Pi. You must sideload this software because it is not available in the Play Store on Android TV.
2. After that, launch the Device ID app, which will then show the Google Service Framework code (GSF). You may copy the code by clicking it.
3. Next, use the same Google account that you used on the Raspberry Pi to sign in to opengoogle.com/android/uncertified on your PC or Raspberry Pi. Paste the GSF code after that, then click “Register.” Finally, you have completed it. Wait 5 to 10 minutes, and Chromecast should now function.
4. Restart your Android TV powered by the RPi if you’re still having problems. While holding down the F5 key, select Restart. Chromecast ought to function properly this time.
5. Go to Settings -> Device Preferences -> Raspberry Pi Settings to further personalise your Android TV powered by a Raspberry Pi.
Install Android TV on Raspberry Pi to Make Your TV Smart
6. You may also upgrade your Raspberry Android TV setup by adding an IR remote. Simply turn on the Infrared remote toggle to start controlling Android TV with your IR remote. Go to the developer sdocumentation for further details.
Thus, you may use a Raspberry Pi as an Android TV Stick or Box by installing Android TV in this manner. Although the installation process takes a while, once it’s set up, everything functions as intended. Even the most recent Android 11 build, which I tested, performed flawlessly. So feel free to give it a go.