• 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

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
I'm trying to make the Digi+ HAT work but to no avail and yet I'm new to all this Lineage OS and RPI 4. I'm still stuck. Have you sorted out the issue? Appreciate any help you render to make this a successful experience.

Hi KanstaT!! can you please guide us to enable the Hifiberry Digi Pro HAT? about ALSA, can you please share more about this? I think there are more people getting into this as it is perfect setup for high quality audio player.

Hi KonstaT - great work, thank you! I can play now Amazon music hd via hdmi or line out. I also have a digi+ pro HAT that I am trying to enable... I've tried both digi and digi-pro overlays with respective changes in the rpi4-audio script however the card is not seen as Alsa device (dmesg only shows hdmi and line out cards). I have tested the card with raspberry os and it works well. What else can I try? I really appreciate your work and input. Thank you again.
At least kernel has drivers enabled for all Hifiberry DACs. If you want to use some other DAC besides Hifiberry DAC+ you need to select 'Hifiberry DAC+' from Settings -> System -> Advanced settings -> Audio device. After this edit /boot/config.txt and change dtoverlay=hifiberry-dacplus to load the driver for your DAC (i.e. change it to 'dtoverlay=hifiberry-???'). You shouldn't modify anything else.
 
  • Like
Reactions: Shijune

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
There seems to be an issue with the TTS-settings. If I click on Settings/System/Language & Input/Text to Speech, the settings-app crashes, regardless which TTS-engine is installed. Searching for this issue got me this: https://gitlab.com/CalyxOS/calyxos/-/issues/354

Spielmops
Might be already fixed if/when there's another release. https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/307999
If i understand correctly, this is not added to Android TV version, only to non-tv version? Because it is not working on Android TV version, while it works perfectly on LibreELEC for RPi. I didnt test on non-tv version. I specifically installed Android TV version, because it made sense it would logically be supported on TV version first :)

Big thanks for your great work.
Both latest builds now support HDMI-CEC.
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?
USB webcams that use UVC should work. You need to have the USB connected when booting the device for the Android camera HAL to detect it.
 

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
Hello there,
realy impressive work here :) thanks KonstaT for spending tons of time for this briliant Android to Raspi Port :)
I have a question too: Youtube app, the HDMI screen is flicker/ is give me a short blackscreen like screen resolution change - but this happened also when play youtube videos not in fullscreen. What can here happened?
Try forcing the refresh rate from Settings -> Device Preferences -> Raspberry Pi settings -> Display resolution (e.g. [email protected]).
so i have this installed on my pi id like to add a gsm lte hat to make it my default home internet using my sim card and wifi tether anyone know what gsm hat can be used with this
Some 3G/4G USB dongles have been reported working with third party apps like PPP Widget 3 (https://play.google.com/store/apps/details?id=de.draisberghof.pppwidget3).

This build doesn't have Android telephony framework or include drivers to support any modems. I have builds that have support Sixfab modem HAT and Quectel EC25. LTE data and SMS works fine. It's also possible to make/receive calls but in-call audio is not working.
Hello can you explain how did you added init.d support?
It's simply a revert of https://github.com/LineageOS/android_vendor_lineage/commit/243b877ea425e4b04ff8783ce8019279e099c7d2

I think SELinux can also be an issue with this so switch it to permissive instead of enforcing.
 

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
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.
 
  • Like
Reactions: Gerdje_

amrut.m

Member
Apr 11, 2012
19
3
31
Mumbai
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!!!

20210902_205848.jpg
 

Streamex

New member
Jul 4, 2021
2
0
At least kernel has drivers enabled for all Hifiberry DACs. If you want to use some other DAC besides Hifiberry DAC+ you need to select 'Hifiberry DAC+' from Settings -> System -> Advanced settings -> Audio device. After this edit /boot/config.txt and change dtoverlay=hifiberry-dacplus to load the driver for your DAC (i.e. change it to 'dtoverlay=hifiberry-???'). You shouldn't modify anything else.
I've tried all this before my previous post got but no sound out through the card ... are there any specific steps I can run to debug?
 

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
I've tried all this before my previous post got but no sound out through the card ... are there any specific steps I can run to debug?
What exactly did you try?

Check 'dmesg' output that your DAC is registered or any related error messages. You can also use ALSA tools (tinypcminfo/tinymix/etc) to see that it is available as ALSA device.

According to the docs (https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/) digi+ pro should have 'dtoverlay=hifiberry-digi-pro' to enable the driver. Also check loaded kernel modules Raspberry Pi OS ('lsmod') where you have this working in case I've missed some driver.
 
Last edited:

trianzelmi

New member
Jul 26, 2015
1
1
Is there any way to turn on the LineageOS power when a signal comes from the car's ecu and then when the signal disappears then LineageOS would go back to power off mode? Similar function then normal power button but power is only ON when ECU signal comes GPIO and OFF if no ECU signal.


rpi_maxxecu.png
 
  • Like
Reactions: mynameisnafe

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
Is there any way to turn on the LineageOS power when a signal comes from the car's ecu and then when the signal disappears then LineageOS would go back to power off mode? Similar function then normal power button but power is only ON when ECU signal comes GPIO and OFF if no ECU signal.


View attachment 5407801
Probably not like that.

I've posted a script that will power down the device when GPIO is connected to ground (https://forum.xda-developers.com/t/...raspberry-pi-4-b.4139059/page-6#post-83822011). Pi bootloader also has a feature to use GPIO3 to power up the device. So, powering up/down the device using GPIO is certainly possible.
 
  • Like
Reactions: mynameisnafe

EpicLPer

Senior Member
Aug 29, 2012
687
383
26
Scheibbs
epiclper.com
Is there any way to turn on the LineageOS power when a signal comes from the car's ecu and then when the signal disappears then LineageOS would go back to power off mode? Similar function then normal power button but power is only ON when ECU signal comes GPIO and OFF if no ECU signal.


View attachment 5407801
Yeah that's been an issue I've been thinking about too. You can't really have a small battery backup in the car either, like a powerbank or something due to the immense summer heat. Would just be a fire hazard.

Only real thing to do is "pray" the SD Card won't corrupt over time when hard-powering-off the device over and over again. Tho I doubt that's healthy...
 

EpicLPer

Senior Member
Aug 29, 2012
687
383
26
Scheibbs
epiclper.com
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 👍
 

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
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.
 
  • Like
Reactions: EpicLPer

Anghenfyll

New member
Sep 21, 2021
2
1
Hi, really loving the build - thanks a lot!

Just wondered if you have had success with setting
Code:
ro.kernel.android.gps.time_sync=60
?

I am running RPI4 in the car to use a ublox GPS puck, with a USB touchscreen overlay for the existing car screen. Sometimes when it starts up it does not find the USB GPS at all, but when it does it will never sync the time.

I wondered if it is a permissions thing where time may not be set unless root? I did think the USB touchscreen was taking ttyACM0, but there's no time sync with this unplugged either. Time sync to the gps clock would be awesome.
 
  • Like
Reactions: mynameisnafe

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
Hi, really loving the build - thanks a lot!

Just wondered if you have had success with setting
Code:
ro.kernel.android.gps.time_sync=60
?

I am running RPI4 in the car to use a ublox GPS puck, with a USB touchscreen overlay for the existing car screen. Sometimes when it starts up it does not find the USB GPS at all, but when it does it will never sync the time.

I wondered if it is a permissions thing where time may not be set unless root? I did think the USB touchscreen was taking ttyACM0, but there's no time sync with this unplugged either. Time sync to the gps clock would be awesome.
I haven't looked into the time_sync on the GPS HAL. Not sure if related but does the Android itself sync time using it in a car? You would need to have a network connection or an external RTC module for this.
Good day all .
So I have two questions .
Is thier a 64 bit version?
Has anyone installed vulkan/mesa?
Nothing has really changed regarding 64-bit since it was last discussed (https://forum.xda-developers.com/t/...raspberry-pi-4-b.4212945/page-2#post-84352695).

Vulkan drivers are not something that you can just simply install. The support for it needs to be implemented on the OS. Currently mainline Broadcom Mesa Vulkan driver doesn't support Android (it's not built as an Android HAL unlike for some other platforms). android-rpi has initial support for vulkan (https://groups.google.com/g/android-rpi/c/FCC0h5vlgl0) but I'm not sure what is the exact status with it. android-rpi uses entirely different Android graphics HALs than this build but probably worth checking out if you need vulkan.
 

Hrom80

New member
Mar 21, 2021
1
0
Hi @KonstaT. Thanks for a great job.
The firmware runs smoothly on PI4 2GB.
I ask you to help me in solving one problem. I need to flip the screen image so that by default there is a vertical image and all installed applications work in vertical mode. Thanks in advance for your reply.
PS Sorry for the bad English. I use google translator:cry:
 

KonstaT

Senior Member
Jan 20, 2016
460
314
KonstaKANG.com
Hi @KonstaT. Thanks for a great job.
The firmware runs smoothly on PI4 2GB.
I ask you to help me in solving one problem. I need to flip the screen image so that by default there is a vertical image and all installed applications work in vertical mode. Thanks in advance for your reply.
PS Sorry for the bad English. I use google translator:cry:
Settings -> Device Preferences -> Raspberry Pi settings -> Display rotation
 

mynameisnafe

Senior Member
Apr 6, 2012
80
3
Err, what happened to 'Root Access' setting?
All I have is 'Enable Android debugging as root' which is not the same thing. I can't be superuser.

I'm running lineage-18.1-20210411-UNOFFICIAL-KonstaKANG-rpi4.img on a rpi4 with 4GB RAM

the option ain't there
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    New builds.


    -add support for Vulkan
    -rework bluetooth (thanks to android-rpi)
    -update to Mesa 21.1.8
    -update to Linux 5.4.152 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 1 October 2021 (merged)

    ---


    -add support for Vulkan
    -rework bluetooth (thanks to android-rpi)
    -switch to new two-panel settings UI (merged)
    -update to Mesa 21.1.8
    -update to Linux 5.4.152 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 1 October 2021 (merged)
    1
    Err, what happened to 'Root Access' setting?
    All I have is 'Enable Android debugging as root' which is not the same thing. I can't be superuser.

    I'm running lineage-18.1-20210411-UNOFFICIAL-KonstaKANG-rpi4.img on a rpi4 with 4GB RAM

    the option ain't there
    Please read the FAQ. You need to install a separate su add-on.
    1
    Hi again,

    I'm also looking at this for a car.. will LineageOS work with a GPS/GNSS GPIO Hat, or only the ublox?

    Also, are there any plans to support something like the waveshare LTE modem or a USB LTE modem?
    No, many different serial GPS devices (both USB and GPIO) have been reported working. Using GPIO GPS hardware has been discussed on this topic previously (https://forum.xda-developers.com/t/...raspberry-pi-4-b.4212945/page-7#post-85192865 to https://forum.xda-developers.com/t/...raspberry-pi-4-b.4212945/page-8#post-85321133).

    Some 3G/4G USB dongles have been reported working with third party apps like PPP Widget 3 (https://play.google.com/store/apps/details?id=de.draisberghof.pppwidget3). This build doesn't have Android telephony framework or include drivers to support any modems. I have builds that have support Sixfab modem HAT and Quectel EC25. LTE data and SMS works fine. It's also possible to make/receive calls but in-call audio is not working.
  • 23
    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!

    Screenshot_20210104-104810_Settings.png


    https://konstakang.com/devices/rpi4/LineageOS18/

    There is also Android TV version available.
    Screenshot_20210306-163341_Settings.png


    https://konstakang.com/devices/rpi4/LineageOS18-ATV/

    Working:
    • 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, OpenGL & Vulkan)
    • 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)

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

    Sources:

    Thanks:
    • 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
    5
    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)
    4
    How to install:
    1. Follow the official Raspberry Pi instructions for writing the image to the SD card (Linux, Mac, Windows).

    FAQ:

    FAQ is getting quite long and difficult to maintain in several different places. You can find the always up-to-date FAQs here:
    https://konstakang.com/devices/rpi4/LineageOS18/
    https://konstakang.com/devices/rpi4/LineageOS18-ATV/
    4
    New builds.


    -add support for Vulkan
    -rework bluetooth (thanks to android-rpi)
    -update to Mesa 21.1.8
    -update to Linux 5.4.152 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 1 October 2021 (merged)

    ---


    -add support for Vulkan
    -rework bluetooth (thanks to android-rpi)
    -switch to new two-panel settings UI (merged)
    -update to Mesa 21.1.8
    -update to Linux 5.4.152 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 1 October 2021 (merged)
    4
    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)