yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] KonstaT:
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.

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.

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
[Raspberry Pi Original Development] duckdown:
Greetings! I have a Raspberry Pi 400 and always wanted to run Android on it. After seeing a headline on a news site this week about this thread and Android 13 becoming available, I was delighted.

However, the instructions warn that it’s for advanced users only, which I am not. My main use for this would be IPTV and a handful of Android TV based streaming apps amongst various other APKs. Not working mentions hardware video decoding, does this mean something like TiviMate would not be working? Just trying to determine if a novice user like myself would be able to use this reliably

thank you!

edit - it seems I am late to the party and Android has been installable even previous to this, on a Raspberry Pi 400? Is that correct? If so, is there a reliable version you recommend that has a working Google Play store? I don’t mind earlier Android TV versions if needed! Thanks again
[Raspberry Pi Original Development] KonstaT:
Thanks, hadn't even noticed that this had made into XDA news! :)

Lack of hardware video decoding/encoding means that Pi's dedicated hardware for H.264/H.265 video dec/enc is not used but this is done on the CPU with software video dec/enc instead (some explanation here https://xdaforums.com/t/dev-rom-aosp-android-13-for-raspberry-pi-4-b.4481977/#post-87316981). Software video decoder normally manages to keep up 1080p30 videos just fine. This also depends on the video codec that is used. Some services (e.g. Youtube) have switched to using VP9 for which Pi doesn't even have hardware dec/enc to begin with. There's also some limitations with streaming services that provide DRM protected content (e.g. Netflix) due to Widevine L3, but that's another story. I don't see any specific reason the app mentioned wouldn't work but that's something you need to test yourself.

UI on all the Android TV releases looks pretty much the same. You probably don't even know what Android version you're running unless you go specifically looking for it in the settings. There could be some issues with HDMI audio on Android 12/13 builds that is not an issue on Android 11 (see e.g. http://disq.us/p/2r2wh1w). There's currently no GApps available Android TV 13, for Android TV 12 you only have MindTheGapps, as for Android TV 11 there's also option to use OpenGApps which gives you the Google's Android TV launcher as well. Choice is entirely your of course and GApps are not part of my releases in any case. You can see the list of all the available builds here (https://konstakang.com/devices/rpi4/).
[Raspberry Pi Original Development] Moogle:
Is it me or is there no place to download your copy of TWRP for this?
[Raspberry Pi Original Development] duckdown:
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!
[Raspberry Pi Original Development] KonstaT:
The pictures you posted look like the remote pairing screen which you can just bypass by pressing back button. It probably just looks a bit weird as you're using some non-standard display resolution(?).
[Raspberry Pi Original Development] ethical_haquer:
Alright, I'll try pressing the back key. F2 right? Like I said, the onscreen buttons can't be pressed. As for the display, those pictures were from a 7in touch screen. I use it for testing, and my TV for actually using it. I'll let you know how it goes!
[Raspberry Pi Original Development] KonstaT:
New builds.

LineageOS 20 (Android 13)

for Raspberry Pi 4

konstakang.com

LineageOS 20 Android TV (Android 13)

for Raspberry Pi 4

konstakang.com

add support for AV1 software video decoding using FFmpeg and dav1d

update to FFmpeg 6.0

update to libcamera master/v0.0.5

update to alsa-lib/alsa-utils v1.2.9

update to Mesa 23.0.3

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

Android security patch level: 5 May 2023 (merged)
[Raspberry Pi Original Development] SaturaniumYT:
Hello,

I have been having a problem of giving internet data access to Google Play Services on LineageOS TV 20 (Android TV 13). I have been trying to find the place where you give the app its necessary internet data access. However, there is no option for Mobile Data/WiFi to turn on such a thing. I have been able to do this many times before on the normal flavor of three Android versions (12L, 12L TV, and then 13), but for some reason, I am unable to do so in Android TV 13. Help?

On another note, is this the correct place to post Android TV 13 questions? If not, I have been unable to find a suitable version of this thread. If this were the case, could you or someone else send me the correct link to post there?

Sincerely,

Saturanium
[Raspberry Pi Original Development] KonstaT:
This shouldn't be necessary in the first place if you've followed the GApps installation instructions and performed factory reset.
[Raspberry Pi Original Development] cornwarecjp:
This looks like the issue I had with Google Play when I installed it incorrectly. After re-doing everything correctly (I even copied the LineageOS image to the SD card again), it worked. The step that may have fixed it might be the factory reset *after* installing Google Play Services *before* rebooting into Lineage OS.
[Raspberry Pi Original Development] cornwarecjp:
I'm having a problem getting an USB (UVC) webcam to work as a camera. This is my configuration:

Raspberry Pi 4B 8GB

Raspad 3

16GB SD card

Trust HD 720P webcam

This LineageOS version (build 2023-05-05)

NikGApps 13 (build 2023-04-18)

I've attached the camera before power-on, and kept it attached all the time.

I installed an app called "USB Camera Viewer", and it works fine with my webcam, but the built-in camera app of Lineage OS just stops (other times it said it can't connect to the camera). I can imagine the "USB Camera Viewer" app bypasses the camera HAL and connects on a more low level to the camera directly, but I don't know how to confirm that (or whether it's even possible).

I installed an app called "Device Info HW", and it shows a completely empty "Camera" tab. Interestingly, on the "Drivers" tab, it does *not* show a "uvcvideo" driver. Assuming this page lists kernel modules, I would have expected that module (at least that's how the driver is called on my Linux laptop). On the "USB" tab, the camera shows as a "Sonix Technology Co. Ltd." USB 2.0 Camera, device ID 0c45:6340, number 1005.

The webcam works on my Linux laptop, and Guvcview shows it supports MJPG (among other formats).

Is there anything else I can try to diagnose this problem?
[Raspberry Pi Original Development] SaturaniumYT:
Interesting how you have to do that now; because when I installed LineageOS TV 19.1, I didn’t have to do such a thing. Anyways, how would you factory reset the device BEFORE rebooting the system (AFTER installing the GApps Package)? TWRP Recovery Mode? And is it too late to factory reset the device AFTER rebooting the system and installing the GApps package?
[Raspberry Pi Original Development] cornwarecjp:
IIRC, I did something along these lines:

Write the Lineage OS image to the SD card

Use GParted to maximize the size of the data partition (optional)

Boot Lineage OS

Change the Lineage OS settings to allow me to reboot to recovery mode

Insert USB drive with NikGApps core zip file on it

Reboot to (TWRP) recovery mode

Factory reset (just to be sure)

Mount the USB drive and install NikGApps from the zip file

Factory reset (this is the factory reset I was talking about)

Reboot back to Lineage OS

So, for me, it was necessary to first boot once into Lineage OS before being able to enter TWRP, but it still worked. I installed GApps from TWRP, and immediately after that, I did a factory reset from TWRP, before rebooting.
[Raspberry Pi Original Development] cornwarecjp:
Regarding my USB camera issue:

I've attached the logcat output of a session where I've booted with the camera attached, and then (at 20:12), started the failing camera app.

*EDIT*: for brevity, I've removed some data from this post I now consider unimportant.These are my new findings:

In the attached log, I found these lines:

05-08 20:12:12.758 236 333 I ExtCamDevSsn@3.4: configureStreams: request stream 1280x720
05-08 20:12:12.758 236 333 I ExtCamDevSsn@3.4: configureStreams: request stream 1280x720
05-08 20:12:12.784 236 333 I ExtCamDevSsn@3.4: configureV4l2StreamLocked: V4L2 buffer size is 1843789
05-08 20:12:12.784 236 333 E ExtCamDevSsn@3.4: configureV4l2StreamLocked: V4L2 buffer size: 1843789 looks invalid. Expected maximum size: 1843200
05-08 20:12:12.784 236 333 E ExtCamDevSsn@3.4: V4L configuration failed!, format:MJPG, w 1280, h 720
05-08 20:12:12.784 284 1126 E Camera3-Device: Camera 100: configureStreamsLocked: Unable to configure streams with HAL: Function not implemented (-38)

1280x720 is the highest resolution supported by my webcam, so it seems at least that my camera is recognized and there is some interaction going on. I don't know what to make of the buffer size error. I'd say the "configuration failed" error is the real show-stopper. I tried with Guvcview on my Linux laptop, and it has no problem using 1280x720 with MJPG format, so I don't know what fails here. I could try to take the Android code that generates this message, and compile+run it on my Linux laptop to get more info...
[Raspberry Pi Original Development] SaturaniumYT:
For some reason, this did not work for me. I am still having problems with Google Play Services' internet access permission.
[Raspberry Pi Original Development] KonstaT:
There's nothing new here. You've needed to perform a factory reset when installing GApps since forever (I've done this 10+ years) and the importance of this step is pointed out with and exclamation mark in the FAQ.

Please follow the instructions in the FAQ on how to install GApps. I'm absolutely sure this will work following the instructions.
[Raspberry Pi Original Development] KonstaT:
The UVC camera is detected by the Android external camera HAL but it's getting an invalid buffer from the camera.

There's one similar report previously (http://disq.us/p/2kmyalp). I don't have any hardware to reproduce this issue. Not all UVC webcams are alike since this works fine with my Logitech one.

If you're interested in digging into this, you can look into building AOSP using the Raspberry Vanilla source code (https://github.com/raspberry-vanilla) I've released. Android external camera HAL (https://source.android.com/docs/core/camera/external-usb-cameras) is used for UVC webcams on my recent builds.
[Raspberry Pi Original Development] cornwarecjp:
I'd like to, but I have no experience building Android. Since Android is quite large, does it make sense for me to just recompile the component I want to change, and patch the installation on my SD card with the result?

What I'd like to do in particular is to change the value of "kMaxBytesPerPixel" from 2 to 4 in a source file called "camera/device/3.4/default/include/ext_device_v3_4_impl/ExternalCameraDeviceSession.h". That value seems to determine the max buffer size accepted by the code.

MJPG is a variable-sized compression algorithm, so I can imagine a too-tight limit on the buffer size can sometimes be exceeded. Still, 1843789 bytes is way larger than I'd expect. It's actually slightly larger than 2 bytes per pixel, while *uncompressed* image data is 3 bytes per pixel. Normally JPEG compresses about 90%, so I'd expect buffers with about 0.3 bytes per pixel on average. Maybe this camera maxes out the JPEG quality so there is almost no compression? Or maybe the first few frames are bogus data (as some sites report)? We'll see.

*EDIT*: I've done some experimenting on my laptop with my webcam and some example V4L2code. It works just fine with all the settings used by the Android code; captured frames are roughly 54kB in size (including the first frame). *However*, just like in Android, the driver/camera reports back to the application that its image size is 1843789 bytes (about 1.8MB). I suspect the camera developer was just lazy, so it reports the same image size for all image formats, even though MJPG is usually much smaller.

Now that the problem is fully known, I think the solution is indeed to make the Android code a bit more relaxed on the image size value returned by the camera. The "kMaxBytesPerPixel" change I mentioned above should be more than enough for my camera. Next question: how to recompile with the changed code?
[Raspberry Pi Original Development] KonstaT:
You would follow the build instructions to compile.

GitHub - raspberry-vanilla/android_local_manifest

Contribute to raspberry-vanilla/android_local_manifest development by creating an account on GitHub.

github.com

To compile just the external camera HAL and it's dependencies, you would 'make android.hardware.camera.provider@2.5-external-service' instead of boot/system/vendor images. You could get by just replacing one lib in the existing image (/vendor/lib/camera.device@3.4-external-impl.so in this case) but I'm not entirely sure.
[Raspberry Pi Original Development] wojtekojtek:
Hello!

I bought a new touch screen (link)

When I connected touchscreen's usb and hdmi to my sony tv, touch was working, but when I'm connecting usb and hdmi to touchscreen, touch is working, but screen isn't.

Can someone help?
[Raspberry Pi Original Development] KonstaT:
Please read the relevant FAQ section about issues with display and how to change the resolution to one supported by your display.

It's also not recommended to use dual-HDMI displays that have different resolutions.
[Raspberry Pi Original Development] bballs91:
Any resolution to the boot loop issue related to Wifi drivers? I've dug through so many forum posts and comments on konstakang's site I can't tell if its supposed to be resolved now or not. I think the latest I read was something with ANQP / Hotspot 2.0 being in the vicinity crashes the wifi driver loading 🤔.

I've tried the latest builds (as of 05.07.23) of Konstakang's Lineage 18.1, 19, 20 as well as AOSP 13 and 12L and all exhibit very similar behaviour, in that they show the Lineage boot animation (arc with circle animating across it) or the AOSP boot animation (android wordmark with gradient animation) for 5-10min and then reboot and then do the same thing all over again.

Setup:

- 1x Raspberry Pi 4B 2gb

- 1x 3A official Raspberry Pi USB-C charger/power supply

- 1x 32gb Sandisk Extreme U3 und V30 MicroSD

- No USB Devices attached

- Only Power (USB-C) and HDMI0 video out attached
[Raspberry Pi Original Development] KonstaT:
This has been fixed in any release after December 2021.

I haven't received any similar reports. Most likely something with your setup. Impossible to say without seeing appropriate logs (logcat, dmesg).
[Raspberry Pi Original Development] wojtekojtek:
changing resolution.txt?

I tried - not working.

I also deleted it. not working

I also reflashed it - not working.
[Raspberry Pi Original Development] KonstaT:
You could see if this helps.

http://disq.us/p/2tspun6
[Raspberry Pi Original Development] wojtekojtek:
Thanks!

I modified config and resolution and hope it works.

I'm booting it now, there is black screen :|

edit: Not working 😭
[Raspberry Pi Original Development] bake98:
Hello, I am having a problem with the OS as well on my pi 4b when I boot lineage os there is either no signal or it will go to the rainbow screen for a second and then stop someone told me to try deleting config.txt but all that did was make the rainbow screen stay and my pi green light to repeatedly flash 7 times
[Raspberry Pi Original Development] ny-hardcore:
just to check before i try something:

does the RPI 4 support 4k output for the GUI in Android?

Or is the 4K output only possible for video? (this is the case with my Odroid C4 android)

i want to use a RPI 4 with android to run fully kiosk browser in 4k (2160x3840 , portrait mode)

The browser resolution needs to be 2160x3840
[Raspberry Pi Original Development] KonstaT:
It's a requirement that you use a HDMI display that reports resolutions it supports via EDID.

If your display doesn't report any EDID, adding custom EDID firmware to the kernel and appending /boot/cmdline.txt with 'drm_kms_helper.edid_firmware=edid/{your_edid_firmware}.bin' should work as last resort. The kernel includes EDID firmware for few resolutions but 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#issuecomment-984084521

Please read the relevant FAQ section about issues with display. Removing config.txt is certainly not suggested anywhere as your device obviously won't boot if you remove it.

Yes, if your display reports the resolution as supported via EDID. Using 4k display resolution will naturally affect general performance as the GPU on the Pi is not that powerful and there's four times more pixels to render compared to the 1080p resolution used by default.
[Raspberry Pi Original Development] ethical_haquer:
That's what I was thinking as well. To be honest the performance of this ROM on my Pi 4 8GB is actually pretty good. It's definitely better than my Vizio smart TV, which gets slower with every forced update. :ROFLMAO: There was a noticeable performance increase when I swapped out my SanDisk Micro SD with a USB 3.0 flash drive, as it gets rid of read/write bottlenecks.
[Raspberry Pi Original Development] Jean.Dean:
Hello everyone.

My Raspberry Pi 4 8GB is supposed to replace my Formuler.

After installing LineageOS 20 Android TV - KonstaKANG (Android 13) and MindTheGapps-13.0.0-arm64, everything is up and running so far.

Only Amazon Prime Video and Netflix don't play anything. I can start the apps and see all the content, but when I try to play something I get "Something went wrong" (Amazon). The situation is similar with Netflix.

Booth Apps are from Google Play Store

I've been reading through various threads for a while now, but can't find a suitable solution

Since I've only been working with the RasPi for about a week, I used this tutorial
[Raspberry Pi Original Development] ny-hardcore:
all right. I've done my share of building custom android roms and flashing stuff, but not for raspberry,.

i've setup my build box and building the vanilla android project to see If it compiles on my box without errors.

I've also generated a edit bin file from my Xorg modeline.

Can you give me some pointers on how to build a kernel that I can flash on the lineage os build? or isn't that possible with the vanilla source?

I found

GitHub - raspberry-vanilla/android_kernel_manifest

Contribute to raspberry-vanilla/android_kernel_manifest development by creating an account on GitHub.

github.com

Going to try that
[Raspberry Pi Original Development] ethical_haquer:
It sounds like you and me are in the same boat. :) I have also been trying to get Prime Video working. Are you passing SafteyNet? (Use the YASNAC app from GitHub to check: link) If you aren't passing SafteyNet I would install the Universal SafteyNet Fix by @Displax (Yes, you will have to root, see the FAQ here for how-to) Also after you have Magisk installed active the DenyList and add any apps you would like to hide root from. (GAPPS, Prime Video, Netflix, etc.) Then wipe the data of the apps you added to the list and reboot. (Apps often remember that you were rooted) Next check YASNAC again and see if you pass! Also, ideally you wouldn't install the apps from the Play Store, you would side-load them. So I would uninstall them and do that as well. Now, when I followed these same steps, more or less, Prime Video Android TV still didn't work. However, I would still try, as your system is different than mine. (For one, I haven't connected any Google account) You should be able to side-load the Prime Video normal (Non Android TV) app and guess what! It will just work. (No rooting required) This is what @KonstaT has said, that the TV versions are more strict then the regular apps. I'm not sure about Netflix, but try it when you're passing SafteyNet and if that doesn't work then people have had success side-loading an older version of the app. Let me know if you have any questions! :)
[Raspberry Pi Original Development] bake98:
Hello I added to my cmdline so it now says

console=ttyS0,115200 no_console_suspend root=/dev/ram0 rootwait androidboot.hardware=rpi4 androidboot.selinux=permissive /boot/cmdline.txt with 'drm_kms_helper.edid_firmware=edid/{edid/1920x1080.bin}.bin

And deleted resolution.txt and still have the same issue. What should I try?
[Raspberry Pi Original Development] bake98:
Nevermind I just needed to edit my config so I could boot from usb
[Raspberry Pi Original Development] KonstaT:
You would need to use Android TV GApps for the Android TV build. Correct GApps package for the build is linked in the FAQ on each page on my site.

Both Netflix and Amazon Prime have been reported working but you need to use the regular mobile version of the app instead. Android TV versions tend to have more restrictions (SafetyNet API, etc. IIRC Netflix even requires Android TV device to be specifically whitelisted for their servers).

I would also of course recommend following instructions on my site (and nothing else) instead of random tutorials you can find online. :)

That should be:

console=ttyS0,115200 no_console_suspend root=/dev/ram0 rootwait androidboot.hardware=rpi4 androidboot.selinux=permissive drm_kms_helper.edid_firmware=edid/1920x1080.bin

But apparently this wasn't display issue at all. Yes, you need to follow the steps in the FAQ on how to boot from an USB device.
[Raspberry Pi Original Development] ethical_haquer:
So, there's also another option, if this doesn't work for you: Kodi. I am testing it out right now and... It's actually working out quite well. For one, Prime Video is working with the Amazon VOD add-on just fine. At first I was a bit disappointed with the defualt UI (called a "skin") but there are multiple other skins available. Currently I am using the "Artic: Zephr - Reloaded" one. I just installed LibreELEC for the pi (Kodi is really an app, not an OS, so LibreELEC is "Just enough OS for KODI", and the only thing it does is run Kodi) and then installed the Amazon VOD add-on. Then, just for looks, I changed and customized my skin. Sounds like you're using Netflix as well, and there's an add-on for that too: Kodi thread, GitHub.