yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] freakalad:
(lost earlier long, detailed feedback due to xda downtime)

reflashed from scratch.

through process-of-elimination, altered /boot/config.txt (hdmi_mode=16) & system/build.prop (debug.drm.mode.force=1920x1080)
[Raspberry Pi Original Development] KonstaT:
And what happened? It works now?

Clean flash the image, don't edit anything! It should work on your lounge TV or whatever you call it. If it doesn't, grab a logcat and pastebin it.

Modifying hdmi properties in confix.txt does nothing with graphics drivers used in this build. Actually don't touch the config.txt at all or you might break things! Display should report list of resolutions it supports via EDID (what we checked with Raspbian). Resolution that is used in Android is selected with debug.drm.mode.force property (1280x720 by default). If the display doesn't report anything via EDID (not your case) or doesn't support the selected resolution (not your case with lounge TV, but is the case with lab monitor), there's going to be trouble.
[Raspberry Pi Original Development] ferivon:
Any chance you can make your code public to enable people to contribute, debug and audit?

I read somewhere that you don't want to make the code public because someone is illegally selling your builds.

My thoughts on that:

- Why would anyone even buy something that is available for free? (And even if they did, who cares?)

- Selling a build doesn't even require the source code, so you can't prevent it anyway.

For what it's worth: I'd be more than willing to donate. But I generally only donate to open source projects.
[Raspberry Pi Original Development] KonstaT:
No plans and the reason is still the same last time I wrote about it. Again, if there's any reputable developers who want to contribute, I'm happy to share the source code e.g by allowing access to private GitLab repository. Source code for LineageOS 14.1 & 15.1 builds for Raspberry Pi has been open source for years and practically no one has showed any interest to contribute, debug or audit anything (there's been exactly two minor outside contributions). LineageOS itself is open source and Linux kernel for this build is open source (per GPLv2 requirement). Some Raspberry Pi device specific stuff I've kept for myself. Some stuff included in the image I've licensed under non-commercial license just in case.

I guess because people are unaware, uneducated or just not that smart. ;) Or maybe people seen it promoted somewhere it shouldn't have been in the first place. That's the current goal to raise community awareness so no one purchases that because they can already get much much better things for free. :) I care when someone takes something that I've made and given away for free, sticks his own name on it, claims it's something he's made, and sells it. Especially when that person turns out to be a total scammer. RaspAnd has been android-rpi, lineage-rpi and now it's brobwind's work, but the name always stays the same. He has never released a single line of source code for anything or contributed anything back anywhere - just leeching off of hard work of others and selling it for his personal profit. That is totally against my idea of what open source stands for! Mostly this a matter of principal and an ideological thing for me.

That's completely wrong. There's open source licenses such as GPLv2 that obligate anyone distributing a binary to also release complete corresponding source code. If you don't comply with the license you don't actually even have any right to distribute it for free - let alone sell it! XDA actually takes this quite seriously and this topic is stickied on every forum.

Yet you haven't donated. Generally speaking people's willingness to donate and them actually donating doesn't correlate. ;) I've been doing open source development and Android custom ROMs for various devices for past 8 years. Trust me, I've heard it all. Do this, do that and I'll donate - yet they never donate even when promised and delivered!
[Raspberry Pi Original Development] ferivon:
Personally I am auditing code of software that I use quite a lot. And I can't even count the amounts of times that being able to look at the source code of Android or the Linux kernel have saved my ass debugging something.

You just can't see when people are doing that.

I also build a lot of things myself because otherwise in my opinion you just trust it anymore. (Too many developers have been forced to put backdoors and spy crap into their software via NSL and the like.)

That's definitely good to hear, but how "reputable" would one have to be? I mean I have a Github account with a bunch of open source projects, but non of them are well-known or anything.

No, you don't get the point. I could literally right now start selling your builds. It doesn't matter if I have the source code or not. If I don't have your permission, it would be illegal either way.

So I could illegally sell your closed-source builds right now, or if you were to make the source code public, I could build it myself and then illegally sell it.

I just don't see the difference. :confused:

Not true at all. I have donated a lot of money to plenty of open source projects and organizations that support open source development.
[Raspberry Pi Original Development] KonstaT:
Well, what exactly do you want to audit? You can already look at the Android source code and you can already look at the Linux kernel source code. It's practically only lineage-16.0 specific changes to Raspberry Pi device configuration that are not public (even that is open source up to lineage-15.1).

What is the point you're trying make exactly? That people do illegal sh*t no matter what? Why would I give someone more ammunition to do even more illegal things when I can stop it by simply keeping some things to myself? You think there's never going to be any legal implications if you do things that are illegal enough for a time period long enough?

I meant that you haven't donated anything towards Android development on Raspberry Pi and I've heard that same line literally hundred times already. If my existing open source efforts on Raspberry Pi are not enough for you, you're of course always welcome to donate to the open source LineageOS project as well (paypal.me/LineageOS, patreon.com/LineageOS). :)
[Raspberry Pi Original Development] freakalad:
Is there a rotation bug?

Trying to load some apps (spotify?); some that default portrait layout & interaction is... corrupted.

---------- Post added at 01:55 PM ---------- Previous post was at 01:04 PM ----------

Got a pretty decent result on second (lower-end) lab monitor - had to modify system/build.prop, debug.drm.mode.force=1920x1080

Same image & box used the other lab monitor.

ROM stability seems highly dependent on peripherals attached.

Still quite buggy around the edges, but good enough for use.

Would LOVE to be able to submit bugs via tracker, request functionality - i.e. would be very cool to have HDMI-CEC control

---------- Post added at 02:29 PM ---------- Previous post was at 01:55 PM ----------

screen-rotation bug: trying with AirScreen app: https://paste.pics/dec886bd218af04371f286116931ea47
[Raspberry Pi Original Development] KonstaT:
Yeah, increasing the resolution to 1920x1080 will consume more memory and affect overall performance as well. Pi's 1GB of RAM is shared with the GPU so it's very limited. You can edit /boot/cmdline.txt and increase CMA allocation (currently cma=320M) but that's away from other things. That should get rid of the crash you logged, though. I guess it's just best to stick with displays that support 1280x720 because that's much better for overall stability as well.

Raspberry Pi is not an Android device to begin with so it will never meet the requirements for official LineageOS support (https://github.com/LineageOS/charter/blob/master/device-support-requirements.md). This project doesn't quite fit any official Android ROM paradigm anyway and I have no intention to pursue that.

Yeah, that's been reported before and with previous LineageOS versions as well. Android creates a virtual layer for portrait apps on devices that have forced landscape orientation. That doesn't seem to quite work with any of the graphics drivers we've used.
[Raspberry Pi Original Development] freakalad:
Unsure re context (above), but is there a workaround for this? Some sort of forces portrait mode?

I don't mind turning my head sideways for initial setups of apps. I tried using Tap 'n' Turn, but ironically that seems to use portrait orientation to complete the setup.

Tangential question: is the OS DRM enabled? Reason being I'd like to know if this ROM/build finally solves the Netflix-problem (1080p HD). My inclination is that it seems to, but I'm looking into how to verify.

Also, kindly requesting HDMI-CEC input control for a future release. This ROM is the closest thing I've encountered to being able to do something resembling Android TV on RPi (which is the goal I'm edging towards, thanks).
[Raspberry Pi Original Development] KonstaT:
Yes, you can override the forced orientation with a system property (see https://www.raspberrypi.org/forums/...sid=be2be03d0995d4a62b77eb1fb80a468f#p1493958). You can use a third party app after that if you want to force portrait orientation.

You can use an app that shows information about DRM (e.g. https://play.google.com/store/apps/details?id=com.androidfung.drminfo). There's support for Widevide L3. AFAIK Netfix HD requires Widevine L1. Display resolution by default is also only 720p.

I don't have any plans for adding HDMI-CEC support (or any future releases for that matter). If you/someone else want such feature, you're welcome to do the work yourself. You can do this with LineageOS 15.1 which is open source. It will be easy to add it here after that as well and I'll of course give credit to the author as always. :)

I haven't made this into an Android TV image for a reason so people don't make the mistake of thinking that this is supposed to be some media device. There's e.g. no support for hardware video decoding/encoding as this is not an Android device to begin with and Broadcom doesn't provide any Android specific drivers for it.
[Raspberry Pi Original Development] kiai72:
hello,

works unbelievable fast! great work! i had some hdmi problems in the beginning, but was able to solve the (my TV has 2 modes 1280x720, but only one of it works for some reason).

even DRM works - perfect!

now i only have minor problems, maybe you can help ?

1. sound: i had to hdmi_force_edid_audio=1 to get sound. i have sound now, but when my USB-soundcard is plugged in, sound comes through USB (i use this for other ROMS).

is there a way to force sound through HDMI instead of USB ?

2. missing some pixels: the uppermost, upperleft, ... fixels are missing. can i fix this somehow ?

3. sometimes the screen flickers, even goes off for a second, then on again.

i happens for example, when i press (NOT LONGPRESS) f5 - or when chrome starts
[Raspberry Pi Original Development] KonstaT:
1. Thanks, good to know you might need hdmi_force_edid_audio=1 with some displays. It could be a matter of whether CEA or DTM mode is being used (https://raspberrypi.stackexchange.com/questions/7332/what-is-the-difference-between-cea-and-dmt). I don't have any USB soundcards so I haven't looked into it. Have you looked through audio and developer options in setting menu? At least when bluetooth speaker is connected, you can select from the audio settings which device you want play media to. There's also 'Disable USB audio routing option' in developer options. It's probably possible to kill the USB audio support all together (remove/comment out this line https://github.com/lineage-rpi/andr...vendor/etc/audio_policy_configuration.xml#L26). But why not just unplug the device if you don't want to use it...

2. Maybe from you display's settings somehow? Overscan options in config.txt (https://www.raspberrypi.org/documentation/configuration/config-txt/video.md) don't seem to have any effect with the graphics drivers used in this build.

3. That's intended behaviour as F5 key is the power button (same thing with FAQ's DIY power button). Just like on any other Android device short pressing the power button switches the display off/on. Long press on the power button brings up power menu. I've seen the display flicker sometimes in memory intensive situations as well. Pi 3 only has 1GB of RAM and that is also shared with the GPU so sometimes it simply runs out of memory.
[Raspberry Pi Original Development] kiai72:
about the missing pixels: i could fix this by changing some settings on the TV.

about the USB-sound: developer options - disable USB autorouting doesn't help. So i'm still interessted in a solution - but it's not the most important issue ;)

about the screen flicker: you're right. F5 makes sense of couse ;) I often also get it - for example when chrome changes to a new site. But that's not that important either. It never happened for example during i watch a movie ... so no big issue.

(at the moment i mainly use it for watching DRM movies. It's even a little better than DRM with raspbian in my case)

what's also interessting: i tested mupen64plus. From my first impression i think it runs similar as good as with retropie - amazing performance!

thank you! great work!
[Raspberry Pi Original Development] KonstaT:
Already offered one solution but it'll kill any support for USB audio devices.

In 'adb shell'/serial console/terminal:

su
mount -o rw,remount /vendor
sed -i '/usb_audio/d' /vendor/etc/audio_policy_configuration.xml
[Raspberry Pi Original Development] :
[MENTION=7223862]KonstaT[/MENTION]

would it be possible to connect and use a touch screen monitor?
[Raspberry Pi Original Development] KonstaT:
No, not the official one at least. But I guess the answer also depends on the exact touchscreen hardware you're talking about.

LineageOS 14.1 & 15.1 builds support the official 7" touchscreen and it should be fairly straightforward to get some Waveshare DPI touchscreens working as well (ADS7846). I don't know if people have had any luck with ones that use HDMI & USB combo.
[Raspberry Pi Original Development] Shubham Tople:
Will you be porting lineage to raspberry pi 4 as well?
[Raspberry Pi Original Development] KonstaT:
Beauty of open source projects is that there's nothing stopping you from doing it yourself if you're in a hurry. :)

Raspberry Pi 4 has a brand new GPU hardware and it uses a brand new V3D graphics driver. If you've followed Android development on Raspberry Pi, the main concern has always been the graphics drivers. I believe it's going to require some serious effort to get the new hw/driver working on Android. LineageOS 16.0 has been booted and running on the Pi 4 for a while now using software renderer instead but there hasn't been much progress since.

https://twitter.com/konstatuomio/status/1156934364221116416
[Raspberry Pi Original Development] gregory112:
Bluetooth keeps crashing

[MENTION=7223862]KonstaT[/MENTION]

I tried this build but the bluetooth keeps crashing on my Raspberry 3B+ even after fresh install, why is that? Here is the logcat: pastebin.com/fxM0f4U5

Once I turned on the Bluetooth, there will be intermittent messages of "Bluetooth keeps stopping". It does not seem to even turn on at all. Bluetooth is completely fine on Raspbian however.
[Raspberry Pi Original Development] KonstaT:
Interesting because it works on my 3 B+. One of the bluetooth services is started according to hardware revision code. I can reproduce similar log if I stop the service manually. It's possible that I've missed some revision code for 3 B+ or there's been a new one (https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md).

Can you post the output of following commands in 'adb shell'/terminal/etc?

getprop ro.revision
getprop | grep bt
[Raspberry Pi Original Development] gregory112:
Thank you for your quick reply!

The output of getprop ro.revision is

2a020d3

And for getprop bt

[init.svc.btrpi3-1.0]: [running]
[net.bt.name]: [Android]
[ro.boottime.btrpi3-1.0]: [6323932549]

Btw great build! I would also like to know what did you do besides compiling new Linux kernel to make it works with Raspberry Pi 4. Are the drivers that different? Want to dive in to the source codes too later on :)
[Raspberry Pi Original Development] KonstaT:
Well, that's strange. a020d3 is a valid revision code for Pi 3 B+ and no idea where that prepended '2' comes from. Can you do 'cat /proc/cpuinfo | grep Revision' as well?

The required btuart service is not running. You can start the service manually by executing

su
start btuart.rpi-3-b-plus

and try enabling bluetooth after that.

That revision code should be added to /vendor/bin/rpi3-serialno.sh so the services starts at boot and you don't need to start it manually.

Pi 4 requires 4.19 kernel and new boot firmware to go with that. Pi 4 has new GPU and it uses new V3D graphics driver (vs. VC4 used on Pi 3). Haven't had much luck with that yet so I'm using SwiftShader software renderer for now (that I also used with LineageOS 15.1 build).
[Raspberry Pi Original Development] gregory112:
Thanks, it works! I too was puzzled seeing my revision number not in the Raspberry Pi documentation. After some googling though, I found that it's from Sony, which probably resembles a020d3 in the doc. The revision number written in cpuinfo is well, the same as before, 2a020d3.

I have added also the revision to the rpi3-serialno.sh script and bluetooth is working, and the Pi auto connects with my speaker immediately after it's on.

But wait, I was able to connect to my bluetooth speaker (Bluetooth version 3) and play music for a few seconds. Then the bluetooth seems to crash and won't turn back on again. Here is the logcat: pastebin.com/h3kVauA1

I found a few lines like

StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted

is this related?

No other modifications? Yep I am aware about that GPU issue and that seems to be a common issue over the years when new Pi gets released. I guess some other things have worked well out of the box with the new Linux Pi kernel 4.19? Anyway thanks and good luck, not asking for ETA here :good:
[Raspberry Pi Original Development] velis74:
I have two questions about this build:

1. Is there any (planned) support for RPi camera? I've seen an answer in the 15.0 thread that it's simply not implemented at all, so not holding my breath or anything...

2. Is it possible to get this ROM to run on the official RPi display (800x480)? I tried modifying build.prop, but then I just get a blank screen while the active resolution (reported by my monitor) is 1920x1080

P.S.: A rare and noble thing that you are providing here, [MENTION=7223862]KonstaT[/MENTION].
[Raspberry Pi Original Development] KonstaT:
Good, I still find it a bit strange as other revision codes start with 'a' and it's not listed in the docs.

Seeing bunch of those even when it's working. Log level is only warning even though it says error in the message. Can't reproduce any crash playing music to my bluetooth speaker with the built in music player app at least. Not sure if I'm seeing it in your log either. If you could try to narrow it down by using 'adb logcat' so you can crab a realtime log.
[Raspberry Pi Original Development] KonstaT:
Answer to both is not implemented so currently not supported. There aren't any exact future plans for this either. I'd of course like to see both working at some point among other things. My time is limited but there's nothing stopping someone else stepping up and implementing features they'd like.
[Raspberry Pi Original Development] gregory112:
This seems to yield more problem I guess, because that means there are some other revision codes out there that are not listed. Maybe it's better to use string matching/regex in your script instead of if/else?

After a restart the bluetooth is working and I can play music for like 30 minutes or so, then the bluetooth crashes again. This intermittent problem is really hard to reproduce myself too. But I think I can live with that for now. I'm going to try with new Raspi 3B+ too, I'll post any update if I found something. Thank you.
[Raspberry Pi Original Development] andrewkoy:
is this work for pi 4?
[Raspberry Pi Original Development] KonstaT:
Yep, actually only need to check whether the second to last character is '8' or 'd'.

This is the first time I've come across unlisted revision code so far. I still find it a bit strange as the '2' in yours is in binary representation in region that is marked as unused in the docs.

No, like it says e.g. in the topic title this for Raspberry Pi 3 Model B and Model B+.
[Raspberry Pi Original Development] gregory112:
V4L2 HAL support

[MENTION=7223862]KonstaT[/MENTION]

I would like to add V4L2 HAL to this build (LineageOS 16), from this https://android.googlesource.com/platform/hardware/libhardware/+/master/modules/camera/3_4/README.md it seems that the Android team already has support for V4L2 HAL for UVC webcams since Android Pie, that works by scanning /dev/videoXX device pointer files. It can also replace the original camera HAL and use V4L2 instead. Is it possible to add this? I'm thinking of compiling the module from AOSP source and copy pasting it to the installed system but do not know how to do it. I'm a GNU/Linux expert but I am not that familiar with AOSP unfortunately. Can you help me?
[Raspberry Pi Original Development] KonstaT:
That camera HAL is actually already built and included in the image (/system/lib/hw/camera.v4l2.so). Also the HAL for external USB cameras is there. Neither seems to work. If you have a camera connected, you can see from the logs that at least the HAL opens the device (/dev/video0). Cameras are quite tricky because they also require support for output formats, etc from the graphics HALs. It would be great to have an expert have a look at this but unfortunately it isn't as straight forward as just building the camera HAL.

So far only external USB webcams (UVC) work with specific third party app camera app for the purpose.
[Raspberry Pi Original Development] KonstaT:
Nice. :) What camera hardware are you using? Are you talking about the Pi camera module or USB webcam (UVC)? This works without any modifications to the image I've released?

StreamHAL log spam is related to audio HAL, not camera. The log level is only a warning even though it says error in the message.

Well, what code do you want to read? I don't have any device specific camera code and the rest of it is already publicly available.
[Raspberry Pi Original Development] gregory112:
A UVC, I haven't tried using Pi camera even though the V4L2 HAL README states that it was tested using Pi camera. Mine is a Logitech C270 HD webcam. After reading the documentation, it is indeed stated that the HAL supports only creating a single stream instead of multiple streams that is why QR scanning fails with that error. Most barcode scanners seem to require making two image streams or more at once, one for camera preview and the other one, with different resolution, for barcode scanning. I did ask at the AOSP forum on why this HAL supports only a single stream as stated in the README but haven't got reviewed yet. As for the code, I want to read the HAL code itself but well the AOSP directory structure is quite complex. I'm afraid this is a hardware limitation and not implementation limitation, which means that activities such as barcode scanning will never be possible using Pi camera or UVC..