• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[DEV][ROM][UNOFFICIAL] LineageOS 18.1 (Android 11) for Raspberry Pi 4 B

Search This thread


Senior Member
Nov 26, 2016
This is a great achievement!

Been running the latest July ATV version without issue.

UI is very responsive and software decoding is good enough for now. I've migrated my Librelec Kodi config and gone all-in with this.

Thanks KonstaKANG 👍


New member
Dec 25, 2006
Maybe a dummy question. Is it possible to use a connected USB camera as the main camera? Such that Android apps use that camera as default?


Senior Member
Jul 10, 2007
I have just installed LineageOS on my Pi and I have a few questions left after reading the FAQ:

  1. How to enable SSH: I have enabled SSH under "Advanced Settings", "USB debugging", installed the rpi-su-arm.zip and enabled "Rooted debugging". However, when I try to connect I get:
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    unable to connect to

    The IP is definitely correct and online and fastboot and adb works for my phone. Is it because of the different ports?
  2. I have a touch screen attached with a resolution of 1920*1280. I have tried to change the value in resolution.txt, but I only got a white screen afterwards. Changing it back to the default 1920*1080 booted again.

    For my next attempt I added the following in the config.txt:

    [HDMI:0] hdmi_force_hotplug=1 hdmi_drive=2 hdmi_group=2 hdmi_mode=69 aspect_ratio=16:10

    This had no effect and the resolution was still 1920x1080 until I also changed it to 1920x1200 in the resolution.txt - then it worked! So maybe I have to try another option mentioned in the FAQ (under config.txt) to get it exactly right? However, I'm not sure what exactly to change there and where. I tried tvservice -s and other commands under my DietPi installation. Interestingly, only up to 1920x1080 were listed there, but I have confirmed that the correct resolution is 1920x1280 and that it works under Windows.
Thank you in advance for your help!
1. su is not needed, just enable ssh as in readme and add public own key in /data/ssh/authorized_keys
1.a. adb starts on a random port but creating /data/local/userinit.sh helped:
setprop service.adb.tcp.port 5555
adbd stop
start adbd


Senior Member
Dec 14, 2016
I got a new Raspberry Pi 4 and I installed the new version from 07/20. The GPIOs 20, 21 and 26 are working now with this new device. But first I thought, that the volume GDIOs would not work, because no volume sliders appeared, when I clicked volume up or down. A headphone made clear: volume control works via hardware-keys, but the sliders do not appear.

Next: Text to speech is working, but I may not recover the data-partition from the earlier version of LOS. It seems, that there are setting which are not compatible. Thus I have to install everything again.

By the way: my display is now a WaveShare 9inch QLED Quantum Dot Display, Capacitive Touch, 1280×720. Works good out of the box and has great colors. It' not cheap ...


Curious: if I play a notification-sound and while playing press the volume-keys then the volume-slider appears ...
Last edited:


Senior Member
Nov 25, 2018
Samsung Galaxy S4
c’t magazin claims that the only way to achieve reliable SD card operation on a Pi4 is to make the SD card READ-ONLY. Behind a paywall they explain how to set that mode of operation, which can be switched to RANDOM-ACCESS on a manual basis.

I hope to achive fewer ext4-fs corruption by running on minimum CPU clock of 1.5 GHz instead of 2 GHz. Gonna keep you posted in here...

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    hi @KonstaT

    Hope you are doing good.

    I am looking to build a Media Player streamer based on Lineage OS to feed my HiFi system.

    I have few queries before I proceed, I have already ordered parts. Should be here tomorrow.
    1. Do 2 screens work on this OS? one will be a 5 inch 800x480 capacitive LCD touch screen and other will be a 2 inch LCD display 240x320.
    2. I want to display the bit rate and audio details on the second 2inch LCD display. I tried finding how to do this but did not get any results.
    3. Can I keep both screens running all the time ? no timeout.
    4. Will be using a HAT DAC, will lineage OS use all the capabilities from it?
    Will be flooding this thread ask questions and doubts, sorry in advance.
    1, 2 & 3: There's no support for dual-display. Only HDMI displays are supported at this point anyway.
    4. You should be able to use various different DACs with minor modifications. Just commented on this above https://forum.xda-developers.com/t/...aspberry-pi-4-b.4212945/page-12#post-85607465
    I was wondering if there is any support for usb wifi adapters, because the built-in wifi works very badly. I did plug in an adapter that works on libreElec, but doesn't seem to be working on lineage, since nothing happens when plugged in.
    There's no support for external USB wifi/bt dongles.
    Hi all,

    Like many here i would like to thank KonstaT for this build.

    I have flashed his su addon. My question, is there an SuperSU root app to manage root? All apps have root now, or none. Magisk is not working unfortunately.
    There's no root management so you should keep the option disabled at all times when not explicitly needed. Latest LineageOS versions no longer support root as using 'adb root' is preferred instead. Magisk installer can't handle the non-standard boot partition Raspberry Pi uses.
    1, 2 & 3: There's no support for dual-display. Only HDMI displays are supported at this point anyway.
    4. You should be able to use various different DACs with minor modifications. Just commented on this above https://forum.xda-developers.com/t/...aspberry-pi-4-b.4212945/page-12#post-85607465

    Took a while for your reply :( I already had got two displays but using one. But good part is most of the things are sorted.
    And here is my Raspberry Pi Streamer up and running. Sounds so damn good!!!

    An btw @KonstaT, is there any way to test the 5.10 kernel already even if it'll be without Google services for now? It's more a curiosity and excitement thing on my side to see the official touchscreen working with hardware acceleration than anything else :)
    And I may even want to put that into a video for YouTube or something cause that's kind of exciting, at least for me. Been waiting for this to happen for years 👍
    I'm not planning on switching to 5.10 kernel until Android 12. 5.4 is the newest kernel version that AOSP supports for Android 11. 5.10 will be for Android 12.

    Android 12 should be released in few weeks but it probably takes quite some time for LineageOS 19 to mature as well.
    Thank you for ds1307 RTC support!
  • 21
    Here’s my build of LineageOS 18.1 for Raspberry Pi 4 Model B, Pi 400, and Compute Module 4. It is unofficial and unsupported by the LineageOS team. It’s for advanced users only. Pi 4 model with at least 2GB of RAM is required to run this build.

    Important! This image includes parts that are licensed under non-commercial license (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International). You may use this build freely in personal/educational/etc use. Commercial use is not allowed with this build!



    There is also Android TV version available.


    • Audio (HDMI, 3.5mm jack, USB microphones, bluetooth speakers/headsets, etc)
    • Audio DAC (using GPIO DACs e.g. Hifiberry DAC+)
    • Bluetooth
    • Camera (using official Pi camera modules & UVC USB webcams)
    • GPIO
    • GPS (using external USB modules e.g. U-Blox 7)
    • Ethernet
    • Hardware accelerated graphics (V3D)
    • HDMI display
    • I2C
    • IR remotes (using external GPIO IR modules e.g. TSOP4838)
    • RTC (using external GPIO I2C modules e.g. DS3231)
    • Sensors (using external GPIO I2C modules e.g. MPU6050, LSM6DS3 & LSM303DLHC accelerometer/gyroscope/magnetometer)
    • Serial console (using external GPIO serial console adapters e.g. PL2303)
    • SPI
    • Touchscreen/multi-touch (USB touchscreens, Waveshare SPI touchscreens)
    • USB (mouse, keyboard, storage, etc)
    • USB-C (ADB, MTP, PTP, USB-tethering)
    • Wifi
    • Wifi tethering

    Not working:
    • Hardware video decoding & encoding (software decoding & encoding works)

    • Stock camera app is not working - many third party camera apps seem to work
    • SELinux is in permissive mode
    • and more…


    • Peter Yoon and everyone who has contributed to android-rpi
    • Roman Stratiienko and GloDroid project for graphics fixes
    • brobwind for bluetooth fixes
    • Eric Anholt for V3D graphics driver
    • Maxime Ripard for Pi 4 KMS driver
    • Android-x86 project
    • LineageOS team & everyone who has contributed to LineageOS 18.1
    New build.

    -add support for LSM303DLHC accelerometer & magnetometer sensor
    -add separate TWRP flashable su add-on (see FAQ)
    -allow switching display off with power button
    -add support for USB-C (ADB, MTP, PTP, USB-tethering)
    -enable bluetooth tethering
    -add settings option for mouse back button feature
    -update to TWRP 3.5.0_9-0-KonstaKANG
    -update to Mesa 20.3.4
    -update to Linux 5.4.98 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 February 2021 (merged)
    How to install:
    1. Follow the official Raspberry Pi instructions for writing the image to the SD card (Linux, Mac, Windows).


    FAQ is getting quite long and difficult to maintain in several different places. You can find the always up-to-date FAQs here:
    New build.

    -add initial support for HDMI-CEC
    -add built-in VNC server
    -update to Mesa 21.0.2
    -update to Linux 5.4.111 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 April 2021 (merged)
    Does somebody know if there is a noticible performance difference using the 4gb or 8gb ram version? I want do get a RPI4 and attach it to an USB touch screen.
    I only have the 4 gb model so I don't have anything for comparison. I'd say 4 gb is sufficient for running Android on the Pi. What permance gains do you expect to see by having more RAM? It would mostly affect multi-tasking perfomance (i.e. how many apps you can have open at the same time or how many browser tabs you can keep in memory before reloading). It's CPU/GPU/storage speed that matter for the general performance more than going 4 gb -> 8 gb. If the price difference is minimal the more the better of course for future proofing your device.

    @KonstaT Been wondering about this and I'm sure there's a simple answer, I just haven't found it yet, many OS Builds for this device are 32bit (including this ROM) is there a reason why the 64bit Builds haven't shown up yet (esp in regards to LOS)? I'm assuming it has something to do with too new of device with too new of OS (recompile/upstream/backport changes, etc) slowing down releases, but I could be wrong.
    Generally speaking I guess it's mostly because Raspberry Pi Foundation is moving slowly with 64-bit. Raspberry Pi OS is still 32-bit and I think this because they want to support the older Pi models with the same OS. Pi 4 is the first Pi model where it actually makes any sense to have an 64-bit OS. Pi 3 had 64-bit capable hardware but only 1 gb of RAM so that quickly defeats any architectural advantage (64-bit OS uses more memory).

    I've had 64-bit LineageOS builds running on the Pi 4 over a year so there's nothing too special about it. I've also maintained the 64-bit Android kernel for quite some time (https://github.com/lineage-rpi/android_kernel_brcm_rpi). Why I haven't relased any 64-bit LineageOS builds is because I've chosen a feature set that I want to support and I also have some internal quality standards I like to meet. There's still various things that are broken on 64-bit builds so not much point in releasing to public when you can also have builds where everything is basically working.

    It's still under consideration if there's any point in making some 'bleeding edge' release for people who are just interested in testing.