[DEV][ROM][UNOFFICIAL] LineageOS 20 (Android 13) for Raspberry Pi 4 B

Search This thread

duckdown

Senior Member
Feb 27, 2009
65
3
peel region
I got it installed! Installed all my apps manually since there is no App Store and most work for the most part. The sadness hits when you try and playback modern media.. I wasn’t able to get any x265 stuff to playback. Stremio would complain playback failed and would be falling back to libVLC where the cpu can’t keep up, I assume.

All I can conclude is this must be related to how hardware decoding is noted to be not working?

if I’m wrong I’d love a solution, though!
 
Nov 23, 2022
5
0
Bucharest, Romania
hi buddy , thanks for your hard work , i need help with a gps , can you recomend me a gps to put on rpi4 ??
i want install your android version on rpi4 and attach an gps module (i dont know if i have to install the gps on rpi4 befoure install the android or i can do after or not need to install any program and its just working ) Thanks
 

KonstaT

Senior Member
Jan 20, 2016
802
464
KonstaKANG.com
Is it me or is there no place to download your copy of TWRP for this?
TWRP is included in the OS image. It's /boot/ramdisk-recovery.img but I have no idea what you would with that alone.
I got it installed! Installed all my apps manually since there is no App Store and most work for the most part. The sadness hits when you try and playback modern media.. I wasn’t able to get any x265 stuff to playback. Stremio would complain playback failed and would be falling back to libVLC where the cpu can’t keep up, I assume.

All I can conclude is this must be related to how hardware decoding is noted to be not working?

if I’m wrong I’d love a solution, though!
No, since software decoder keeps up with 1080p H.265 videos just fine as well. I haven't tested 4k videos since I don't have 4k display either. Impossible to say without seeing any logs. Logcat?
hi buddy , thanks for your hard work , i need help with a gps , can you recomend me a gps to put on rpi4 ??
i want install your android version on rpi4 and attach an gps module (i dont know if i have to install the gps on rpi4 befoure install the android or i can do after or not need to install any program and its just working ) Thanks
As stated under 'Working' in the OP, external USB modules such as U-Blox 7 and similar serial GPS modules are supported. You need to have the USB GPS dongle connected when you boot to Android for the Android GPS HAL to detect it.
 
  • Like
Reactions: Augustin.Nodle
Nov 23, 2022
5
0
Bucharest, Romania
buddy , when i start the rpi4 after some time the red and green led go off , black screen , but if i take sd card out its work , when i enter again and its reading config file its going same , any ideea ? i did not change any settings
 

KonstaT

Senior Member
Jan 20, 2016
802
464
KonstaKANG.com
anyone know how much of an improvement when installed on Pi4 4gb with argon one v2 and Argon ONE M.2 NVME Expansion Board with 128gb NVME SSD? Does the setting have the option to control the Argon One v2 fan?
Storage speed certainly matters.

Argon case discussed https://forum.xda-developers.com/t/...aspberry-pi-4-b.4356891/page-23#post-87633437 and few posts forward.
buddy , when i start the rpi4 after some time the red and green led go off , black screen , but if i take sd card out its work , when i enter again and its reading config file its going same , any ideea ? i did not change any settings
Why make the same post in several places?

If you have issues with display, please read the FAQ. If you have issues with USB boot, please read the FAQ. No, if you've written the OS image to sdcard it's not going to magically work without any sdcard/OS to boot to begin with. If you're booting from USB, you're not supposed to have any sdcard inserted (as also stated in the FAQ).
 
  • Like
Reactions: nomadman

Moogle

Member
Oct 30, 2007
36
5
TWRP is included in the OS image. It's /boot/ramdisk-recovery.img but I have no idea what you would with that alone.

No, since software decoder keeps up with 1080p H.265 videos just fine as well. I haven't tested 4k videos since I don't have 4k display either. Impossible to say without seeing any logs. Logcat?

As stated under 'Working' in the OP, external USB modules such as U-Blox 7 and similar serial GPS modules are supported. You need to have the USB GPS dongle connected when you boot to Android for the Android GPS HAL to detect it.
Sorry I guess I'm not understanding the install instructions well.

So I'd put 'Download lineage-20.0-xxxxxxxx-UNOFFICIAL-KonstaKANG-rpi4-ota.zip' on my micro-sd card and then boot to TWRP from the microsd card but the FAQ doesn't say how that's accomplished on a system that doesn't already have LOS installed.

```A: You can boot to TWRP by selecting Settings -> System -> Reboot -> Recovery after enabling advanced restart options.```
Is this line assuming Raspbian or LOS?
I'm trying to test this out on a system normally running openelec (kodi)
 

KonstaT

Senior Member
Jan 20, 2016
802
464
KonstaKANG.com
Sorry I guess I'm not understanding the install instructions well.

So I'd put 'Download lineage-20.0-xxxxxxxx-UNOFFICIAL-KonstaKANG-rpi4-ota.zip' on my micro-sd card and then boot to TWRP from the microsd card but the FAQ doesn't say how that's accomplished on a system that doesn't already have LOS installed.

```A: You can boot to TWRP by selecting Settings -> System -> Reboot -> Recovery after enabling advanced restart options.```
Is this line assuming Raspbian or LOS?
I'm trying to test this out on a system normally running openelec (kodi)
Just flash the OS image (first download link) like you would any other OS on Raspberry Pi (i.e. 'How to install'). This will of course overwrite whatever you have on the sdcard.

Once you have Android installed you can boot to TWRP to install GApps/Magisk/other add-ons/OTA updates (if/when newer builds come available).
 

Moogle

Member
Oct 30, 2007
36
5
Just flash the OS image (first download link) like you would any other OS on Raspberry Pi (i.e. 'How to install'). This will of course overwrite whatever you have on the sdcard.

Once you have Android installed you can boot to TWRP to install GApps/Magisk/other add-ons/OTA updates (if/when newer builds come available).
ah so I think I understand now. So first I would image ```lineage-19.1-20220923-UNOFFICIAL-KonstaKANG-rpi4.zip``` to the SD card. After that I would place the file ```lineage-19.1-20220923-UNOFFICIAL-KonstaKANG-rpi4-ota.zip``` on the sdcard to be used after rebooting into TWRP?
 

KonstaT

Senior Member
Jan 20, 2016
802
464
KonstaKANG.com
sorry for multiple post , what you mean about boot os , i put the image on sd card with PI imager and one time with Balenaecher .. and its same
General advice is to use proper sdcard (at least class 10) and power source (3A in case of Pi 4). If you have issues with your display, please read the FAQ.

Sorry, I don't have any better advice to offer with the information you've provided.
ah so I think I understand now. So first I would image ```lineage-19.1-20220923-UNOFFICIAL-KonstaKANG-rpi4.zip``` to the SD card. After that I would place the file ```lineage-19.1-20220923-UNOFFICIAL-KonstaKANG-rpi4-ota.zip``` on the sdcard to be used after rebooting into TWRP?
No, you don't. :)

Better that you just forget that the OTA package even exists at this point. Just flash the OS image exact the same way you would any other OS on the PI (Pi imager/Etcher/'dd'/whatever) and that's it.
 

Moogle

Member
Oct 30, 2007
36
5
got it booted now, mistake was starting with the OTA package intially. Thanks for the patience. I look forward to being able to use Newpipe on my tv now! Skip Silence feature is worth it.
 
  • Like
Reactions: KonstaT
Nov 23, 2022
5
0
Bucharest, Romania
done , i add this from google ..
# uncomment if you get no picture on HDMI for a default "safe" mode
hdmi_safe=1 #
uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan disable_overscan=1
# uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1
now i have image , but the problem is my mouse its not detected 😅😭
 
Last edited:

vexille

Senior Member
Mar 17, 2009
68
0
No matter which version of the GAPPS file I try it errors out stating that it's GAPPS for 12 but OS is 13. How do you actually get this running without GAPPS installed? Is there a sideload process?

**Installing the Tablet GAPPS (13) makes it further but when you try to start it you get another version error...
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
802
464
KonstaKANG.com
done , i add this from google ..
# uncomment if you get no picture on HDMI for a default "safe" mode
hdmi_safe=1 #
uncomment this if your display has a black border of unused pixels visible # and your display can output without overscan disable_overscan=1
# uncomment if hdmi display is not detected and composite is being output hdmi_force_hotplug=1
now i have image , but the problem is my mouse its not detected 😅😭
hdmi_* options in config.txt have no effect with KMS driver that is used with hw accelerated graphics on Android builds. Overscan is already disabled by default so none of these actually make any difference.

USB mouses should work just fine, never even heard anyone having issues with this. General advice is to use proper power source (3A in case of Pi 4) so you can power external devices as well.
No matter which version of the GAPPS file I try it errors out stating that it's GAPPS for 12 but OS is 13. How do you actually get this running without GAPPS installed? Is there a sideload process?

**Installing the Tablet GAPPS (13) makes it further but when you try to start it you get another version error...
I assume you mean the Android TV version. I'm not aware that there is currently any GApps package for Android TV 13. You can't use GApps package for wrong Android version of course. GApps are not part of my releases so this is something you'd need ask/discuss where you generally get your GApps.
 

romucifer

New member
Feb 1, 2022
3
0
hello little question maybe stupid does the raspberry with android 13 support touch monitors via usb (touch yes) but is the video stream supported by usb (like a mirror screen)
 

mohamedbk

Senior Member
Aug 11, 2015
235
61
beni khalled
Samsung Galaxy S20
Hi,

Thank you for the port but i have some problems :
- I have 1TB HDD formatted as NTFS, for exemple KODI don't recognize the disk and also other apps don't see the HDD
- when i go to storage in settings and selected the external drive the program closed automatically

Anyone have a solution for that ?
 

KonstaT

Senior Member
Jan 20, 2016
802
464
KonstaKANG.com
Hi,

Thank you for the port but i have some problems :
- I have 1TB HDD formatted as NTFS, for exemple KODI don't recognize the disk and also other apps don't see the HDD
- when i go to storage in settings and selected the external drive the program closed automatically

Anyone have a solution for that ?
NTFS is a proprietary Windows file system and it's not supported. There's third party apps to mount NTFS drives (paid apps due to licensing).

You need to format your drive to FAT or exFAT file system that are natively supported on Android.
 

mohamedbk

Senior Member
Aug 11, 2015
235
61
beni khalled
Samsung Galaxy S20
NTFS is a proprietary Windows file system and it's not supported. There's third party apps to mount NTFS drives (paid apps due to licensing).

You need to format your drive to FAT or exFAT file system that are natively supported on Android.
So in my case wich format do i use for my 1TB HDD ?

I will use it for multimedia , kodi and plex
can you help me choosing the right format ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    New builds. H.264 hardware video decoding & encoding.


    -Android 13 QPR1
    -fix pixel format on H.264 hardware video decoding
    -enable H.264 hardware video encoding
    -update to Mesa 22.3.2
    -update to Linux 5.15.78 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 January 2023 (merged)
    1
    hey i hope you are doing ok, i tried to edit the file as you mention but it fails to install, i got a black screen after factory wipe, also the GApps for android 12 it has been updated and is not possible to use those
    GApps any longer is giving the same issue that is not installing, any idea what other source can be used instead ether for Android 12 or 13 or if can you share the update-binary that had worked for you? thanks in advance mate.

    Hi viteliogt. I am just confirming that I have the same behaviour as you. I edited update-binary to roll back the change, and after factory wipe it shows the Lineage boot animation but stops there at a black screen and then bootloops. As far as the GApps for android 12 goes, is the prior release no longer available? I am sure there are many people who have a copy of that (including myself) in the worst case.
    1
    hey i hope you are doing ok, i tried to edit the file as you mention but it fails to install, i got a black screen after factory wipe, also the GApps for android 12 it has been updated and is not possible to use those
    GApps any longer is giving the same issue that is not installing, any idea what other source can be used instead ether for Android 12 or 13 or if can you share the update-binary that had worked for you? thanks in advance mate.

    Hi viteliogt. I am just confirming that I have the same behaviour as you. I edited update-binary to roll back the change, and after factory wipe it shows the Lineage boot animation but stops there at a black screen and then bootloops. As far as the GApps for android 12 goes, is the prior release no longer available? I am sure there are many people who have a copy of that (including myself) in the worst case.
    Old Android TV MindTheGapps releases are here: https://androidfilehost.com/?w=files&flid=335898

    Yeah, you're right. It wasn't quite that simple. I probably had some of the files copied to system partition from the original unmodified zip and some from the modified one. This needs further looking into.
    1
    Old Android TV MindTheGapps releases are here: https://androidfilehost.com/?w=files&flid=335898

    Yeah, you're right. It wasn't quite that simple. I probably had some of the files copied to system partition from the original unmodified zip and some from the modified one. This needs further looking into.

    It looks like it was also related to the changes regarding "Don't guard package removals and correct locations https://gitlab.com/MindTheGapps/vendor_gapps_tv/-/commit/ad363131a55c23b91dcebbf98cc8a960f1edcf68 as well.

    I did a diff of the "update-binary" from the old 12.1 release and the 13.0 release and this is the change that shows up aloing with the "/*" --> "/system/*" change. As an experiment I tried just using the old "update-binary" from old 12.1 (the same as in your link) and putting that in the package and IT SEEMS TO WORK NOW.
    It booted into ATV setup successfully.
  • 4
    Here’s my build of LineageOS 20 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_20221109-122731_Settings.png


    There is also Android TV version available.

    Screenshot_20221109-103339_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.264)
    • 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 (H.265, software decoding & encoding works)

    Issues:
    • H.264 hardware video decoding is still glitchy (encoder seems to perform better)
    • 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
    • Encrypting userdata is not supported
    • and more…

    Sources:

    Thanks:
    • Roman Stratiienko and GloDroid project
    • Peter Yoon and android-rpi project
    • AOSP reference board developers (dragonboard, hikey, yukawa)
    • Android-x86 project
    • LineageOS team and everyone who has contributed to LineageOS 20
    2
    I am an avid user of the Android app Tasker and it would be awesome if you and Joao (Tasker dev) got together and found a way for Tasker to use GPIO pins as contexts or outputs.
    I'm not a Tasker user so I'm not exactly sure what you mean by "contexts or outputs". AFAIK you can make Tasker execute shell scripts that you can use to control the GPIO.
    One of the issues listed is
    • SELinux is in permissive mode
    I have an issue with my Google Chromecast with Google TV as it runs Android 10 which introduced a SELinux policy to stop the Android 'sendevent' command from working. Why do I need that? I'm integrating the stick into home assistant home automation

    and the default 'input' command (for an on-screen remote) is super slow... Worked with Android 9 but there's no way for me to go back to 9.

    So if the above issue means SELinux is not 'active' and is not enforcing policies this could be a good thing and work for me using one of my Pi 4

    What do you think?
    Very possible but that's something you need to test yourself.

    You can also install LineageOS on Google Chromecast with Google TV (https://wiki.oddsolutions.us/devices/sabrina/) and set SELinux permissive since you can also have root access.
    2
    Oh yeah, i totally forgot the official atv remote. Guess it's not working with the tablet version of the rom.

    So, right now i'm downloading the 19.1 version, since the 20 isn't available with your link. Is there an other mirror for it that i can't find?

    Edit: download links are working now
    No, it's only for Android TV.

    I added AndroidFileHost links as that seems to be working again (they've had tons of issues last couple weeks). This seems to generate enough traffic to get blocked on Google Drive every other day so that's not ideal either.
    Can't find GApps-13.0-arm64-ATV-xxxxxxxx.zip mentioned in LineageOS 20 Android blog.
    Also links in this post lead to OS 19 but OS 20 is mentioned:
    View attachment 5766037
    Can you please tell where to dl aforementioned Gapps for OS 20 if they exist?
    I'm not aware that there is any Android TV 13 gapps packages available at the moment. There is for the regular tablet UI Android 13, though, which is also linked in the FAQ. I don't have anything to do with any gapps release so this is something you would need to ask where you generally get your gapps.
    There are no Android TV 13 GApps at the moment, flashing the 12 version is not working.

    My question about that for the dev:
    Can i use the atv13 ota zip to upgrade the atv12 rom with gapps to use the google services?
    No, you need gapps for the right Android version in any case.

    Updating 19->20 is not possible due to reasons stated in http://disq.us/p/2ru05g7
    1
    Merged commits not mentioned in the changelog.

    9.1. 2023 changelog:
    • Android 13 QPR1
    • fix pixel format on H.264 hardware video decoding
    • enable H.264 hardware video encoding
    • update to Mesa 22.3.2
    • update to Linux 5.15.78 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 January 2023 (merged)

    9.11. changelog:
    • initial LineageOS 20 release
    • Vulkan 1.2 (thanks to people at Igalia for Vulkan 1.2 conformance and Roman Stratiienko for latest Mesa fixes)
    • fix Vulkan related issue on Chromium-based browsers
    • add support for virtualization
    • enable multi-gen LRU
    • update to TWRP 3.7.0_11-0-KonstaKANG
    • update to Mesa 22.2.3
    • new Raspberry Pi Android kernel bring-up based on AOSP android13-5.15-lts
    • update to Linux 5.15.74 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 November 2022 (merged)

    Previous builds:
    1
    Thanks for your work!

    1. Maybe it's a lame question, but what about Netflix? Can it run with at least in 1080p?
    2. I don't have atm any wireless remote/mouse/etc. Is there any app for my phone that I can use to navigate in the menus/apps on the Android/AndroidTV roms?
    1. Due to Widevine L3 video playback is capped at standard definition on apps that provide DRM protected content.

    2. You need input device of some sort of course. Mouse/keyboard/touchscreen on regular tablet UI Android builds - remote (USB remote, Bluetooth remote, IR remote, TV's remote using HDMI-CEC, arrow keys on your keyboard, etc) on Android TV. Google TV remote app (https://www.androidpolice.com/2021/09/27/hands-on-how-to-android-tv-new-remote/) might work on regions where Google TV is available and depending on the gapps you've install (I'm not aware of there currently being any Android TV 13 gapps). I haven't tested any third party remote applications but there seems to more than few.