yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] maxmaschine:
Hello everyone

I have been trying for some time to install the Android 11 (lineage-18.1-20220121-UNOFFICIAL-KonstaKANG-rpi4-atv.zip) with the OpenGapps (open_gapps-arm-11.0-tvstock-20220215.zip) on a Pi4 with 8GB.

The Pi is newly purchased and probably the latest Rev.

I played the image on a 32GB Micro SD with two Flash programs (balenaEtcher-Portable-1.7.7 or imager_1.7.2); as described in Konsta's manual. (LineageOS 18.1 Android TV (Android 11) for Raspberry Pi 4 (konstakang.com))

The flashing process will complete without any error messages.

... the SD is plugged into the Pi and booted. After a short time, a screen will appear asking me to update. (See pictures)

Now Konsta has recommended me to load the files (start4x.elf fixup4.dat fixup4x.dat and start4.elf) from GitHub in the latest version and copy them to the boot partition of the SD.

Unfortunately, the result still remains the same... I'm still prompted to update and Android doesn't want to start.

What else can I try to get A11 running on the Pi?

thank you for your support...

Greeting Max
[Raspberry Pi Original Development] KonstaT:
This has been discussed at http://disq.us/p/2mhag47

Download fixup4.dat, fixup4x.dat, start4.elf, and start4x.elf from https://github.com/raspberrypi/firmware/tree/master/boot -> Flash the Android image to a sdcard -> Mount the sdcard on your computer (even Windows manages to mount the boot partition) -> Copy the four firmware files you downloaded to the boot partition to replace the old ones -> Put the sdcard to your Pi and boot.

Updating the boot firmware has been reported working fine on the newer hardware revision. Sorry, I don't know where you have failed. Double check your steps (e.g. there's a lot a files with similar names). You still have old boot firmware as the bootloader complains.
[Raspberry Pi Original Development] maxmaschine:
Ok, I will repeat and test all the steps (step by step).

After that I will report...

Thanks again!
[Raspberry Pi Original Development] maxmaschine:
Hello Konsta,

First of all, thank you very much for the support,

I have now managed to get the Rpi 4 to run with the A18.1 image.

It was the SD card.

It was formatted incorrectly by me somehow!

Even flashing with the well-known image flash programs could not help here.

Although they reported everything OK after flashing, the SD could not boot.

only when I completely deleted the SD with AOMEI Partition Assistant 9.1 and created a new partition (FAT32) and formatted it,

did I get a drive letter assigned again under Windows.

I also recreated the MBR of the SD under AOMEI Partition Assistant.

Then I flashed the SD according to the instructions with Raspberry PI Imager and the image (LineageOS 18.1 Android 11 TV - pi4).

The writing was successfully completed again.

After that I replaced the files (fixup4.dat, fixup4x.dat, start4.elf, start4x.elf).

This time I didn't use Windows Explorer but Total Commander to make sure that the old files were deleted

and the new ones were written.

And what can I say, the version LineageOS 18.1 Android 11 TV - pi4 runs on the Pi4 of course -

I was also able to install the OpenGapps (open_gapps-arm64-11.0-tvstock-20220215.zip) without any problems.

Now that I've made various attempts, I've encountered new questions.

1. I read somewhere while troubleshooting that you have to register the Pi4 as a "new device" with

PrimeVideo in order not to get the error "Something went wrong..." if you want to play a video.

The account exists, of course, and I've already tried to integrate the device (Pi)...unfortunately without success so far.

Can you or someone here tell me how to proceed?

2. How can I install apps that are not offered in the PlayStore (.apk files).

I read the instructions for this, but I can't find them anymore...

maybe someone can post me a link?

Thank you all very much...

And have a nice Sunday everyone.

Great job you're doing there!

...oh, I almost forgot some of them! ;-)

3. Can I install the AppleTV app and is there a problem playing videos?

Is there a guide or a link on how to do it?

Thanks again
[Raspberry Pi Original Development] KonstaT:
1. Amazon Prime has been reported working. You need to use the regular mobile version of the app as Android TV versions have more restrictions.

2. Same way as any other Android device. E.g. using the built-in file manager or sideload using adb.

3. No idea, can't recall receiving any reports. You would need to test and see for yourself.
[Raspberry Pi Original Development] maxmaschine:
Hello Konsta and everyone else,

in the meantime I got the Rpi4 up and running (A11) and everything works great.

Here again a big compliment to the developers... really a top performance.

But as it is, there are always new questions that cannot be answered immediately.

But maybe you have a link or tip where I can get the information.

I now have "X-plore" installed and I'm fine with installing APK files directly. I have to say that these basically run, but many are not displayed on the start page... It is probably always these APKs that are not installed via the PlayStore.

Is there a way I can get them on the home page and maybe sort them too?

Thank you for the great work...

Greetings Max
[Raspberry Pi Original Development] KonstaT:
Have you installed gapps?

Android TV launcher that comes with gapps (and replaces the default launcher) only shows app icons for Android TV (leanback UI) applications.

IIRC there's a specific app to launch non-TV apps or you can look into using a different launcher.
[Raspberry Pi Original Development] maxmaschine:
Hello Konsta,

of course I installed OpenGapps; that's the prerequisite for being able to install the Playstore and other apps at all... at least that's how I understood it.

Apps that are not offered in the Playstore, I tried to install with X-plore (apk files) worked in many cases.

My question was how I can sort the start page a bit nicer (create folders; arrange the order of the apps).

I've already read something about replacing the launcher, whether I can find it again is another problem ;-)

. But if I replace the gapps launcher, will the TV apps still work and be displayed?

. IIRC - what does this mean?

. and another question about PrimeVideo App:

I installed version 3.0.318.11255 here, it is not displayed on the start page, but I can start it via Settings/Apps/Open.

how do I get such apps on the start page and others away from the start page?

Greetings
[Raspberry Pi Original Development] KonstaT:
No, it's not necessary to install gapps to install other applications. You can sideload .apk files as discussed before (or sideload an alternative app store such as F-Droid or Aurora and use it install apps). Certain applications requiring Google services to run is different story of course.

If you type IIRC to Google search it will give you the definition: abbreviation. if I remember correctly; if I recall correctly.

If you can't create folders or add shortcuts to the start page with the Google Android TV launcher, then you probably can't. You need to look into using an alternative launcher or maybe you would find the regular tablet UI Android builds more suitable for your use.
[Raspberry Pi Original Development] maxmaschine:
IIRC: If I Read Correctly or If I Remember Correctly ...roughly, I had already guessed... ;-)

where can i get the tablet ui android builds from.

So I can test this times.

...how can I uninstall the OpenGapps if necessary?

do I have to go into recovery mode to uninstall?
[Raspberry Pi Original Development] KonstaT:
You can find all my builds at

Raspberry

Pi 4

konstakang.com

You can't directly remote gapps as they are added to the system partition. One option is to remove the gapps backuptool script (in /system/addon.d/) or just wiping the entire system partition in TWRP and reflashing an OTA package (edit. I haven't released any OTA packages for LineageOS 18 builds). I'd just recommend starting from clean installation in this case.
[Raspberry Pi Original Development] khmadhu:
Hi Konsta,

I tried u r "lineage-18.1-20220121-UNOFFICIAL-KonstaKANG-rpi4-atv.img" image on my new pi4B 4GB model, but it throws below error.

start4x.elf: is not compatible

This board requires newer software

But I recently updated the pi4 firmware to 10-4-2022, not sure why its giving this error.

When i try installing "lineage-19.1-20220407-UNOFFICIAL-KonstaKANG-rpi4-atv.zip" it works, but the reason i m trying for Android 11 version is there is no working Gapps for Android 12!,

Can you please help me to fix this, I am trying to make my pi4 same as android TV's UI where i can get Netflix, Prime,Youtube.... with all USB playback options. please let me know which is the best way to do.
[Raspberry Pi Original Development] KonstaT:
Just discussed on the previous page.

https://xdaforums.com/t/dev-rom-uno...aspberry-pi-4-b.4212945/page-20#post-86698075
[Raspberry Pi Original Development] khmadhu:
Hi Konsta,

Thanks for the link, got it working. :)

I would be looking forward for future releases including android 12 TV with Gapps working.
[Raspberry Pi Original Development] markus566:
Hi KonstaT,

i tried replacing both hwcomposer.drm.so files in your lineage-18.1-20220121 build with the files from the lineage-19.1-20220407 build to make headless mode work, but it still requires a hdmi display to be plugged in for booting. The apps i want to use do not work with your latest 19.1 release.

Could you please provide a link to both hwcomposer.drm.so files that work for headless 18.1? thanks
[Raspberry Pi Original Development] KonstaT:
It boots just fine for me without any display connected.

You need to mount the vendor partition writable to make any changes (or mount the sdcard on your Linux computer and copy the files over).
[Raspberry Pi Original Development] maxmaschine:
Hello Konsta,

had to take a few days off due to health reasons... ;-) ...but everything is fine now!

If I set up the A11 again and don't install OpenGapps, how do I get an alternative AppStore like Aurora or F-Droid... I downloaded these as apk, but in recovery mode I can only install zip files. Is there another way to install apk files without installing OpenGapps?

possibly a guide or a link to a guide?

I wish you a nice rest of the day...
[Raspberry Pi Original Development] KonstaT:
E.g. copy an .apk to an USB drive -> plug the drive to your Pi -> use built-in file manager to browse the USB drive -> double click on an .apk to install.

Or dowload .apk to your computer -> connect to your Pi from your computer using ADB -> execute 'adb install appname.apk' on your computer.
[Raspberry Pi Original Development] limpleg:
anyone a idea with my issue?

Have installed latest lineage-18 release, needed to change the boot files cause of newer raspberry rev. and then installed gapps and facotry reset the device... now loadingscreeen of lineage is hanging (those big dots from rigth to left) - screen stucks there and no futher setup is possible...
[Raspberry Pi Original Development] KonstaT:
OpenGApps builds are automated untested builds and they tend to get broken sometimes. Correct place to report issues with gapps with appropriate logs would be e.g. https://github.com/opengapps/opengapps/issues/873 where we've discussed similar issues on several occasions before.

You can try using an older OpenGApps release.
[Raspberry Pi Original Development] limpleg:
ok will try, thank you!
[Raspberry Pi Original Development] KonstaT:
Final Android 11 builds. Same changelog on both.

LineageOS 18.1 (Android 11)

for Raspberry Pi 4

konstakang.com

LineageOS 18.1 Android TV (Android 11)

for Raspberry Pi 4

konstakang.com

also available as OTA package

add support for Compute Module 4

fix DAC audio device selection on CM4 & Pi 400 that don’t have 3.5mm audio jack

fix USB storage (Pi 400 as well?)

add support for the RTC on the I/O board

use OTG mode for USB to support ADB, MTP, PTP, USB tethering on the micro-USB port on the I/O board

update boot firmware for newer Pi 4 hardware revisions

various drm_hwcomposer updates e.g. support for headless mode (thanks to Roman Stratiienko)

automatically set density based on display resolution

add support for APDS9930 ambient light/proximity sensor

update to TWRP 3.6.1_11-1-KonstaKANG

update to Mesa 21.3.8

update to Linux 5.4.191 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)

Android security patch level: 5 May 2022 (merged)
[Raspberry Pi Original Development] RicardoScar:
Im having trouble getting HDMI-CEC to work. TV is a LG UH6100. CEC works fine when using libreelec on the same pi and hdmi ports. Where do i start to debbug the problem? It is possible that my TV have some type of old CEC technology, it is called "simplink" on TV options, but im not sure simplink is the problem.
[Raspberry Pi Original Development] KonstaT:
LineageOS 18.1 Android TV (Android 11)

for Raspberry Pi 4

disq.us
[Raspberry Pi Original Development] tronmech:
I tried to use this ROM to run my pi 400 as a media platform. Apple TV refused to play any videos, with the usual lack of messaging. It's likely some DRM not being present or supported.

When using Paramount Plus, videos play, but it's pretty choppy and buffers a lot. Haven't tried downloaded video yet. Maybe it needs hardware acceleration?

Can't try the other atv build because there isn't. An atv (or any other) Android 12 gapps package.
[Raspberry Pi Original Development] KonstaT:
Impossible to say without seeing any logs. Logcat?

Generally speaking H.264/VP8/VP9 videos at 1080p should play just fine using software decoder. It depends on the app/service which codec it uses for video streaming.
[Raspberry Pi Original Development] tronmech:
Attaching the 2 logcats on paramount plus. And also attaching the logcat on AppleTV.
[Raspberry Pi Original Development] tronmech:
AppleTV logcat didnt' upload. NVM. Attached as TGZ in an edit.
[Raspberry Pi Original Development] KonstaT:
Thanks for the logs.

Apple TV seems to be DRM releated issue. It also seems that there is no regular mobile version of Apple TV app available. Android TV versions usually have more restrictions on device certification (e.g. regular mobile Netflix works while the Android TV version doesn't).

With a quick glance not sure what's up with Paramount Plus. There seems to be one native library missing (libbrotli_native.so) that is gapps related. Likely unrelated if it's only choppy playback/buffering you're experiencing.
[Raspberry Pi Original Development] kunjalr:
@KonstaT - First off - thanks a million for your work. So so so helpful for the community!

I'm having a peculiar problem. I'm using a Waveshare 7.9" 400x1280 HDMI display. I have both, a RPi 3B as well as a 4B. While the 3B boots perfectly, I cannot boot the 4B with the same settings.

With the 3B,

- with your 3B LOS 17.1 image

- with the manufacturer timings

I am able to boot perfectly

With the 4B

- with your 4B LOS image (17.1, 18.1, 19 - regular and ATV variants)

- with the same manufacturer timings

I am simply unable to get to the LOS boot animation. I will see the RPi boot screen (Raspberry+text), which fades away as though the HDMI timings were wrong.

Note

: I am able to boot the official Debian based RPi OS perfectly fine on the 4B with the same timings.

I've compared the 3B LOS and 4B LOS Config files and they look identical (of course except 4B has HDMI 0 and 1)

I've also used a microHDMI-HDMI adapter instead of the PCB adapter to rule out faulty traces.

Any thoughts on what might be going wrong?
[Raspberry Pi Original Development] KonstaT:
Please read the FAQ. You need to use a HDMI display that reports resolutions it supports via EDID.

hdmi_* options in config.txt have no effect with KMS driver that is used hw accelerated graphics on Android builds (LineageOS 17/18/19 on Pi 3 or Pi 4).
[Raspberry Pi Original Development] kunjalr:
The display is, in fact, an HDMI display that reports resolution via EDID.

I figured it out over the weekend. The way the HDMI section in config.txt is written, makes it seem like all settings are applied to both HDMI0 as well as HDMI1.

[HDMI:0]
[HDMI:1]
Default configs
[all]

This is incorrect and misleading. Any settings added/adjusted here will only apply to HDMI1.

After adding the required timings, I found the OS would still only boot when a TV was connected, but it wouldn't complete the boot until I connected the Waveshare display. Commenting out #[HDMI:1] allowed the system to apply all settings to [HDMI:0] and boot fine.
[Raspberry Pi Original Development] KonstaT:
That should apply to both (https://www.raspberrypi.com/documentation/computers/config_txt.html#combining-conditional-filters).

hdmi_* options in config.txt have no effect KMS driver that is used hw accelerated graphics on Android builds (these are only here for TWRP that doesn't use hw accelerated graphics). Only option that matters there is the overscan. Likely something else was wrong at your end.
[Raspberry Pi Original Development] Nagispace:
Hello I have an issue

Install is successful but it seems I can't get into system setting menu.

It always opens network settings
[Raspberry Pi Original Development] KonstaT:
Assuming you mean the Android TV build.

Android TV is not intended to be used with a mouse or a touchscreen. You need to have a remote to navigate the system (USB remote, Bluetooth remote, IR remote, TV's remote using HDMI-CEC, arrow keys on your keyboard, etc).
[Raspberry Pi Original Development] andele78:
Hello, everyone,

I connected a KY-040 with a Raspi 4B (LineageOS 18.1) for volume and switching off.

This is also enabled in the settings, if I turn the controller back and forth it moves much too slowly.

Does somebody has any idea?
[Raspberry Pi Original Development] KonstaT:
Hardware power/volume keys use gpio-key driver which is not intended for rotary encoders. It just sends a key event when the GPIO pin it uses is connected to ground. I guess that would depend how the hardware is implemented on the rotary encoder.
[Raspberry Pi Original Development] Strel0ka:
When i try to setup AuroraDroid and grant the "External Storage Manager" Permission, the app crashes with this error in the log:

Since this is LineageOS 18.1, which itself is based on Android 11, shouldn't this work?

Also, when I try to setup a VPN app, the app hangs and/or crashes, I get this error in the log:

This results in your Android 11/12 AndroidTV ROMs for the Raspi 4 (had the same issue with your LOS 19 ROM) being basically unusable for me. I installed Magisk, patched signature spoofing and installed MicroG thinking that maybe the ROM depends on GAPPS, but the issues persist. Any idea why that could be?

Edit:

It all works on your regular Android ROM, this seems to be a limitation of AndroidTV in general. Very unfortunate for my use case, but with the right launcher it should still be fine.
[Raspberry Pi Original Development] KonstaT:
As you already figured out Android TV is trimmed/dumbed down version of Android designed for its specific purpose. Use the regular tablet UI builds if you want to do anything productive.
[Raspberry Pi Original Development] Mingala:
Same problem, but found a workaround to make pairing work after a "minimal" custom install of tvmini OpenGApps.

Please see my post in OpenGApps Github issue 915
[Raspberry Pi Original Development] kyo-kusanagi:
LineageOS 18.1 (Android 11) for Raspberry Pi 4 B with hifiberry-digi:​

Thanks for this great rom for rpi. I have followed all the threads and despite all the various configurations I have not been able to activate my hifiberry-digi card with lineage OS 17 & 18. It gives me the idea that it is disabled on the kernel side although I hope I'm wrong because trying to recompile the kernel (https://github.com/lineage-rpi/android_kernel_brcm_rpi/issues/10) I am having problems recompiling. By the way, the "android_kernel_brcm_rpi" kernel (from GitHub) has "lineageos_rpi4_defconfig" already configured correctly. Hope you can help me activate it.

This is my config.txt:

# Audio

dtparam=audio=on

audio_pwm_mode=2

disable_audio_dither=1

#hdmi_force_edid_audio=1

hdmi_ignore_edid_audio=1

[all]

# Audio DAC

dtoverlay=hifiberry-digi

With or without Comment "dtparam = audio = on" hasn't changed anything

Thank you and hear from us
[Raspberry Pi Original Development] KonstaT:
Kernel already has drivers enabled for all Hifiberry DACs.

You shouldn't be modifying config.txt manually. Select Settings -> System -> Raspberry Pi settings -> Audio device -> DAC & Settings -> System -> Raspberry Pi settings -> DAC -> Hifiberry Digi/Digi+.

If that doesn't work, attach 'dmesg' output on booting the device and 'cat /proc/asound/cards' to check that the DAC is detected as an ALSA device.
[Raspberry Pi Original Development] kyo-kusanagi:
Thank you so much for your quick reply, I refleshed for safety, I set from Settings -> System -> Raspberry Pi settings -> Audio device -> DAC & Settings -> System -> Raspberry Pi settings -> DAC -> Hifiberry Digi / Digi +. It does not work. From the terminal I started "cat" and it doesn't actually load hifiberry-digi.
[Raspberry Pi Original Development] KonstaT:
Did you reboot your device in between?

Then 'dmesg' to give clues as for why it's not detected.
[Raspberry Pi Original Development] kyo-kusanagi:
Yes, I rebooted, I don't know how to extrapolate the demsg output of the terminal in full, meanwhile I'll show you a detail if it can help you
[Raspberry Pi Original Development] KonstaT:
If you're using some terminal application you can write to a file (e.g. 'dmesg > /sdcard/dmesg.txt'). If you're using ADB/SSH/serial console you can also copy the full output from the terminal window on your computer.
[Raspberry Pi Original Development] kyo-kusanagi:
from the local terminal tells me

dmesg > /sdcard/dmesg.txt

/ system / bin / sh: cant´t create /sdcard/dmesg.txt: operation not permitted

su

/ system / bin / sh: inaccessible or not found

lsblk

/ system / bin / sh: inaccessible or not found
[Raspberry Pi Original Development] KonstaT:
Writing to sdcard works in 'adb shell' even without root. Apps apparently can't as they're not allowed to write outside their own directories in recent Android versions. if you need root (su) please read the relevant FAQ section how to achieve that.
[Raspberry Pi Original Development] kyo-kusanagi:
Great thanks, fine with ADB / SSH / serial console.

There he is:

dmesg.txt - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com
[Raspberry Pi Original Development] KonstaT:
Thanks. That log shows nothing related to the DAC, no errors either.

Actually digging into the drivers after having a look at https://github.com/lineage-rpi/andr.../boot/dts/overlays/hifiberry-digi-overlay.dts shows that CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI alone doesn't do much. The driver your DAC uses is built with CONFIG_SND_RPI_WM8804_SOUNDCARD (https://github.com/lineage-rpi/andr.../arm64/configs/lineageos_rpi4_defconfig#L3809) which is not enabled in my builds. I can have this enabled in future Android 12/13 builds. There's no plans to provide any updates for older Android versions anymore.

What problem did you have compiling the kernel? There's kernel builds instructions here (https://github.com/lineage-rpi/android_kernel_brcm_rpi/issues/10#issuecomment-739346981) if you want to try building a kernel with that driver enabled.
[Raspberry Pi Original Development] kyo-kusanagi:
OK, for now thanks for all your help. Just for information I also tried your version "lineage-19.1-20220511-UNOFFICIAL-KonstaKANG-rpi4-atv" and it gives me the same problem unfortunately. For the kernel the procedure performed by me is the one in GitHub

The error is here:

android_kernel_brcm_rpi

android_kernel_brcm_rpi - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com

Thanks KostaKANG, I hope to hear from you