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

[DEV][ROM][UNOFFICIAL] LineageOS 19.0 (Android 12) for Raspberry Pi 4 B

Search This thread

KonstaT

Senior Member
Jan 20, 2016
500
341
KonstaKANG.com
Here’s my build of LineageOS 19.0 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_20211103-211529.png


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

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)
  • 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)
  • Camera (UVC USB webcams that support MJPG format should work)

Linux 5.10 kernel: (optional add-on)
  • various KMS driver improvements (DSI panel support, etc)
  • Camera preview & photos work with Pi camera modules - camcorder is not working
  • option to enable H.264 hardware video decoding (still very WIP and broken in various ways)
  • HDMI audio is not supported! (see issue #4651 & issue #4654)
Issues:
  • 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 19.0
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
500
341
KonstaKANG.com
Merged commits not mentioned in the changelog.

25.11. changelog:
  • add option to show virtual volume down, volume up, and power keys on navigation bar (requires reboot)
  • add option for old TCP-based ADB over network
  • show IP address and port for ADB/SSH/VNC options
  • 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)
Linux 5.10 kernel: (optional add-on)
  • various KMS driver improvements (DSI panel support, etc)
  • support for Pi camera modules using libcamera, preview & photos work - camcorder doesn’t (thanks to Roman Stratiienko)
  • option to test currently very WIP H.264 hardware video decoding using v4l2_codec2 (Settings -> System -> Advanced settings -> Hardware video decoding)
  • HDMI audio is not supported! (see issue #4651 & issue #4654)
  • new Raspberry Pi Android kernel bring-up based on AOSP android12-5.10-lts
  • update to Linux 5.10.81 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
4.11. changelog:
  • initial LineageOS 19.0 build
  • switch to codec2 software decoders/encoders
  • add support for BME280/BMP280 temperature/pressure/humidity sensors
  • add option to select HDMI-CEC device
  • drop old v1 camera HAL and use external camera HAL for UVC USB webcams (camera needs to support MJPG format)
  • update to TWRP 3.5.2_11-0-KonstaKANG
  • update to Mesa 21.2.5
  • new Raspberry Pi Android kernel bring-up based on AOSP android12-5.4-lts
  • update to Linux 5.4.156 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
  • Android security patch level: 5 October 2021 (merged)
Previous builds:
 
Last edited:
  • Like
Reactions: polfrank

Spielmops

Senior Member
Dec 14, 2016
94
14
Oldenburg
Can I make a wish? If yes, I would be happy, if the system could sync time from the GPS-receiver. M y device has not always a network-connection ...

Spielmops
 

KonstaT

Senior Member
Jan 20, 2016
500
341
KonstaKANG.com

bonswouar

Senior Member
Mar 3, 2016
52
12
Wow I didn't expect latest Android being supported on the Pie, thanks for the great work!
I have two small questions though :
  • Do you know how is support for microG? It doesn't cause any problem? (was wondering about casting videos for example)
  • I know it has been asked few times already, but now that Android 12 has been released are you confident it will be possible to have support for hardware acceleration soon? Would make a big difference to have a steady 1080p/60fps
 

KonstaT

Senior Member
Jan 20, 2016
500
341
KonstaKANG.com
Wow I didn't expect latest Android being supported on the Pie, thanks for the great work!
I have two small questions though :
  • Do you know how is support for microG? It doesn't cause any problem? (was wondering about casting videos for example)
MicroG requires a patch for signature spoofing that is not included in LineageOS for security reasons. I think this is also something that can be achieved using Magisk (which is now supported) but haven't looked into it.
  • I know it has been asked few times already, but now that Android 12 has been released are you confident it will be possible to have support for hardware acceleration soon? Would make a big difference to have a steady 1080p/60fps
I'm pretty confident it will work eventually. Soon(™) is also a relative term.

Short term goal is to get some proof of concept that stateful H.264 V4L2 dec/enc can work on Android on Pi 4. Just made some minor progress with v4l2_codec2 couple of days ago and got the dec/enc codec2 component to even do something in the first place. Not sure if the current issues I'm having are due to memory allocation or the codec component negotiating with the kernel driver. There's also still some hardcoded buffer sizes, etc that depend on the video resolution you're trying to dec/enc. Only real hardware that I'm aware that just recently has this working at least to some extent is dragonboard and John Stultz has tweeted some updates on the matter so check those out if you're interested.

Sorry if this wasn't the news you were looking for but things like this take time.
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
500
341
KonstaKANG.com

bonswouar

Senior Member
Mar 3, 2016
52
12
  • Like
Reactions: KonstaT

jeff862

Member
Mar 5, 2007
47
3
any solution for this build ? ... unstable.. mouse pointer keep on freezing .. and random restart
 

FL00DY

Senior Member
Jul 15, 2010
75
1
Sydney
I'm interested in this project congrats on your current work. I'm not super knowledgeable on video enc/Dec, I'm most interested in see how games play on this. How well would games play on this?
 

KonstaT

Senior Member
Jan 20, 2016
500
341
KonstaKANG.com
any solution for this build ? ... unstable.. mouse pointer keep on freezing .. and random restart
I can't reproduce such issues and haven't received other report either. Impossible to say without seeing any logs anyway.

General advice is to use proper sdcard (at least class 10) and power source (3A in case of Pi 4).
Usb dac no sound for spotify, deezer, tidal etc,, any solution plz help
Logcat? I recently tested my USB sound card and it works fine (both output & input). I'm not aware there being any changes how USB audio devices are handled in Android 12.
I'm interested in this project congrats on your current work. I'm not super knowledgeable on video enc/Dec, I'm most interested in see how games play on this. How well would games play on this?
What would hw video dec/enc have to do with gaming? It's used to offload decoding/encoding of e.g. H.264 videos to specific hardware.

There's tons of Android on Raspberry Pi gameplay videos on YouTube.
Anyone knows how to get the raspberry pi to work without a monitor. I installed the image but it is not connecting via ssh. I was able to use it with Raspberry Pi OS.
It's not possible to run without any HDMI device connected. You need to have something connected that reports EDID information. If you want to use this headless (e.g. remotely with SSH or VNC) and you can buy a dummy HDMI adapter.
 
  • Like
Reactions: polfrank

EpicLPer

Senior Member
Aug 29, 2012
692
385
26
Scheibbs
epiclper.com
Nice!

It seems this still uses an earlier kernel, so I guess that means no official touchscreen support (yet)?

EDIT: Ah, found the FAQ entry now. Gonna link it here for ease of access and in case others are curious as well: https://konstakang.com/devices/rpi4/LineageOS19/#comment-5598552752
Btw., is there an experimental build with 5.10 kernel? Or is there an (easy) way for a build-noob like me to try it out? I've been waiting for Android 12 for the Pi to try a car entertainment thing out, even tho I get a new car in a few days which doesn't require that anymore but I may do it for others still.
 

rabbited

Member
Mar 10, 2020
8
0
any solution for this build ? ... unstable.. mouse pointer keep on freezing .. and random restart
You are most likely experiencing the WiFi boot loop issue. If you disable wifi in config.txt and use ethernet that may solve the boot loop.
Konsta, is there any current way or possible future way to manually enter our WiFi details without allowing Lineage to perform it's search? The network search appears to be the instigator of boot loop issues.
 

Spielmops

Senior Member
Dec 14, 2016
94
14
Oldenburg
Feedback: both my cheap webcams do not work. Magisk does its job. An USB-stick will not be ejected. Rotation control is not as easy as before ( I use a landscape screen). Total Commander sometimes needs 30 seconds to load the main screen (loading ...). Emergency call can not be disabled in the power-menu (you can uncheck it, but it stays)

Do you know, that the image comes "allready startet"?

The OS is so fare working. Good job! Thanks. It will not be my working OS, because I need the camera (dashcam), so I will observe your development :)

Spielmops
 

skm_1

Member
Apr 20, 2018
23
8
Excellent work. I played about with this a bit last night to see if I could run Zwift. My Rii I4 keyboard works fine using the 2.4GHz dongle but in Bluetooth mode I can only use the mousepad - odd, but not a huge problem since I still have the on-screen keyboard. BitGApps for Android 12 installed via TWRP and gave me a working Play Store, but Zwift was unavailable, so I blew it away and installed the Aurora Store APK. Once I had set up the spoofing correctly, Zwift installed and ran. Haven't tested it much but it seems at least as fast as under OmniROM when I apply my preferred overclocking config in config.txt.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Here’s my build of LineageOS 19.0 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_20211103-211529.png


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

    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)
    • 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)
    • Camera (UVC USB webcams that support MJPG format should work)

    Linux 5.10 kernel: (optional add-on)
    • various KMS driver improvements (DSI panel support, etc)
    • Camera preview & photos work with Pi camera modules - camcorder is not working
    • option to enable H.264 hardware video decoding (still very WIP and broken in various ways)
    • HDMI audio is not supported! (see issue #4651 & issue #4654)
    Issues:
    • 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 19.0
    3
    Short term goal is to get some proof of concept that stateful H.264 V4L2 dec/enc can work on Android on Pi 4.
    And that didn't even take too long. \o/ But yes, H.264 V4L2 hardware decoding can work on Android on the Pi 4!

    Something still getting messed up somewhere in the pipeline so the colors are not correct and there's a green tint on the bottom half of the playback.
    https://www.dropbox.com/s/hlvcv23ejfpinn5/VID_20211108_194739.mp4?dl=0
    2
    Wow I didn't expect latest Android being supported on the Pie, thanks for the great work!
    I have two small questions though :
    • Do you know how is support for microG? It doesn't cause any problem? (was wondering about casting videos for example)
    MicroG requires a patch for signature spoofing that is not included in LineageOS for security reasons. I think this is also something that can be achieved using Magisk (which is now supported) but haven't looked into it.
    • I know it has been asked few times already, but now that Android 12 has been released are you confident it will be possible to have support for hardware acceleration soon? Would make a big difference to have a steady 1080p/60fps
    I'm pretty confident it will work eventually. Soon(™) is also a relative term.

    Short term goal is to get some proof of concept that stateful H.264 V4L2 dec/enc can work on Android on Pi 4. Just made some minor progress with v4l2_codec2 couple of days ago and got the dec/enc codec2 component to even do something in the first place. Not sure if the current issues I'm having are due to memory allocation or the codec component negotiating with the kernel driver. There's also still some hardcoded buffer sizes, etc that depend on the video resolution you're trying to dec/enc. Only real hardware that I'm aware that just recently has this working at least to some extent is dragonboard and John Stultz has tweeted some updates on the matter so check those out if you're interested.

    Sorry if this wasn't the news you were looking for but things like this take time.
    2
    New build. Added optional Linux 5.10 kernel add-on to test a lot of WIP stuff.


    -add option to show virtual volume down, volume up, and power keys on navigation bar (requires reboot)
    -add option for old TCP-based ADB over network
    -show IP address and port for ADB/SSH/VNC options
    -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)

    Linux 5.10 kernel: (optional add-on)
    -various KMS driver improvements (DSI panel support, etc)
    -support for Pi camera modules using libcamera, preview & photos work - camcorder doesn’t (thanks to Roman Stratiienko)
    -option to test currently very WIP H.264 hardware video decoding using v4l2_codec2 (Settings -> System -> Advanced settings -> Hardware video decoding)
    -HDMI audio is not supported! (see issue #4651 & issue #4654)
    -new Raspberry Pi Android kernel bring-up based on AOSP android12-5.10-lts
    -update to Linux 5.10.81 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    1
    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/LineageOS19/