How To Install Android On Raspberry Pi 4?

There’s no denying the fact that Android is one of the best open-source operating systems out there. What makes Android special is its flexibility, allowing it to run on multiple platforms with a little tweaking here and there. Thanks to that, you can also run Android on Raspberry Pi, the tiniest personal computer you can own. In this article, let’s look at how to install Android on Raspberry Pi 4 using LineageOS 17.1.Before we get started here’s a list of things that you’ll need.One of the great things about Raspberry Pi is you don’t need to worry about bricking it, unlike Android devices. Even if something goes wrong, you’ll end up damaging your SD card. Thankfully, SD cards are cheap.How To Install And Run Android On Raspberry Pi 4?This is an Unofficial LineageOS build. Hence, you’ll not receive OTA updates.Getting the SD card readyInsert the micro SD card into the SDHC adapter or USB reader and plug it into the PC. Download Balena Etcher on your Windows or Linux PC and install it. (Download link is in the above section)To install Balena Etcher on WindowsDownload the Balena etcher setup, .exe file from the official website. Double click to run the installer after the download’s finished. The installation wizard will install Etcher for you.To install Balena Etcher on LinuxDownload the .zip file from the official website. Find it in the directory and unzip it using a built-in archive tool or using the command sudo unzip balena-etcher-electron-x.x.xxx-linux-x64.zip where “x.x.xxx” is your version number. Running the app imageUnzipping the file will reveal an app image. Before double-clicking on it, right-click on the image, and click on Properties. Then, in the Permissions tab, check the “Allow executing file as a program” checkbox. Open the app imageNow, double-click on the app image, and that’s it. If nothing happens, open the terminal, navigate to the directory where the app image is, and type the command sudo ./balena-etcher-electron-x.x.xxx-linux-x64. Replace the x.x.xxx with the version that you downloaded.In my case, the image was on the desktop. Unzip the LineageOS 17.1 zipExtract the LineageOS 17.1 image file from the zip file. On Windows, you can do this by using WinRAR, or, on Linux, you can use the sudo unzip “name of the file”.zip command.Select the image to flashIn Etcher, click on the “Flash from file” option. Now, select the LineageOS zip from the directory, and finally, click “Open.” Select the targetNext, click on the “Select Target” button and then select the target device, which, in my case, is the first option and finally, click on “select.” Get, set, flash!Click on the “Flash” button. The flashing process might take around 15 minutes so, sit back and relax.Setting up the Raspberry Pi 4Connect the micro HDMI cable, Type-C, and USB peripherals to your Raspberry Pi 4. Connect the full-size HDMI to the monitor. Insert the SD card. Use the Pi in a case and do not touch the Pi with bare hands as it might short-circuit.Boot into LineageOSYour Pi should now boot into LineageOS, and you’ll be greeted with the LineageOS splash screen. Select the language, date, time, and connect to a Wi-Fi network. You’re pretty much done with the installation process.Raspberry Pi Android Gapps InstallationYou’ll have to install the Google play store and the Play services by flashing a Gapps (Google Apps) package. First, download the zip file from here. Make sure to download the pico version of Gapps. The lower the package size, the faster the flashing process will be, and the chances of flash success will also be high.Pico package comes with Play services and Play store. Hence, you can install all the apps from the Google play store later.Open the Settings app. In the search bar, type “build,” and from the list of search results, find and click on the build number. Click on the “build number” seven times until you see a toast that reads, “You’re now a developer.” Now go back to settings and type “Developer” in the search bar. From the search results, find and click on the “Developer options.” In the Developer options, find and toggle on “Root access.” Finally, find and toggle on “Local terminal.” Booting Into TWRPNow, in the app menu, find and fire up the Terminal. If you don’t find it, reboot your Raspberry Pi. In the terminal, type the following commands.su //To enter the rest of the commands as a super user
rpi4-recovery.sh // To boot into recovery on the next rebootYou’ll see this.Mounting partitions…
Changing ramdisk…
Unmounting partitions…
Done, reboot device!
:/ #Now, type the reboot command and press enter.rebootYour Raspberry Pi 4 will now boot into TWRP recovery. I’ve comprehensively explained what is Rooting and how to install a custom recovery in my other articles so, do make sure to check them out (Psst. Follow these guides with caution. One mistake and your Android device will be as good as dead).After your Pi boots into recovery, “swipe to allow modifications.” Now you’ll be back to TWRP’s home section. Click on the install option. Navigate to the directory where you downloaded the Gapps Pico package, click on it, and finally, “swipe to flash” the zip. Now, go back, click on reboot, and click on “system.”Your Raspberry Pi 4 should now boot into LineageOS. Check the app menu, and voila! You should now have Google play services and Play store installed.My Thoughts On The BuildI tested out this build for almost an entire day and found it to be fairly stable. I did experience random reboots a couple of times but, overall, this build can be used as a daily driver. The only thing that’s missing is hardware encoding (software encoding is present).The apps that I tested were:YouTubeGmailSlackRedditCloudfare’s 1.1.1.1Google ChromeVia BrowserGoogle photosSpotifyCastroEvery app except Reddit and Brave worked well. The Pi 4B also handled 720P 30/60fps videos well on YouTube with minor frame drops here and there.The internet speeds were decent. On our 50 Mbps connection, we got an average speed of 32 Mbps after four runs.Coming to Geekbench 5, the scores were nowhere near to even 2-3-year-old mid-range devices like the Redmi Note 7, which was powered by the Snapdragon 660. The Pi put up a respectable single-core score of 237 and a multi-core score of 587.Browsing the web on Chrome was a breeze. There were few occasional hiccups but, that’s acceptable for Pi’s hardware. With around five tabs of chrome, settings app, and Google Photos running in the background, the average RAM consumption was around 2GB.Overall, the experience was better than average for an unofficial build. This build was brought to you by developer KonstaaT so, do make sure to check out his Github profile.Want to install Ubuntu instead? Do make sure to check out our how to install Ubuntu MATE on Raspberry Pi article.FAQsCan a Raspberry Pi run Android smoothly?If you own a Raspberry Pi 4B, you’ll have no issues running Android. However, the OS will severely lag on other RPI boards, and you’ll not have a pleasant experience.Is 4GB enough for Raspberry PiYes. For the most part, 4GB RAM is sufficient for daily use but, if you’re planning to do a lot of multi-tasking with Chromium and other apps, you might want to consider the 8GB variant.Is Raspberry Pi 64-bit?Yes, it is. The Broadcom BCM2711 SoC is a 64-bit SoC which is a quad-core chip with ARM’s Cortex-A73 cores. Hence, you can install any 64-bit OS.How do I change the OS on my Raspberry Pi 4?It’s quite simple. Head over to the OS’s website, read the flashing instructions, download the OS image, and flash it on the card using Raspberry Pi Imager.