Turn Your Raspberry Pi into an Android Smart TV with These Easy Steps!

A step-by-step guide to install Android TV on Raspberry Pi and transform it into a smart home entertainment center. …


Updated October 3, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


A step-by-step guide to install Android TV on Raspberry Pi and transform it into a smart home entertainment center.

Are you looking to turn your Raspberry Pi into an Android smart TV? Well, look no further, because in this article, we will show you how! By following these simple steps, you can easily turn your Raspberry Pi into a powerful media streaming device capable of running Android TV. Let’s get started!

Requirements

Before we begin, make sure that you have the following:

  1. A Raspberry Pi 4 Model B or newer (with at least 2GB RAM).
  2. An SD card with a minimum of 8 GB capacity and an adapter to connect it to your computer.
  3. A Micro USB power supply for the Raspberry Pi.
  4. A Micro HDMI cable to connect the Raspberry Pi to your TV or monitor.
  5. An internet connection on your Raspberry Pi (Ethernet or Wi-Fi).
  6. Patience and a little technical knowledge.

Preparing the SD Card

First, you need to format the SD card with an image that supports hardware acceleration. We recommend using the latest version of Raspbian Lite. Download it from the official Raspberry Pi website.

  1. Insert the SD card into your computer and use a tool like Etcher to flash the Raspbian Lite image onto it.
  2. Once the process is complete, open the SD card in your file explorer (Windows) or Finder (Mac).
  3. Create a new folder named “kernel” on the root directory of the SD card.
  4. Download the latest version of the Raspberry Pi VideoCore IV kernel and extract it into the “kernel” folder.
  5. Create a new file named “config.txt” in the root directory of the SD card if it doesn’t exist already, then open it with a text editor.
  6. Add the following lines at the end of the file:
arm_freq=1000
gpu_mem=256
disable_overscan=1
hdmi_force_hotplug=1
config_hdmi_boost=5
  1. Save and close the file.
  2. Download the latest version of the raspberrypi-kernel-mods package, extract it into a new folder on your desktop.
  3. Copy the “modules” and “lib” folders from the raspberrypi-kernel-mods package to the root directory of the SD card.
  4. Eject the SD card and insert it back into your Raspberry Pi.

Enabling Hardware Acceleration

Now that the SD card is ready, we need to enable hardware acceleration on the Raspberry Pi to make Android run smoothly.

  1. Power on your Raspberry Pi and connect it to your TV or monitor using the Micro HDMI cable.
  2. Log in with the default username “pi” and password “raspberry”.
  3. Open the terminal and update the system:
sudo apt-get update && sudo apt-get upgrade -y
  1. Install the required dependencies:
sudo apt-get install -y xorg libgl1-mesa-dri git unzip libdrm-dev build-essential python3-dev
  1. Reboot the Raspberry Pi:
sudo reboot
  1. After the reboot, open the terminal again and clone the vc4-kms-driver repository:
git clone https://github.com/raspberrypi/linux.git
  1. Change directory to the cloned repository:
cd linux/
  1. Checkout the latest version of the driver:
git checkout origin/rpi-4.19.y
  1. Compile and install the driver:
KERNEL=kernel7
make -C $KERNEL ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2835-rpi-4-buster
sudo make -C $KERNEL ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=../modules/ install modules
  1. Create a new file named “99-v3d.conf” in the “/etc/modprobe.d/” directory:
sudo nano /etc/modprobe.d/99-v3d.conf
  1. Add the following lines to the file and save it:
options v3d mali_debug=0
blacklist sunxi-mali
  1. Reboot the Raspberry Pi again:
sudo reboot

Installing Android TV

Now that your Raspberry Pi is ready, let’s install Android TV on it.

  1. Download the latest version of Android TV for Raspberry Pi.
  2. Extract the downloaded ZIP file to your home directory:
unzip ~/Downloads/android-tv-*.zip -d ~/android-tv
  1. Change directory to the extracted folder:
cd ~/android-tv
  1. Run the install script:
sudo ./install
  1. Follow the on-screen instructions and wait for the installation process to complete (it may take several minutes).
  2. Once finished, reboot your Raspberry Pi:
sudo reboot

Setting up Android TV

After the installation is complete, you can access Android TV’s settings by pressing the “Menu” button on your remote or keyboard. Here are some useful options to configure:

  1. Display: Set the resolution and overscan parameters according to your TV.
  2. Sound: Configure the audio output (HDMI, analog, or both).
  3. Network: Connect your Raspberry Pi to Wi-Fi if you want to access Android TV without a cable.
  4. Apps: Install your favorite streaming apps like Netflix, YouTube, or Prime Video.
  5. Settings: Customize the home screen and other options according to your preferences.

Conclusion

Congratulations! You have successfully installed Android TV on your Raspberry Pi and turned it into a powerful smart media streaming device. Now you can enjoy movies, TV shows, music, and more on your big screen. Just remember that hardware acceleration is crucial for smooth performance, so make sure to follow the steps carefully and choose a high-quality SD card.