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

Search This thread

the_dj84

New member
Nov 22, 2022
1
0
@KonstaT hey I followed your guide for 12 and after gapps install, wipe dalvik, reboot..After reboot i dont get the remote graphic for setup, just the same homescreen but play store installed. Is that normal for mindthegapps?

Installed these with on a Pi4 with BalenaEtcher:
lineage-19.1-20220923-UNOFFICIAL-KonstaKANG-rpi4-atv
MindTheGapps-12.1.0-arm64-ATV-20220912_160414

EDIT:
nvm, i was half asleep and read instructions as saying wipe dalvik = factory reset. Did factory reset and got correct setup screen.

leaving post for others. thanks for the development!
 
Last edited:

Smokinimages

Member
Jul 19, 2021
8
0
Pi 4 B with a DSI Capacitive Touch Display. Once I'd cursed a bit over the screen not working, then went and actually read the faq on changing a couple of setting everything is up and running well. One issue, least so far, and a specific one but maybe someone can help or point me in the right direction. I'm trying to do a build for the car using Car launcher, an app I've used for a couple of years on a tablet, but it freezes as soon as it loads and i can't find a way around it. Any ideas?
 

KonstaT

Senior Member
Jan 20, 2016
833
489
KonstaKANG.com
Pi 4 B with a DSI Capacitive Touch Display. Once I'd cursed a bit over the screen not working, then went and actually read the faq on changing a couple of setting everything is up and running well. One issue, least so far, and a specific one but maybe someone can help or point me in the right direction. I'm trying to do a build for the car using Car launcher, an app I've used for a couple of years on a tablet, but it freezes as soon as it loads and i can't find a way around it. Any ideas?
As always, logs (logcat) might give some clues. There's no point in guessing.
 
  • Like
Reactions: Smokinimages

Smokinimages

Member
Jul 19, 2021
8
0
As always, logs (logcat) might give some clues. There's no point in guessing.
logcat attached from just before starting the app to it freezing and the not responding error,. First time I've grabbed logcat logs so hoping this is enough. TIA for any help. I know this is probably an app issue but nothing else comes close to Car Launcher esp for designing custom screens using Spotify album art

Just wondering what luck people have with USB cameras? I have one of these sitting from a different project but this build just complains that it is unable to communicate with the camera

 

KonstaT

Senior Member
Jan 20, 2016
833
489
KonstaKANG.com
logcat attached from just before starting the app to it freezing and the not responding error,. First time I've grabbed logcat logs so hoping this is enough. TIA for any help. I know this is probably an app issue but nothing else comes close to Car Launcher esp for designing custom screens using Spotify album art

Just wondering what luck people have with USB cameras? I have one of these sitting from a different project but this build just complains that it is unable to communicate with the camera

No log was attached. :)

USB UVC webcams should work. With the AOSP external camera HAL used in Android 12/13 builds it depends if the camera reports some resolution information properly and whether it supports MJPEG format. At least my Logitech USB webcam works fine while cheap chinese one doesn't. Logcat would likely give some idea here as well.

Android 11 (and earlier) builds use different camera HAL for USB UVC webcams.
 

Smokinimages

Member
Jul 19, 2021
8
0
No log was attached. :)

USB UVC webcams should work. With the AOSP external camera HAL used in Android 12/13 builds it depends if the camera reports some resolution information properly and whether it supports MJPEG format. At least my Logitech USB webcam works fine while cheap chinese one doesn't. Logcat would likely give some idea here as well.

Android 11 (and earlier) builds use different camera HAL for USB UVC webcams.
 

Attachments

  • 2022-12-07-10-48-17.txt
    1.1 MB · Views: 8

Smokinimages

Member
Jul 19, 2021
8
0
Had a search and can't see anything about this
Is the allow access to app usage stats bugged? I've allowed it in tasker but it's still *****ing about it not being set. It would also explain why app lock apps are not working
 

Spielmops

Senior Member
Dec 14, 2016
117
18
Oldenburg
Konsta, I'm still searching for a working camera. Can you give me the model-info of the one you are using?

Can anyone else tell me about working models?

I tried 3 different devices and all 3 are working fine with Linux UVC, even with MJPEG ( two of those bad), but none is recognized with LOS 19.

Spielmops
 

KonstaT

Senior Member
Jan 20, 2016
833
489
KonstaKANG.com
Had a search and can't see anything about this
Is the allow access to app usage stats bugged? I've allowed it in tasker but it's still *****ing about it not being set. It would also explain why app lock apps are not working
Sorry, can't quite understand what the issue is exactly. Steps to reproduce? Logs?

There's no battery on Pi so there's no battery usage stats either.
Konsta, I'm still searching for a working camera. Can you give me the model-info of the one you are using?

Can anyone else tell me about working models?

I tried 3 different devices and all 3 are working fine with Linux UVC, even with MJPEG ( two of those bad), but none is recognized with LOS 19.

Spielmops
Various Logitech USB webcams have been reported working, mine does anyway.
 

Spielmops

Senior Member
Dec 14, 2016
117
18
Oldenburg
One of the three tested cameras ist a Logitech USB webcam. And it's not working. Should I buy the whole sortiment and try each one?
 

KonstaT

Senior Member
Jan 20, 2016
833
489
KonstaKANG.com
One of the three tested cameras ist a Logitech USB webcam. And it's not working. Should I buy the whole sortiment and try each one?
That's an excellent idea since you wanted to maintain a list of working/non-working USB cameras. /s :p

I don't have any list but at least C270 & C310 have been reported working of the Logitech ones (still not an endorsement of any kind).
 

Yoshikage_Kira

Senior Member
Has anyone figured out how to make the internet work with the Android TV version? There is no such setting as Mobile data & WiFi in ATV. It is present in the normal android version.

There is no issue with the intenet connectivity since the ads were loading fine somehow.
 

Spielmops

Senior Member
Dec 14, 2016
117
18
Oldenburg
My results with Logitech-webcams:
They are working, but with camera-api1 only with low resolution, only with camera-api2 with expected resolution.
Open-Camera can switch between the API's and gave me numbers with a Logitech C920 HD Pro
camera-API-1: up to 864x480
camera-API-2: up to Full HD

If you want to record a video with an app that can't switch API (Dashcam-App), then the result will be lousy.

Spielmops
 
  • Like
Reactions: KonstaT

KonstaT

Senior Member
Jan 20, 2016
833
489
KonstaKANG.com
My results with Logitech-webcams:
They are working, but with camera-api1 only with low resolution, only with camera-api2 with expected resolution.
Open-Camera can switch between the API's and gave me numbers with a Logitech C920 HD Pro
camera-API-1: up to 864x480
camera-API-2: up to Full HD

If you want to record a video with an app that can't switch API (Dashcam-App), then the result will be lousy.

Spielmops
Thanks, that's useful information.

With H.264 hardware encoding now enabled on Android 13 (will be on Android 12 as well if/when there's another release) you can probably record pretty decent videos.
 

Smokinimages

Member
Jul 19, 2021
8
0
bit of a reach but does this build support any USB fingerprint scanners?
Thanks for a great build, made getting my second screen in the car working much easier than messing with tablets, just need to tidy the install up now

20230128_085529.jpg
20230128_085529.jpg
 

KonstaT

Senior Member
Jan 20, 2016
833
489
KonstaKANG.com
Final Android 12 builds. H.265 hardware video decoding, H.264 hardware video decoding and encoding! HDMI audio fixes.


  • H.265 hardware video decoding, H.264 hardware video decoding and encoding
    • FFmpeg 5.1.2 (thanks to John Cox for Raspberry Pi hw codecs support and Android-x86 for AOSP build patches)
    • implement codec2 plugin to integrate FFmpeg into Android multimedia framework (thanks to Michael Goffioul)
    • FFmpeg hevc_v4l2request hwaccel H.265 hw decoding (default), h264_v4l2m2m H.264 hw decoding (optional)
    • v4l2_codec2 H.264 hardware video decoding and encoding (default)
    • FFmpeg software decoders support
  • HDMI audio improvements
    • implement audio HAL that uses alsa directly to get rid off using alsa loopback for HDMI audio (thanks to nename0)
    • update alsa-lib and alsa-utils to v1.2.8
  • update to TWRP 3.7.0_11-0-KonstaKANG
  • update to Linux 5.10.169 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
  • Android security patch level: 5 February 2023 (merged)
 

KonstaT

Senior Member
Jan 20, 2016
833
489
KonstaKANG.com
Some good sources for test clips to try H.264/H.265/VP8/VP9 hardware/software video decoding.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Final Android 12 builds. H.265 hardware video decoding, H.264 hardware video decoding and encoding! HDMI audio fixes.


    • H.265 hardware video decoding, H.264 hardware video decoding and encoding
      • FFmpeg 5.1.2 (thanks to John Cox for Raspberry Pi hw codecs support and Android-x86 for AOSP build patches)
      • implement codec2 plugin to integrate FFmpeg into Android multimedia framework (thanks to Michael Goffioul)
      • FFmpeg hevc_v4l2request hwaccel H.265 hw decoding (default), h264_v4l2m2m H.264 hw decoding (optional)
      • v4l2_codec2 H.264 hardware video decoding and encoding (default)
      • FFmpeg software decoders support
    • HDMI audio improvements
      • implement audio HAL that uses alsa directly to get rid off using alsa loopback for HDMI audio (thanks to nename0)
      • update alsa-lib and alsa-utils to v1.2.8
    • update to TWRP 3.7.0_11-0-KonstaKANG
    • update to Linux 5.10.169 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 February 2023 (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)
    • Hardware video decoding & encoding (H.265 decoding, H.264 decoding & encoding)
    • 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)

    Issues:
    • Hardware video decoding performance varies depending on the selected decoder option and video resolution/bitrate/profile/container/etc
    • 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
    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 (20220114 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-19.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-19.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
    • User specific options in /boot/config_user.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/LineageOS19/
    https://konstakang.com/devices/rpi4/LineageOS19-ATV/
    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
    Final Android 12 builds. H.265 hardware video decoding, H.264 hardware video decoding and encoding! HDMI audio fixes.


    • H.265 hardware video decoding, H.264 hardware video decoding and encoding
      • FFmpeg 5.1.2 (thanks to John Cox for Raspberry Pi hw codecs support and Android-x86 for AOSP build patches)
      • implement codec2 plugin to integrate FFmpeg into Android multimedia framework (thanks to Michael Goffioul)
      • FFmpeg hevc_v4l2request hwaccel H.265 hw decoding (default), h264_v4l2m2m H.264 hw decoding (optional)
      • v4l2_codec2 H.264 hardware video decoding and encoding (default)
      • FFmpeg software decoders support
    • HDMI audio improvements
      • implement audio HAL that uses alsa directly to get rid off using alsa loopback for HDMI audio (thanks to nename0)
      • update alsa-lib and alsa-utils to v1.2.8
    • update to TWRP 3.7.0_11-0-KonstaKANG
    • update to Linux 5.10.169 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 February 2023 (merged)