39 C
Sunday, April 11, 2021

How To Install Android On Raspberry Pi 4?

Must read

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.

  1. Getting the SD card ready

    Insert 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)

  2. To install Balena Etcher on Windows

    Download 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.

  3. To install Balena Etcher on Linux

    Download 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.

    balenae etcher run command

  4. Running the app image

    Unzipping 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.

    allow executing as a program - how to install android on raspberry pi 4

  5. Open the app image

    Now, 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.

  6. Unzip the LineageOS 17.1 zip

    Extract 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.

  7. Select the image to flash

    In Etcher, click on the “Flash from file” option. Now, select the LineageOS zip from the directory, and finally, click “Open.”

  8. Select the target

    Next, 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.”

    select target - how to install android on raspberry pi 4

  9. Get, set, flash!

    Click on the “Flash” button. The flashing process might take around 15 minutes so, sit back and relax.

  10. Setting up the Raspberry Pi 4

    Connect 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.

  11. Boot into LineageOS

    Your 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 Installation

You’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.

gapps pico download sourceforge

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.
    settings app lineage - how to install android on raspberry pi 4
  • In the search bar, type “build,” and from the list of search results, find and click on the build number.
    build number search
  • Click on the “build number” seven times until you see a toast that reads, “You’re now a developer.”
    click on build number 7 times
  • Now go back to settings and type “Developer” in the search bar. From the search results, find and click on the “Developer options.”
    developer options search
  • In the Developer options, find and toggle on “Root access.”
    enable root access lineage
  • Finally, find and toggle on “Local terminal.”
    enable local terminal - how to install android on raspberry pi 4

Booting Into TWRP

  • Now, in the app menu, find and fire up the Terminal. If you don’t find it, reboot your Raspberry Pi.
    app menu terminal - how to install android on raspberry pi 4
  • 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 reboot
Mounting partitions...
Changing ramdisk...
Unmounting partitions...
Done, reboot device!
:/ #
  • Now, type the reboot command and press enter.
  • Your 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.”
    Swipe to allow modifications - how to install android on raspberry pi 4
  • Now you’ll be back to TWRP’s home section.
    twrp home options - how to install android on raspberry pi 4
  • 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.
    gapps nano - how to install android on raspberry pi 4
  • 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 Build

Source link

- Advertisement -

More articles


Please enter your comment!
Please enter your name here

Latest article