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

Search This thread

KonstaT

Senior Member
Jan 20, 2016
984
608
KonstaKANG.com
Hi, i have been using Lineage OS 17 for a while. I have problems with my wifi signal it keeps dropping. But i have no problems with using the ethernet (im sharing my laptop's wifi connection to ethernet) i restarted my raspi and then got stuck on bootloop and i dont know the reason. So what i did is i downloaded the Lineage 18 and installed gapps tv stock now my computer cant detect the ethernet connection, and im currently connected to my laptops hotspot i wanted the ethernet port to work. Checked eth0 via if config it says that its Up,broadcasting,running,multicast but on my laptop network adapter settings there is no device that is connected on my laptops ethernet port. Anu thoughts on how to fix this?
And any updates on the hardware video decoding? Videos stutter when its decoding 1080p videos. Thank you so much. Love your works
Difficult to say what could be the issue with ethernet. Could be a lot of things including your computer (rebooting everything is of course the first thing to try).

http://disq.us/p/2flzmq1 is the latest discussion on hw video dec/enc with relevant links.
Following manual and looking for a way to boot in TWRP I am unable to find Advanced Restart entry in Developer options


edit
Found in under "Gestures" settings, not in Developer Options
Yes, this was moved in LineageOS 18. FAQ does point you to the right place, though.

Hi, do you have planned to use 5.10 kernel?
Yes, I've had it running all the way from 5.10.0 version. ;) 5.10 also brings supports for DSI display with KMS driver used with hw accelerated graphics (among various other improvements to KMS support) so I'm looking forward to this as well.

There's no sdcardfs for 5.10 which means using the new quota storage. There's a strange storage issue with this after installing gapps. Some apps don't have access to internal emulated sdcard after installing gapps. It's fine without gapps, I think it's fine with gapps after formatting /data in TWRP (vs. just doing a normal factory reset). Not sure what is the issue exactly and haven't really had time to look into it more closely.

5.4 is the newest kernel version Android supports for R. 5.10 is actually S (Android 12) kernel so there's that, too.
 

escknx

Senior Member
Nov 19, 2008
277
24
I use Pi4 as I car head unit with USB DAC, Topping D10S in particular as USB-Optical converter going further to DSP. And what I noticed is that Lineage OS outputs sound as 96khz by default, that is different from all other Androids I used. Is this normal behavior? I'm getting pretty rough jitter, I wonder if this something to do with 96khz upsampling? I plan to try Hifiberry Digi to get that optical out, hopefully it will solve the jitter.
 

KonstaT

Senior Member
Jan 20, 2016
984
608
KonstaKANG.com
I use Pi4 as I car head unit with USB DAC, Topping D10S in particular as USB-Optical converter going further to DSP. And what I noticed is that Lineage OS outputs sound as 96khz by default, that is different from all other Androids I used. Is this normal behavior? I'm getting pretty rough jitter, I wonder if this something to do with 96khz upsampling? I plan to try Hifiberry Digi to get that optical out, hopefully it will solve the jitter.
I haven't made any changes to USB audio. It's a common HAL across all Android devices.

Pi device specific audio HAL supports 16-bit PCM at 44100 & 48000 Hz for audio output. This also applies if you use a GPIO audio DAC.
 

vacardozo

New member
Apr 17, 2021
1
0
Hi, the versions 17.1 and 16.0 always reboot after loading the boot image over and over again, and never boot. In version 18.1 cannot change the time zone, the rest works fine.
 

KonstaT

Senior Member
Jan 20, 2016
984
608
KonstaKANG.com
I assume it does not apply to Hifiberry Digi+? Trying to get pure optical out but Digi+ does not seem to work.
I've enabled kernel drivers 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 you DAC (i.e. change it to 'dtoverlay=hifiberry-digi' in your case).
 
  • Like
Reactions: escknx

escknx

Senior Member
Nov 19, 2008
277
24
I've enabled kernel drivers 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 you DAC (i.e. change it to 'dtoverlay=hifiberry-digi' in your case).
Thanks a lot. Forgot to enable root in dev settings.
So I enabled DAC+ in Advanced settings
Changed config.txt line to dtoverlay=hifiberry-digi
Does not seem to work, it no longer plays via 3.5mm and no signal on digi. YT Music gives playback error. UAPP player is stuck on 'buffering' stage

according to https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/

removal of dtparam=audio=on does not fix the issue
adding force_eeprom_read=0 causes bootloop
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
984
608
KonstaKANG.com
Thanks a lot. Forgot to enable root in dev settings.
So I enabled DAC+ in Advanced settings
Changed config.txt line to dtoverlay=hifiberry-digi
Does not seem to work, it no longer plays via 3.5mm and no signal on digi. YT Music gives playback error. UAPP player is stuck on 'buffering' stage

according to https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/

removal of dtparam=audio=on does not fix the issue
adding force_eeprom_read=0 causes bootloop
Instructions for some other Linux distro don't apply here.

Android audio HAL can currently open and use only one ALSA device at a time. So, that's either HDMI, 3.5mm jack, or audio DAC.

Check 'dmesg' output on booting the device that driver for your DAC is loaded and it's registered as ALSA device. My build also include ALSA tools (tinypcminfo/tinymix/etc) that you can use for this.
 
  • Like
Reactions: finitelife

attacker

Senior Member
May 21, 2007
59
5
Can we config the setup of vnc server?

The scroll of the vnc seems difficult from android to android.

Thanks
 

Neogx

Senior Member
Jan 25, 2014
101
14
san
hmm weird i installed it on my micro sd and its crashs right when it gets to the white page with the logo ,"emergency" and "next" on the button. I tried different sd cards, redownloaded the Zip file and the same problem happens. Im running on pi 4 8 gig Ram

In the picture This appears for 2 seconds and just restarts

Video
https://photos.app.goo.gl/Vf9oFXyXUetozXmg8

Update: I downloaded the android TV version to see if that would work and the same problem happens
 

Attachments

  • IMG_20210424_032905.jpg
    IMG_20210424_032905.jpg
    343.1 KB · Views: 20
Last edited:

KonstaT

Senior Member
Jan 20, 2016
984
608
KonstaKANG.com
Can we config the setup of vnc server?

The scroll of the vnc seems difficult from android to android.

Thanks
I'm not aware of any way you could configure it server side. You can do this on the client depending on the app your using. I only tested VNC with Remmina which comes bundled with Ubuntu and it seems to work fine with that.
hmm weird i installed it on my micro sd and its crashs right when it gets to the white page with the logo ,"emergency" and "next" on the button. I tried different sd cards, redownloaded the Zip file and the same problem happens. Im running on pi 4 8 gig Ram

In the picture This appears for 2 seconds and just restarts

Video
https://photos.app.goo.gl/Vf9oFXyXUetozXmg8

Update: I downloaded the android TV version to see if that would work and the same problem happens
General advice is to use proper sdcard (at least class 10) and power source (3A in case of Pi 4). Impossible to say what could be the issue without seeing any logs anyway.

There's also https://github.com/lineage-rpi/android_kernel_brcm_rpi/issues/6 but there's been some mixed reports whether this is fixed in Android 11 (or there's two similar separate issues).
 

Top Liked Posts

  • There are no posts matching your filters.
  • 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! You can contact me by email to discuss creating customized Android builds for commercial purposes.

    Screenshot_20210104-104810_Settings.png


    There is also Android TV version available.

    Screenshot_20210306-163341_Settings.png


    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, and APDS9930 accelerometer, gyroscope, magnetometer, temperature, pressure, humidity, ambient light, and proximity)
    • 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.
    If you’re running a recent build (20220121 or newer) you can also update to newer builds using TWRP flashable OTA packages. OTA updates pushed through the built-in Updater app are stored at /data/lineageos_updates/.
    1. Download lineage-18.1-xxxxxxxx-UNOFFICIAL-KonstaKANG-rpi4-ota.zip and save it to your device’s internal storage or use an external USB drive
    2. Boot to TWRP recovery (see FAQ)
    3. Install lineage-18.1-xxxxxxxx-UNOFFICIAL-KonstaKANG-rpi4-ota.zip from your selected storage
    4. (Flash Magisk/other add-ons you had previously installed)
    5. Boot out of recovery (see FAQ)
    Changes that are backed up and restored flashing OTAs:
    • Device specific settings changed using Settings -> System -> Raspberry Pi settings
    • Manual changes to /boot/resolution.txt and /boot/rc_keymap.txt
    • USB boot configuration in /boot/config.txt
    • GApps
    Changes that are not backed up and restored flashing OTAs:
    • Manual changes to /boot/config.txt (and any other manual changes to /boot partition)
    • Magisk

    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)