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

Search This thread

uukelele

New member
Jul 31, 2022
2
0
Hi there,
I installed Lineage on my pi with an sd card that has 64GB of storage. But in the settings app it only shows 8GB of storage available. Is there anything I have to do to use the full 64GB?
 

uukelele

New member
Jul 31, 2022
2
0
I'm using Waveshare touchscreen model B and I see the rainbow screen then black. I know the hdmi cable is fine with EDID, and the touchscreen works fine on non-EDID operating systems. So, is there any way to use Lineage without an EDID display? Maybe editing something in config.txt...
 

KonstaT

Senior Member
Jan 20, 2016
723
438
KonstaKANG.com
I'm using Waveshare touchscreen model B and I see the rainbow screen then black. I know the hdmi cable is fine with EDID, and the touchscreen works fine on non-EDID operating systems. So, is there any way to use Lineage without an EDID display? Maybe editing something in config.txt...
You can add custom EDID firmware to the kernel by appending /boot/cmdline.txt with 'drm_kms_helper.edid_firmware=edid/{your_edid_firmware}.bin'. In some cases this would require creating a custom EDID firmware for your display and compiling the kernel. See https://github.com/lineage-rpi/android_device_brcm_rpi4/issues/4
 

KonstaT

Senior Member
Jan 20, 2016
723
438
KonstaKANG.com
Is it possible to use this 4G sim hat: Waveshare SIM7600X which accepts standard AT commands via UART on GPIO pins 8 & 10? Can the RIL be configured to talk on these pins?
No, you can't use any LTE modem out-of-the-box. My builds are configured as wifi only tablet so they don't even have Android telephony framework. 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. It's not something that I plan to include in public releases as practically no one has the hardware.

Some 3G/LTE USB dongles have been reported working using third party apps (e.g. https://play.google.com/store/apps/details?id=de.draisberghof.pppwidget3).
 
  • Like
Reactions: M10360

Starfoxfs

Member
Dec 22, 2015
12
1
Hi,

simple Question, can your build Passthrough Dolby TrueHD or DTS-HD MA over HDMI if Kodi or Plex TV is installed on top ?

What Widevine DRM Level can this decode ?
 
Last edited:

mouragio1

Member
May 12, 2020
6
1
Hi,


I have a question about the battery status. My setup:

- RPi4 with 4GB
- PIJuice hat (UPS) with a battery on top
- on top of that one a Hifiberry.
Using a waveshare 10.1 touchscreen

Flashed LineageOS 19 latest build; everything works fine; also carplay etc>

My situation: I want to use the setup in my car (for mostly Carplay)
When the PI is in the state powered off; and the ignition key is turned; it gets power -> startup... great.
When the PI is running on its battery (ignition off) and the battery is low; PIJuice will safely shutdown the PI.. so far so good.

I would like to get a trigger that when the ignition key is turned off; the PI sees that there is no external power and then dims the screen and stops the music. I dont mind if it stays running while still on battery power..
And ofcourse in that case also a trigger when the power is back on so that the screen is turned on (and music can be resumed)

I had the same setup with a tablet (lenovo) and that worked... problem was overheating (RPI will also; but easier to use a fan) and the tablet crashed occasionally with carplay.

So; someone has an idea how I could get that trigger? the battery status cannot be determined in lineageOS op the RPI...

edit: Usually you can set triggers op a raspbian/ubuntu distro with the PIJuice tools; but on this its not possible to install...

Thanx in advance :).
 

KonstaT

Senior Member
Jan 20, 2016
723
438
KonstaKANG.com
Hi,


I have a question about the battery status. My setup:

- RPi4 with 4GB
- PIJuice hat (UPS) with a battery on top
- on top of that one a Hifiberry.
Using a waveshare 10.1 touchscreen

Flashed LineageOS 19 latest build; everything works fine; also carplay etc>

My situation: I want to use the setup in my car (for mostly Carplay)
When the PI is in the state powered off; and the ignition key is turned; it gets power -> startup... great.
When the PI is running on its battery (ignition off) and the battery is low; PIJuice will safely shutdown the PI.. so far so good.

I would like to get a trigger that when the ignition key is turned off; the PI sees that there is no external power and then dims the screen and stops the music. I dont mind if it stays running while still on battery power..
And ofcourse in that case also a trigger when the power is back on so that the screen is turned on (and music can be resumed)

I had the same setup with a tablet (lenovo) and that worked... problem was overheating (RPI will also; but easier to use a fan) and the tablet crashed occasionally with carplay.

So; someone has an idea how I could get that trigger? the battery status cannot be determined in lineageOS op the RPI...

edit: Usually you can set triggers op a raspbian/ubuntu distro with the PIJuice tools; but on this its not possible to install...

Thanx in advance :).
You would need to dig into the PIJuice driver how it gets data from the hardware. My builds include i2c-tools that you can use to interact with I2C devices.

You can write a script and place it in /vendor/etc/init.d/ to do various things. E.g. I've provided a script that powers down the device when you connect GPIO pin to ground that you can use as a base (https://forum.xda-developers.com/t/...raspberry-pi-4-b.4139059/page-6#post-83822011).
 

mouragio1

Member
May 12, 2020
6
1
You would need to dig into the PIJuice driver how it gets data from the hardware. My builds include i2c-tools that you can use to interact with I2C devices.

You can write a script and place it in /vendor/etc/init.d/ to do various things. E.g. I've provided a script that powers down the device when you connect GPIO pin to ground that you can use as a base (https://forum.xda-developers.com/t/...raspberry-pi-4-b.4139059/page-6#post-83822011).
thanx! Appreciated.

I will research this..
 

mouragio1

Member
May 12, 2020
6
1
You would need to dig into the PIJuice driver how it gets data from the hardware. My builds include i2c-tools that you can use to interact with I2C devices.

You can write a script and place it in /vendor/etc/init.d/ to do various things. E.g. I've provided a script that powers down the device when you connect GPIO pin to ground that you can use as a base (https://forum.xda-developers.com/t/...raspberry-pi-4-b.4139059/page-6#post-83822011).
I get an error "Unable to expand Lineage-17.1-rpi-gpio-shutdown.zip"... is this expected? look like the zip isnt unzippable

Do you have it somewhere else where I can download please? thanx.

edit: never mind. sorted it. thanx again.
 
Last edited:
Aug 18, 2022
2
2
Hello @KonstaT

I am trying to build lineage 19.1 [Android 12] for rpi4.
Can you please share the local brcm_lineage19.1 manifest file?

Requesting to share the build instructions as well

Regards,
Aravindh S
 
  • Like
Reactions: bhanu9009
Aug 18, 2022
2
2
Hello @KonstaT

I am trying to build lineage 19.1 [Android 12] for rpi4.
Can you please share the local brcm_lineage19.1 manifest file?

Requesting to share the build instructions as well

Regards,
Aravindh S
 
  • Like
Reactions: bhanu9009

KonstaT

Senior Member
Jan 20, 2016
723
438
KonstaKANG.com
Hello @KonstaT

I am trying to build lineage 19.1 [Android 12] for rpi4.
Can you please share the local brcm_lineage19.1 manifest file?

Requesting to share the build instructions as well

Regards,
Aravindh S

There is no current plans to open source my full device configuration. It's still under consideration if I'll make some minimal device configuration available for people who are interested in contributing to actual development work on various parts that may still need it (hw video dec/enc, camera, etc). In any case it will not support all the features you find on my build though all the basic hardware support would be there.

You can build the Linux kernel (and other GPL licensed parts), graphics drivers/HALs, and various other HALs/components using the sources I've released (https://github.com/lineage-rpi). Other open source Android implementations for Raspberry Pi I can recommend are GloDroid (https://github.com/GloDroid) and android-rpi (https://github.com/android-rpi).
 

Ajtaji

Member
Jan 6, 2012
32
8
New build.
  • add option to restrict new USB connections
  • add option for left-handed mouse
  • include Raspberry Pi userland tools (vcgencmd, etc) and libdrm modetest
  • update to Linux 5.10.135 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
  • Android security patch level: 5 August 2022 (merged)
Nice build, good job. Only thing i find broken is gps.default.so in /vendor partition which is easily replaced with one that works on ubloxx 7 and or 9.
 

Top Liked Posts

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

    • switch to clang kernel build
    • allow VNC input to wake the device
    • add /boot/config_user.txt for user specific options to backup/restore during OTAs
    • update to Mesa 22.1.7
    • update to Linux 5.10.144 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 September 2022 (merged)

    • add option to restrict new USB connections
    • add option for left-handed mouse
    • include Raspberry Pi userland tools (vcgencmd, etc) and libdrm modetest
    • switch to clang kernel build
    • allow VNC input to wake the device
    • add /boot/config_user.txt for user specific options to backup/restore during OTAs
    • update to Mesa 22.1.7
    • update to Linux 5.10.144 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 September 2022 (merged)
  • 19
    Here’s my build of LineageOS 19 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_20220313-200456_Settings.png


    There is also Android TV version available.

    Screenshot_20220114-084413_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 (official 7" touchscreen, 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, option to test highly experimental H.264 hardware video decoding)

    Issues:
    • Camcorder (i.e. recording videos) & some third party camera apps don't work with official Pi camera modules (works with UVC USB webcams)
    • 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
    4
    New build.


    -switch to Linux 5.10 kernel by default
    -fix VC4 HDMI audio with 5.10 kernel (3.5mm jack is now used by default so select the right HDMI device from the settings)
    -add support for the official 7" touchscreen display with hw accelerated graphics (enable configurations for the touchscreen from the settings)
    -minor brightness fixes for the official 7" display
    -add support for Pi camera modules using libcamera, preview & photos work - camcorder doesn't (thanks to Roman Stratiienko)
    -fix UVC USB webcams that use external camera HAL (camera needs to support MJPG format - preview, photos & camcorder works)
    -add option to enable currently very WIP H.264 hardware video decoding using v4l2_codec2 (enable experimental feature from the settings)
    -fix reboots related to Hotspot 2.0 networks/ANQP requests (see issue #6)
    -Vulkan 1.1 (thanks to people at Igalia for Vulkan 1.1 conformance and Roman Stratiienko for latest Mesa fixes)
    -update to Mesa 21.3.1
    -update to Linux 5.10.83 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 December 2021 (merged)
    3
    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)
    3
    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.
    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