• 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

Anghenfyll

New member
Sep 21, 2021
2
1
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.

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.
I believe usually the network would set the time, but there won't be one in this case. I've had success with an Emteria build that used the same GPS HAL to set the time, but that was a much earlier version of Android - using the GPSTest App you can see the time just fine, just setting won't work. Could be the permissions as I think it would need root for this operation.

Seems easier to shell out for an RTC module than fight my way through the code, as I can't reproduce these builds.
Once again, thanks for the all effort. (y)
 

KonstaT

Senior Member
Jan 20, 2016
506
341
KonstaKANG.com
-anyone got magisk working? I really really want it.

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.

Hello everyone,
First of all, thank you KonstaT for your fascinating work! My question is that: I want to use Magisk for bypassing Google Play SafetyNet on Raspberry Pi 400 Lineage OS ATV installation. But I cannot get "boot.img" for patching through any "how to" instruction (for example, TWRP boot backup or OS image). Does anybody know a working way for this, or could anybody get "boot.img"? Or maybe any other way for bypassing SafetyNet?
Thank you.
FAQ now has instructions how to install Magisk.
 
  • Like
Reactions: Gerdje_
could anyone help me to fix this error on my build for raspberry pi 4

error: external/virglrenderer/Android.bp:61:1: "libvirglrenderer" depends on undefined module "libdrm_headers"
error: external/virglrenderer/Android.bp:61:1: "libvirglrenderer" depends on undefined module "libgbm"
10:45:04 soong bootstrap failed with: exit status 1
 

KonstaT

Senior Member
Jan 20, 2016
506
341
KonstaKANG.com
could anyone help me to fix this error on my build for raspberry pi 4

error: external/virglrenderer/Android.bp:61:1: "libvirglrenderer" depends on undefined module "libdrm_headers"
error: external/virglrenderer/Android.bp:61:1: "libvirglrenderer" depends on undefined module "libgbm"
10:45:04 soong bootstrap failed with: exit status 1
Pretty impossible to give much advice without knowing what sources you are using but it seems that you're likely mixing some Android 11/12 stuff.

libdrm in Android 12 has libdrm_headers - Android 11 doesn't. libgbm was renamed to libgbm_mesa somewhere around Android 11 (I'm not using AOSP Mesa) because minigbm already uses name libgbm.
 

KonstaT

Senior Member
Jan 20, 2016
506
341
KonstaKANG.com
New builds. 64-bit so make sure to choose the right add-ons. Same changelog on both.


-switch to 64-bit kernel & userspace
-switch to minigbm gbm_mesa and [email protected] API (thanks to Roman Stratiienko)
-update to Mesa 21.2.4
-update to Linux 5.4.155 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
 

KonstaT

Senior Member
Jan 20, 2016
506
341
KonstaKANG.com
Android 7 or lower ?, I think it can run on 512mb ram
No. For one Nougat has been EOL'ed by Google for years and you shouldn't use it for anything anymore.

PI Zero 2 W support was only added to 5.10 kernel by Pi Foundation. This basically means Android 12 (and couple of next Android versions moving forward). You would be in a world of trouble if you tried to run some old Android version with 5.10 kernel. Backporting the hw support to some old kernel version is likely not possible either in any reasonable way.
 

jeff862

Member
Mar 5, 2007
49
3
I am using rpi 4 8gb version .. with usb-dac the songs played then stop and played on spotify, deezer, tidal .. why this happening... any solution for this or workaround ..please help
 

Rom95

New member
Nov 1, 2021
1
0
Hello,
I use lineage-18.1-20211026 + raspberry pi4 + USB Touch screen, and my touchscreen doesn't work,
when connected to USB in the serial port you can see that the touchscreen is recognized:
usb 1-1.4: new low-speed USB device number 6 using xhci_hcd
usb 1-1.4: New USB device found, idVendor=0c45, idProduct=8419, bcdDevice= 1.00
usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.4: Product: USB Device
usb 1-1.4: Manufacturer: SONiX
input: SONiX USB Device as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:0C45:8419.0005/input/input8
hid-generic 0003:0C45:8419.0005: input,hidraw0: USB HID v1.00 Mouse [SONiX USB Device] on usb-0000:01:00.0-1.4/input0

can anyone tell me how to solve the problem?
 

KonstaT

Senior Member
Jan 20, 2016
506
341
KonstaKANG.com
Hello,
I use lineage-18.1-20211026 + raspberry pi4 + USB Touch screen, and my touchscreen doesn't work,
when connected to USB in the serial port you can see that the touchscreen is recognized:


can anyone tell me how to solve the problem?
It doesn't work at all or there's some strange behavior? You can use 'getevent' tool in rooted shell to see if you're getting any events out of the touchscreen.

You likely need to create an idc file (https://source.android.com/devices/input/input-device-configuration-files) with your device's vendor/product ids. There's already configs for some touchscreens that otherwise work as a mouse or claim to report pressure but in fact don't. See configs in /vendor/usr/idc/ for reference.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    New builds. Add-ons have also been updated for the new TWRP so download the latest ones on those as well.


    -add support for BME280/BMP280 temperature/pressure/humidity sensors
    -add option to select HDMI-CEC device
    -add option to show virtual volume down, volume up, and power keys on navigation bar
    -add option for old TCP-based ADB over network
    -show IP address and port for ADB/SSH/VNC options
    -fix resizing data partition that broke with previous build
    -update to TWRP 3.6.0_11-0-KonstaKANG
    -update to Mesa 21.3.0
    -update to Linux 5.4.161 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 November 2021 (merged)

    ---


    -add support for BME280/BMP280 temperature/pressure/humidity sensors
    -add option to select HDMI-CEC device
    -show IP address and port for SSH/VNC options
    -setup wizard improvements for TV devices (merged)
    -fix resizing data partition that broke with previous build
    -update to TWRP 3.6.0_11-0-KonstaKANG
    -update to Mesa 21.3.0
    -update to Linux 5.4.161 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 November 2021 (merged)
    1
    Is there any hope for HW Video decoding support?
    Not on this build. It requires using newer stuff that are not available for Android 11.

    Latest LineageOS 19 (Android 12) build already has proof of concept level support for H.264 hardware video decoding. It's 1080p only due to hardcoded buffer sizes and something gets still messed up somewhere in the pipeline because colors are not correct. Still proves the point that it can work but it's still going to take a lot of time and work (not just on this hardware but in general).
  • 24
    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/headphones, etc)
    • Audio DAC (using GPIO DACs e.g. Hifiberry DAC+)
    • Bluetooth (and bluetooth tethering)
    • 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 (and HDMI-CEC)
    • 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 & BME280/BMP280 accelerometer/gyroscope/magnetometer/temperature/pressure/humidity)
    • 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 (and 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 android-rpi project
    • Roman Stratiienko and GloDroid project
    • AOSP reference board developers (dragonboard, hikey, yukawa)
    • E. Anholt for V3D graphics driver
    • Maxime Ripard for Pi 4 KMS driver
    • Android-x86 project
    • LineageOS team and 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.

    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)