yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] Xenox003:
Hi guys, i might need some help getting LineageOS 20 running on the official 7" Touchscreen.

As mentioned in the "docs" there is an option in Settings: --> System --> RPI Settings --> Touchscreen, which is supposed to config the OS to properly run with the official 7" >Touchscreen.

When applying this setting and rebooting the PI i end up with

1. A Blackscreen on the Touchscreen (backlight on obviously)

2. A Blackscreen on the HDMI0 output (previously worked fine, probably its not supposed to work cause the touchscreen config is active, i don't need it anyways once i get the touchscreen running)

After taking a look at the boot/config.txt and resolution.txt i noticed the dtoverlay=vc4-kms-dsi-7inch line is uncommented and the resolution is set to 800x480, which seems right to me.

After a little bit more fiddling around i found out that if it boots into TWRP it displays fine on the Touchscreen, although the touch input does not work (which could also be a general thing wor TWRP, idk)

Am i missing something here? I don't seem to be getting, why its not properly booting into android/displaying the actual image.

if i should include some more info or whatever else, feel free to ask me ;)

Thanks in advance for the help.
[Raspberry Pi Original Development] KonstaT:
You need to disconnect any HDMI display when you're using the DSI display.

Touch also works in TWRP if boot to recovery through the Android power menu (touchscreen driver gets enabled separately as TWRP doesn't use hw accelerated graphics).
[Raspberry Pi Original Development] Xenox003:
Seems like disconnecting the HDMI Monitor woked fine, Touchscreen is displaying an Image, Touch input also works fine.

I really tried a lot of stuff before like changing the boot/config.txt to load additional/fewer drivers and whatever else. I guess i overcomplicated my view to the problem a bit, causing me not to try the most simple things like "Hey, how about i remove my HDMI cable and see if it works".

Thanks for creating this awesome custom kernel, prob helps out a lotta ppl. (y)
[Raspberry Pi Original Development] KonstaT:
Yes, could be worth pointing it out in the FAQ that you need to disconnect HDMI displays in this case.

This is an entire custom Android OS, but yes, it also contains a custom Linux kernel.
[Raspberry Pi Original Development] haruka-k:
Hey, thanks for your amazing work, everything works wonderfully.

Is there a way to turn off/on the HDMI output from a shell? The screen I use does not support CEC, so the only way would be turning off the actual output so the screen goes into "no signal" and shuts off; something like tvservice --off etc., but none of the commands I can find around on the internet seem to work.

Is any special command available for this here?

What I've tried:

rpi4:/ # tvservice --off
tvservice is not supported when using the vc4-kms-v3d driver.
Similar features are available with standard linux tools
such as modetest from libdrm-tests.
rpi4:/ # vcgencmd display_power 0
display_power=1
rpi4:/ # setterm --powersave off
/system/bin/sh: setterm: inaccessible or not found
127|rpi4:/ # vbetool dpms off
/system/bin/sh: vbetool: inaccessible or not found
127|rpi4:/ # cd /sys/b
block/ bus/
127|rpi4:/ # cd /sys/class/backlight/
rpi4:/sys/class/backlight # ls
rpi4:/sys/class/backlight #
[Raspberry Pi Original Development] KonstaT:
Short press on the power button will switch the display on/off like on any other Android device. If you want to do this in shell:

input keyevent KEYCODE_POWER

There's currently an issue with display blanking so the display is not switched off entirely. It looks like this is now fixed on upstream drm_hwcomposer so this should work again if/when there's another release.
[Raspberry Pi Original Development] Yoshikage_Kira:
What gapps should I use? I have tried several but no luck so far. And the wifi connects but I get no internet.

Ok, I installed the Lineage OS 19 and gapps issue is solved but the internet issue is still present.
[Raspberry Pi Original Development] Yoshikage_Kira:
The internet does not work on the Android TV version which is unfortunate.
[Raspberry Pi Original Development] jeff862:
What is the workaound choppy video for mkv file?
[Raspberry Pi Original Development] KonstaT:
New builds. H.264 hardware video decoding & encoding.

LineageOS 20 (Android 13)

for Raspberry Pi 4

konstakang.com

LineageOS 20 Android TV (Android 13)

for Raspberry Pi 4

konstakang.com

-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)
[Raspberry Pi Original Development] KonstaT:
https://twitter.com/i/web/status/1616054277629218819
[Raspberry Pi Original Development] Xenox003:
Hi guys, i just discovered a new problem regarding to the Raspberry PI Build of LineageOS 20

Let me take it a little short here: Bluetooth Low Energy does not appear to work

Let me give a little more context here:

I use my Behringer Flow 8 Digital Mixer together with the FLOW Mix app in order to do live audio processing, i want to run the FLOW Mix app on my raspberry PI running with this build here.

Once i tried to connect i noticed some strange behaviour when attempting to establish the BLE connection.

See the attached Video: https://streamable.com/678a2d

It seems to be activating and deactivating bluetooth all the time, when trying to connect to the Mixer with my Phone it works fine.

After diving a little bit deeper into the problem i could also exclude the FLOW Mix app itself. I tested the BLE connection with some BLE tester app, again on my phone it worked fine, on the raspberry it could not connect.

Phone:

Raspberry:

Anyone ever had simmilar issues? Do yall have a working fix for that?
[Raspberry Pi Original Development] KonstaT:
Android 13 switched to new gabeldorsche bluetooth stack so I'm not sure if everything is configured correctly just yet (see https://github.com/raspberry-vanilla/android_device_brcm_rpi4/blob/android-13.0/vendor.prop#L8-L32). Logcat would likely help to figure out the issue.

I've tested BLE on some previous Android version and it was working then at least.
[Raspberry Pi Original Development] Xenox003:
Here is a Logcat dump of the point in time i tried to connect to the device with BLE: https://pastebin.com/WE7Pt3HE

Just from looking at it it seems the bluetooth service dies quite often like this:
[Raspberry Pi Original Development] KonstaT:
Yes, I was able to reproduce this with my BLE heart rate monitor as well. I don't have any quick fix for this, though.

I know BLE has worked in some older version because I've tested this before. You can try some of the older versions if you need BLE support or dig into the Raspberry Vanilla sources (https://github.com/raspberry-vanilla) and try to fix it with Android 13.
[Raspberry Pi Original Development] vecchifede01:
It seems Gapps 13 for Android TV are available:

Codefire - Downloading /jdcteam/javelinanddart/gapps/ATV

BTW, has anybody tried using Geforce Now?
[Raspberry Pi Original Development] KonstaT:
I tested this but it seems to be broken as it fails to copy the files.

This is because https://gitlab.com/MindTheGapps/vendor_gapps_tv/-/commit/6c102b26b149076b482ea9c18e39cafa654c7653 and if you revert that change (edit update-binary that's inside the zip) it seems to work. I don't know why that change was made and why it doesn't work with TWRP included in my builds.
[Raspberry Pi Original Development] viteliogt:
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.
[Raspberry Pi Original Development] Arlo-Infinity:
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.
[Raspberry Pi Original Development] KonstaT:
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.
[Raspberry Pi Original Development] Arlo-Infinity:
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.
[Raspberry Pi Original Development] KonstaT:
Thanks, but that doesn't seem to be quite right either. Looking at it, it seems that Android TV 12 MindTheGapps are "broken" as well as files in system/system/ directory in the zip get copied to the wrong place and actually do nothing. I have no insight what GoogleExtShared and GooglePackageInstaller are and why this "works" even without them.

LineageOS only officially supports Android TV on couple of Amlogic devices where partition structure is probably different or there's some differences between LineageOS recovery and TWRP.
[Raspberry Pi Original Development] Arlo-Infinity:
Sorry, do you mean "Android TV 12 MindTheGapps" are broken or "Android TV 13 MindTheGapps are broken" or both?

For sure I can believe there are other issues you can easily spot that would take me forever to see. The only thing that I have established is that the "update-binary" file from MindTheGapps-12.1.0-arm64-ATV-20220912_160414.zip "works" in the sense that it boots up to the Android TV Setup screen and allows you to seemingly do a new device setup successfully both for MindTheGapps-12.1.0-arm64-ATV-20220912_160414.zip installed via TWRP over your build of LineageOS 19 Android TV (which I have been using as my TV for 3 months now -- thanks again!) as well as MindTheGapps-13.0.0-arm64-ATV-20230119_225339.zip installed over your build of LineageOS 20 Android TV.

I found these descriptions buried in another XDA forum, which is hopefully at least accurate in terms internal names for these packages:

com.google.android.ext.shared # Google Play Services for Instant Apps;

GoogleExtShared.apk

com.google.android.packageinstaller # Gives ability to install, update or remove applications on the device;

GooglePackageInstaller.apk

These look important if not required. The thing is both of "android.ext.shared" and "android.packageinstaller" show up in the list of installed System Apps on the Lineage OS 20 ATV install I created yesterday when installed using the "update-binary" as described above. Maybe there is some Google failsafe which checks, downloads, and installs them as long as the ATV setup app is started?? I know it auto-updates a bunch of the included system apps right away.

For completeness here is the output of my diff between the MindTheGapps-12.1.0-arm64-ATV-20220912_160414.zip and the MindTheGapps-13.0.0-arm64-ATV-20230119_225339.zip "update-binary" :

294c294

< cp --preserve=a -r ./* "${SYSTEM_OUT}/"

---

> cp --preserve=a -r ./system/* "${SYSTEM_OUT}/"

302,309c302,304

< if [ -e product/priv-app/TVLauncher ] ; then

< rm -rf "${SYSTEM_OUT}/product/priv-app/TVLauncherNoGMS"

< rm -rf "${SYSTEM_OUT}/product/priv-app/TVRecommendationsNoGMS"

< fi

<

< if [ -e system/priv-app/GooglePackageInstaller ] ; then

< rm -rf "${SYSTEM_OUT}/system/priv-app/GooglePackageInstaller"

< fi

---

> rm -rf "${SYSTEM_OUT}/product/priv-app/TVLauncherNoGMS"

> rm -rf "${SYSTEM_OUT}/product/priv-app/TVRecommendationsNoGMS"

> rm -rf "${SYSTEM_OUT}/priv-app/PackageInstaller"

Anyway, I hope this data is helpful to solve the mystery. If there is anything else I might be able to check that would help please let me know.
[Raspberry Pi Original Development] KonstaT:
Both, even the older Android 12 ones that appear to be "working".

I would assume that the GApps package should remove the default AOSP PackageInstaller and replace it with Google's proprietary one (GooglePackageInstaller). This doesn't happen as some files are copied to the wrong place (/system/system/* when it should be in /system/*).
[Raspberry Pi Original Development] viteliogt:
Im doing some test to making some builds of the gapps, hope i can get something to work im not a full time programmer but i will try.
[Raspberry Pi Original Development] viteliogt:
:D :D :D :D ok is working with GApps for ATV 13 i had made a custom build with several packages. i just don't know if i can share it
[Raspberry Pi Original Development] duckdown:
How does one follow the progress on HW decoding becoming available? Even if it is unrelated to this project which I must assume it is, how can I follow this progress?
[Raspberry Pi Original Development] SaturaniumYT:
Hello, I have been having this problem with my raspberry pi 4b refusing to connect to wifi at all costs. This has been a problem that has been going on not just on android 13, but this has also happened when the same raspberry pi ran both Android versions 11 and 12L, now including 13. Each time it tries to connect to my wifi, it immediately fails to do so. The only extreeeeeeeemely painful workaround is restarting it over and over again until it finally connects (it has successfully connected to wifi in those occasions). Help?
[Raspberry Pi Original Development] duckdown:
Could this simply be band incompatibility?

I've never seen it be able to utilize any of the recent technology offered on modern home routers in 2023 in North America.

I'm in Canada and I have to enable legacy wireless networks at times with many different hardware
[Raspberry Pi Original Development] SaturaniumYT:
I doubt it, on veeeeery rare occasions it does connect to wifi. But it only happens every once in a while. I'm just south of the border in the US
[Raspberry Pi Original Development] duckdown:
Having trouble with PIA VPN app and unclickable elements and broken scaling
[Raspberry Pi Original Development] duckdown:
Does anyone know of any way to fix this? I cannot even click into the username and password boxes, they are unclickable for some reason
[Raspberry Pi Original Development] KonstaT:
There is new AOSP 13 build released yesterday (20230130) with support for H.265 hardware video decoding and H.264 hardware video decoding & encoding.

https://xdaforums.com/t/dev-rom-aosp-android-13-for-raspberry-pi-4-b.4481977/

This will be included in my Android 12/13 builds if/when there are any new releases.

Impossible to say without seeing any logs (logcat?). Generally speaking wifi on Pi 4 seems to be pretty sensitive and it easily affects network performance if you're using e.g. a very crowded wifi channel. Switching the channel from your router might help.

This build doesn't include such app so you would report that to the app's developer. Most likely it hasn't even considered mouse support and you need a touchscreen to use it.
[Raspberry Pi Original Development] Homeye:
Also in the LOS 20 ATV build?

I have some other questions too, if you don't mind :)

I noticed that there's an android tv 13 LineageOS build, but not an AOSP one. Are you planning to make one?

Since both the aosp and los builds are without google apps, what's the difference between the 2 versions?
[Raspberry Pi Original Development] ethical_haquer:
Both FAQ links point to your Lineage OS 19 pages.
[Raspberry Pi Original Development] KonstaT:
Any Android 12/13 build if/when there are new releases.

No, there's no plans to release any AOSP Android TV builds as that's hardly any different from LineageOS.

LineageOS is AOSP fork that offers some further enhancements (apps, customization options, additional features, etc).

Thanks, fixed.
[Raspberry Pi Original Development] ethical_haquer:
@KonstaT, I just downloaded your Android TV build yesterday and it works well. However, I am not able to "Search movies, TV, and more" as it says on the home page. I click on the keyboard icon that shows up when I click up to the icon of a microphone, but when I do it says "Application unavailable". Do I need another app to use the search function? Also, is it possible to use a GPS module like this one or a celluar board like this with the Pi? I know you said USB ones would, but how about GPS modules that connect via GPIO?
[Raspberry Pi Original Development] ethical_haquer:
I had some issues when using a keyboard and mouse with it, scrolling was hard and certain buttons couldn't be pressed. I started using a real TV remote and it worked. I guess Android TV just isn't designed to use a mouse by default.
[Raspberry Pi Original Development] duckdown:
Oh okay, I don't think I have any suitable remote control, just a wireless Logitech keyboard that I do everything with

Unfortunately I had to go back to Raspberry Pi OS as I couldn't get this build to work on a Raspberry Pi 400. The audio driver does not work over HDMI or something.
[Raspberry Pi Original Development] ethical_haquer:
According to konstakang.com:

Q: How to enable audio through HDMI?

A: 3.5mm jack is used for audio by default. You can select the audio device you want to use by using a settings option found in Settings -> System -> Raspberry Pi settings -> Audio device.
[Raspberry Pi Original Development] duckdown:
I was able to do all of that, but once audio is enabled, it crashes system-wide randomly during all kinds of playback situations. Simply navigating the icons on the main screen for example, all of a sudden the clicking noise will be gone. Or browsing menus in Kodi. And it constantly cuts out for minutes at a time. It doesn't work more often than it does work - it's totally unusable unfortunately. I'd be more than happy to let someone SSH in if they think they can solve the riddle!
[Raspberry Pi Original Development] ethical_haquer:
Yes, it looks like your not the only one having this problem: see here.
[Raspberry Pi Original Development] duckdown:
Ahh, good find. I knew there was no way it was some special scenario where only my TV would be affected. I'm just using standard RPi400 with no special configuration. HDMI Audio should be marked as not working in the release notes in my opinion. I don't know where else to turn for help with this. It's extremely frustrating because all these releases need is the audio fixed and I would never go back to using anything else!

I NEED THIS FIXED!
[Raspberry Pi Original Development] ethical_haquer:
You could try the A/V port instead, or does this problem affect that too? I was using audio over HDMI also, and when I clicked through settings it would sometimes miss a "click" noise. Rebooted and it seemed like it worked better, but I really need to try using Prime Video to test it.
[Raspberry Pi Original Development] KonstaT:
New builds. H.265 hardware video decoding, H.264 hardware video decoding and encoding!

LineageOS 20 (Android 13)

for Raspberry Pi 4

konstakang.com

LineageOS 20 Android TV (Android 13)

for Raspberry Pi 4

konstakang.com

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

update to Mesa 22.3.5

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

Android security patch level: 5 February 2023 (merged)
[Raspberry Pi Original Development] leonardopires:
Hi Konsta! Great Job!

I`ve tested the new version to connect bluetooth and Xbox Wireless Controller. Same problem like AOSP Android 13 version....
[Raspberry Pi Original Development] Homeye:
Hi! This new build is great, thank you for your hard work! But i have some questions/observations:

1. I can't find any settings for bluetooth. Checked every setting, maybe i'm blind. I wanted to try if i can connect my xiaomi mi box's controller. EDIT: when the pairing mode is on, i can see with my phone that the bluetooth is working. I'll try again tonight to pair with the remote and with an xbox controller too.

2. In the "Inputs" settings, the "TV auto power on" keeps turning back on, i can't disable it.

3. I can't enable notifications for any app. Always turn back to off.

4. The device is not certified. Tried to flash the universal safetynet fix, changed the values with the magisk hide props config to mi box and nvidia shield, but no success. Any tips how to fix this?

5. Is there any way to switch the webview settings? One app downloaded google's webview but i can't find the settings for it to change.
[Raspberry Pi Original Development] aclinical:
Great release, video playback is working very well across apps, it's a big improvement from the late Jan release.

I'm still seeing some drops, pops and distortion with HDMI audio. An overclock improves things a little but for everyday use the analog jack seems like the best option right now.

Awesome work KonstaT!
[Raspberry Pi Original Development] duckdown:
Is there anybody at Raspberry Pi forums that might know what to do about the HDMI audio? Mine is much worse than pops and distortion, it's drops that last minutes at a time :(

I typed logcat and it shows tons of stuff but I don't know how to attach it here, and I'd be surprised if it shows anything you don't already know about but I can try
[Raspberry Pi Original Development] duckdown:
Pi 400 all audio has to be over HDMI Google says
[Raspberry Pi Original Development] ethical_haquer:
Yeah, I forgot the Pi 400 doesn't have an audio jack.
[Raspberry Pi Original Development] whytf:
I am not sure what i am doing wrong, first time the lineage os android 13 worked pretty okay, however after trying to switch to lineage os android tv 13, neither version works and both are stuck at blue screen, tried dd and windows diskpart clean on the external jmicron ssd but it just doesn't work.

arguments that i changed:

comment sdcard and uncomment usb boot

applied overclock that worked first time with lineage and works always with raspbian

(over_voltage=6 arm_freq=2147 gpu_freq=750 gpu_mem=1024)
[Raspberry Pi Original Development] whytf:
It was not the overclock, but gpu_mem that bricks android even if set to 512MB, it does work on 384MB rn