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

Search This thread

KonstaT

Senior Member
Jan 20, 2016
411
279
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
411
279
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
411
279
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
411
279
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.
 

Neogx

Member
Jan 25, 2014
33
2
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: 7
Last edited:

KonstaT

Senior Member
Jan 20, 2016
411
279
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.
  • 1
    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).
    1

    KonstaT​

    Just want to say thanks for your effort in working on this. After getting around the wifi problem and getting it installed it worked beautifully.
    1
    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/
    Thank you very much. I'm using your AndroidTV ROM for Raspi 4B.
    1
    Thank you, it works very well
  • 11
    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)
    • 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)
    3
    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/
    3
    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)
    3
    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.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone