keyboard_arrow_left Back to the overview

Install LineageOS on
Banana Pi M5

m5

Basic requirements

  1. Read through the instructions at least once before actually following them, so as to avoid any problems due to any missed steps!
  2. Make sure your computer has adb and fastboot. Setup instructions can be found here.
  3. Enable USB debugging on your device.
  4. Boot your device with the stock OS at least once and check every functionality.
  5. LineageOS is provided as-is with no warranty. While we attempt to verify everything works you are installing this at your own risk!

Preparing for installation

This generation of Amlogic devices come with a unique boot mode called “Burn Mode”. aml-flash-tool is Radxa’s wrapper script for Amlogic’s official update tool for interfacing with burn mode on recent Amlogic devices. aml-flash-tool is only available for Linux. It will run perfectly fine in a VM.

Flashing the initial image and firmware using update

  1. Download aml_upgrade_package.img file from here.
  2. Power off the device, and boot it into burn mode:
    • Press and hold the SW5 button on the board, and plug into your PC.
  3. Download and install aml-flash-tool:
    git clone https://github.com/radxa/aml-flash-tool.git && cd aml-flash-tool && ./INSTALL
    
  4. Flash the downloaded image file to your device by running (replace <aml_upgrade_package.img> with the actual filename!):
    sudo ./aml-flash-tool.sh <aml_upgrade_package.img>
    
  5. The script will flash the firmware and boot directly into an outdated but functional version of LineageOS. Please proceed with the installation instructions to complete the installation process.

Installing LineageOS from recovery

  1. Download the LineageOS installation package that you would like to install or build the package yourself.
    • (Optionally): If you want to install an application package add-on such as Google Apps (use the arm architecture), please read and follow the instructions on Google Apps page
  2. If you are not in recovery, reboot into recovery:
    • Run adb reboot recovery.
  3. Now tap Factory Reset, then Format data / factory reset and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one).
  4. Return to the main menu.
  5. Sideload the LineageOS .zip package but do not reboot before you read/followed the rest of the instructions!
    • On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
    • On the host machine, sideload the package using: adb sideload filename.zip.

Installing Add-Ons

  1. Repeat the sideload steps above for all desired packages in sequence.

All set!

Once you have installed everything successfully, you can now reboot your device into the OS for the first time!

  • Click the back arrow in the top left of the screen, then “Reboot system now”.

Get assistance

After you’ve double checked that you followed the steps precisely, didn’t skip any and still have questions or got stuck, feel free to ask on our subreddit or in #LineageOS on Libera.Chat.