yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] gavranpero:
Greeting. I installed Android 12 on Rpi4 and connected the Sony WH-1000XM3. When I checked which audio codec was being used, it says LDAC. So not only Rpi, but the headphones are currently working on that codec, while they are connected to Rpi. How is that possible ?
[Raspberry Pi Original Development] SilverS4sAreFaster:
So I know to make the MPU6050 work I have to remove the # on #dtoverlay=android-i2c-sensor,mpu6050, I've done that and had my other sensor working fine however it's an MPU9265 technically and the compass on it doesn't report since the software wasn't setup for it. I want the compass to work so I got a LSM303DLHC since it was theoretically plug and play. I then tried writing a line dtoverlay=android-i2c-sensor,lsm303dlhc thinking it needed that to look for the input from the sensor. Unfortunately I've had no luck, I've even tried using the 6050 line again just to see if the accelerometer data might be there but of course that doesn't work. I got a 2nd one thinking maybe it was defective but unfortunatly it still isn't working. The one from adafruit is no longer available... I may have one that for one reason or another isn't compatible I don't really know, or maybe I have no idea what I'm doing? It says it uses the LSM303DLHC sensor but the board is calling itself a GY-511, it still has the correct pins however and I figured if the chip on board is correct then the rest of the stuff is just the power conditioning and should still connect properly over the I2C data paths.
[Raspberry Pi Original Development] KonstaT:
There is a know issue with bluetooth audio and Google location services after installing gapps. This only happens with gapps installed and if you've enabled location access during the gapps setup. Google location services scan nearby bluetooth devices to determine the device location which doesn't work great when your using bluetooth audio at the same time. There's also workaround available if disabling Google location access is not enough https://xdaforums.com/t/dev-rom-uno...aspberry-pi-4-b.4212945/page-14#post-85769441

It means nothing. Bluetooth codec options in developer options are no-op.

Edit. LDAC should work, see https://xdaforums.com/t/dev-rom-uno...raspberry-pi-4-b.4356891/page-7#post-86219431

There is a settings option in Settings -> System -> Advanced settings -> Sensors. You should use that for the supported sensors instead of modifying config.txt manually. Edit. Besides, it's 'dtoverlay=android-i2c-sensor,lsm303dlhca,lsm303dlhcm' for this sensor module.

Check 'dmesg' and 'i2cdetect -y 1' (in rooted shell) to see that your sensor module is detected and what I2C address is uses. If your sensor module uses different I2C address than expected (https://github.com/lineage-rpi/andr...erlays/android-i2c-sensor-overlay.dts#L43-L71) it can also be configured in the config.txt.
[Raspberry Pi Original Development] gavranpero:
So that's not a real LDAC?
[Raspberry Pi Original Development] KonstaT:
Like said, even if there was such option it does nothing. There is no support for _any_ proprietary bluetooth audio codec.

Edit. I take that back. LDAC should work on any device with Android 8+. AFAIK Qualcomm's aptX needs some proprietary stuff but it wouldn't be too surprising if I'm wrong on that as well (Edit2. It does, and I wasn't https://android-review.googlesource.com/c/platform/system/bt/+/318907/). :p
[Raspberry Pi Original Development] SilverS4sAreFaster:
Thanks, I didn't even think to look for a menu that let me do that.... The sensor is reporting extremely slowly unfortunately. Guess I have some more to look into. And I've gained a new issue where if the GPS is plugged in it gets stuck in a boot loop which wasn't happening last weekend. Fun times.
[Raspberry Pi Original Development] MarekDev:
Yes I know those repos. Problem is that Android build from that is not fully functional, I have no graphics (black sceen) but most services seems running. (196 to be precise).

logcat:

01-01 00:00:10.094 222 222 E HWComposer: getAttribute: getDisplayAttribute failed for display 0: BadParameter (4)

01-01 00:00:10.094 222 222 E HWComposer: getDisplayConnectionType: getDisplayConnectionType failed for display 0: Unsupported (8)

01-01 00:00:10.440 205 205 E EffectsConfig: Could not parse effect configuration in any of the default locations.

01-01 00:00:10.440 205 205 E EffectsFactoryConfigLoader: Failed to parse XML configuration file

01-01 00:00:10.500 222 341 E HWComposer: getSupportedContentTypes: getSupportedContentTypes failed for display 0: Unsupported (8)

01-01 00:00:10.989 219 219 E EffectsConfig: Could not parse effect configuration in any of the default locations.

01-01 00:00:11.148 211 211 E allocator@2.0-Allocator: gralloc0 allocation failed: -22 (Invalid argument)

01-01 00:00:11.149 222 315 E GraphicBufferAllocator: Failed to allocate (128 x 128) layerCount 1 format 22 usage 100: 5

01-01 00:00:11.149 222 315 E RenderEngine: Failed to create a valid texture. [0xb400007d44c85900]:[0,0] isProtected:0 isWriteable:0 format:0

dmesg:

[ 2.443468] vc4_hdmi fef00700.hdmi: Unknown register ID 47

[ 2.449534] vc4_hdmi fef00700.hdmi: 'dmas' DT property is missing or empty, no HDMI audio

[ 2.457910] vc4-drm gpu: bound fef00700.hdmi (ops vc4_hdmi_ops)

[ 2.463977] vc4_hdmi fef05700.hdmi: Unknown register ID 47

[ 2.469859] vc4_hdmi fef05700.hdmi: 'dmas' DT property is missing or empty, no HDMI audio

[ 2.478173] vc4-drm gpu: bound fef05700.hdmi (ops vc4_hdmi_ops)

[ 2.484267] vc4-drm gpu: bound fe004000.txp (ops vc4_txp_ops)

[ 2.490170] vc4-drm gpu: bound fe400000.hvs (ops vc4_hvs_ops)

[ 2.496097] vc4-drm gpu: bound fe206000.pixelvalve (ops vc4_crtc_ops)

[ 2.502721] vc4-drm gpu: bound fe207000.pixelvalve (ops vc4_crtc_ops)

[ 2.509489] vc4-drm gpu: bound fe20a000.pixelvalve (ops vc4_crtc_ops)

[ 2.516093] vc4-drm gpu: bound fe216000.pixelvalve (ops vc4_crtc_ops)

[ 2.522718] vc4-drm gpu: bound fec12000.pixelvalve (ops vc4_crtc_ops)

[ 2.529558] checking generic (3e29a000 960000) vs hw (0 ffffffffffffffff)

[ 2.529563] fb0: switching to vc4drmfb from simple

[ 2.534610] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

[ 2.541327] [drm] Driver supports precise vblank timestamp query.

[ 2.547977] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0

[ 2.569375] usb 1-1: new high-speed USB device number 2 using xhci_hcd

[ 2.615816] vc4-drm gpu: fb0: vc4drmfb frame buffer device

For sure I am missing something. Is it good place to discuss such problems here?
[Raspberry Pi Original Development] KonstaT:
You can check if you can tune the sensor HAL using some system properties (see readme at https://github.com/lineage-rpi/android_hardware_intel_sensors-iio/tree/lineage-19.0).

Issue with GPS was previously reported and I can reproduce that as well (http://disq.us/p/2ltfoky). It will be fixed if/when there's another build. Meanwhile you can use LineageOS 18 builds if you need to use GPS hardware.

No, please open an issue e.g. on their github (whatever you mean by "from that" in this case). Sorry, but issues with someone else's project is not my concern.
[Raspberry Pi Original Development] SilverS4sAreFaster:
Ah I see, thanks. I don't know if it helps anything for if/when you do fix the GPS issue but I'm using an M8N instead of the 7. I really wish I understood how Android used drivers, I would love to dig in and try to fix stuff but I've still got the steep part of the learning curve to climb...
[Raspberry Pi Original Development] MarekDev:
I thought it was DEVELOPERS forum. I cannot discuss issues with "your" projects as it closed source, so I am getting your answer a bit funny :-). "From that" mean https://github.com/android-rpi/local_manifests which you recommended and you are one of the contributor. Anyway thanks for answer.
[Raspberry Pi Original Development] KonstaT:
android-rpi is Peter Yoon's project so ask him for help. I haven't built anything out of android-rpi in nearly five years so I don't understand why you'd even expect me to know.

There's surely a lot of source code available at lineage-rpi (https://github.com/lineage-rpi) for something that you claim is "closed source" (plus LineageOS itself is of course open source). Please step out of your binary world, not everything is so black and white. :)
[Raspberry Pi Original Development] MarekDev:
My problem is fixed and you helped me :) I bet I read your response somewhere else that EDID correct communication is needed to get proper image output. Binary releases I tested, did not have that issue so it took me time to find it. It's the same hw, most sw is also the same. I did not expect I have just asked. (And question is still open which setting cause that difference).

Now having working source codebase I can take a look on lineage or omnirom. I had some time and built Freenove hexapod spider robot and found idea to port control sofware (https://github.com/Freenove/Freenove_Big_Hexapod_Robot_Kit_for_Raspberry_Pi) to embedded android. It 's just for fun adding some drivers, HALs and SDKs in AOSP 12.
[Raspberry Pi Original Development] rabbited:
Yes, sorry. I did not mean to send the entire log but must have saved the truncated version incorrectly. Hopefully this will be enough to reveal some info without being too long:

new_log.txt

drive.google.com
[Raspberry Pi Original Development] KonstaT:
It's still exactly the same issue as before ('F webview_zygote: jni_internal.cc:748] JNI FatalError called: (zygote) Failed open(/sys/kernel/tracing/trace_marker, 1): Permission denied').

I don't have anything new to add to https://xdaforums.com/t/dev-rom-uno...raspberry-pi-4-b.4356891/page-5#post-86160331

Check the permissions on the sysfs node ('ls -l /sys/kernel/tracing/trace_marker') and if it's already 222 try something more permissive (666). If/when there's another build it will include the change in the linked post.
[Raspberry Pi Original Development] KonstaT:
New Build.

LineageOS 19 (Android 12L)

for Raspberry Pi 4

konstakang.com

-add new options to Raspberry Pi settings (force rotation & CPU governor)

-fix GPS issue caused by incomplete location data

-small improvements to HDMI audio support

-prepare for OTAs

-update to TWRP 3.6.0_11-1-KonstaKANG

-update to Mesa 21.3.4

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

-Android security patch level: 5 January 2022 (merged)

-----

There's also Android TV version available.

LineageOS 19 Android TV (Android 12L)

for Raspberry Pi 4

konstakang.com

-initial LineageOS 19.0 Android TV build

-add support for Pi camera modules using libcamera, preview & photos work - camcorder doesn’t (thanks to Roman Stratiienko)

-drop old v1 camera HAL and use external camera HAL for UVC USB webcams (camera needs to support MJPG format - preview, photos & camcorder works)

-fix reboots related to Hotspot 2.0 networks/ANQP requests (see issue #6)

-Vulkan 1.1 (thanks to people at Igalia for Vulkan 1.1 conformance and Roman Stratiienko for latest Mesa fixes)

-add new options to Raspberry Pi settings (force rotation & CPU governor)

-prepare for OTAs

-update to TWRP 3.6.0_11-1-KonstaKANG

-update to Mesa 21.3.4

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

-Android security patch level: 5 January 2022 (merged)
[Raspberry Pi Original Development] KonstaT:
@chjanson

My latest LineageOS 19 builds now have the drivers enabled for Audiophonics I-SABRE Q2M DAC.

Select DAC from Settings -> System -> Raspberry Pi settings -> Audio device. It doesn't matter which DAC you have selected as you need to manually edit /boot/config.txt after this (change 'dtoverlay=hifiberry-*' to 'dtoverlay=i-sabre-q2m' under 'Audio DAC' section). I'll add settings option for this if/when it's confirmed working.
[Raspberry Pi Original Development] chjanson:
Many thanks! (A RPI4 is on its way. back after testing)
[Raspberry Pi Original Development] Tom33231:
I’m new to android development but definitely interested in this build as hardware video decoding seems to be coming and is finally getting some headway and such. What would be a great place in possibly porting over gpio screen compatibility to work via this 3.5 inch screen I have?

https://www.amazon.com/Raspberry-Touchscreen-320x480-Monitor-Display/dp/B07WQW6H9S

It’s using the MHS35-show kernel module drivers, thought not sure since they are mainly build for Debian based Linux distros if I could or someone with better knowledge could get this working or not for android.

Here’s the GitHub link for them use MHS35 as this is what the display I’m using works with using Debian bullseye

GitHub - goodtft/LCD-show: 2.4" 2.8"3.2" 3.5" 5.0" 7.0" TFT LCD driver for the Raspberry PI 3B+/A/A+/B/B+/PI2/ PI3/ZERO/ZERO W

2.4" 2.8"3.2" 3.5" 5.0" 7.0" TFT LCD driver for the Raspberry PI 3B+/A/A+/B/B+/PI2/ PI3/ZERO/ZERO W - GitHub - goodtft/LCD-show: 2.4" 2.8"3.2" 3.5&quo...

github.com

Hopefully this is possible as this would be great as a concept device for android dev and maybe as a basic touchscreen phone/android powered pda.
[Raspberry Pi Original Development] Tom33231:
Forgot to mention thanks for all of you in taking time to make this build possible. As this in my opinion is a very impressive early android 12 build for the raspberry pi 4 and 400.
[Raspberry Pi Original Development] KonstaT:
It's not possible to use displays that use SPI for the display interface. IMO these displays are not even suitable for any modern OS that displays dynamic content because resolution is low and the display refresh rate is even worse. I actually have one similar display laying around and haven't bothered with it. The touchscreen part of it already works (just uncomment 'dtoverlay=ads7846...' line in /boot/config.txt) if you wanted to create e.g. a dummy track pad for swipe/pinch gestures.

As for GPIO displays it would be interesting to get some DPI display working. AFAICT it should be pretty straight forward as Pi folks recently added easier way to use DPI panels with KMS (https://github.com/lineage-rpi/andr...mmit/0f6b9a3650b6823de5cc5362f338bfcb2fb863c3). Displays on HDMI and DSI ports are already possible so it would be nice to have that possible on GPIO as well. I don't have any hardware myself.
[Raspberry Pi Original Development] rabbited:
Thanks! Unfortunately, even with the new build I am experiencing the same issues and the same trace_marker error message in logcat. I'll keep investigating. Thanks again for pointing me in the right direction.
[Raspberry Pi Original Development] Cypher2:
Awesome work @KonstaT !!! Very fluid and impressive, even more than the last!

One little issue on the UI side of things:

Is anyone having trouble removing default widgets and icons from trebuchet on this build?

Long mouse left click only seems to bring up the context menu for the item i want to edit, but I am unable to drag it out of its default position for removal...

Edit:

Here are some other issues I found while tinkering and setting stuff up (hope i'm not repeating what has already been mentioned on here):

( Use case: setting the devices up to behave as much as possible like a desktop system. )

adding virtual buttons to navigation bar overlaps navigation bar power button when both settings are enabled

navigation bar long press/double click actions do not work (split screen, voice assist, etc)

trebuchet definitely buggy and out of spec for this build (lawnchair launcher was installed and proper behavior was established)

installing BitGApps 12 r44 resulted in play store saying the rpi4 was offline even though wifi connection was properly established and the system has internet access, tested through Lineage OS Jelly browser and Termux... wiping the whole system through TWRP fixed this...

physical keyboard shortcuts such as Alt+tab and other 'standard' behaviors that worked in 18.1 do not work on 19... wiping the whole system through TWRP fixed this...
[Raspberry Pi Original Development] KonstaT:
Yes, I can reproduce the issue with Trebuchet. Either it's currently broken or there's difference handling input events between touch and mouse. Edit. 'Lock layout' in Trebuchet options currently does opposite of what it's supposed to (https://review.lineageos.org/c/LineageOS/android_packages_apps_Trebuchet/+/321104).

1. What options do you mean exactly? There's only 'Virtual buttons on navigation bar' and 'Show arrow keys while typing' and they don't overlap at least on default 1080p resolution/display density.

2 & 3. It's still very early days for Android 12 and LineageOS 19. Many LineageOS specific additional features have not been implemented yet. You can consider it feature ready when LineageOS 19 builds start rolling out for officially supported devices.

4 & 5. So nothing is actually wrong. Installing gapps always includes performing a factory reset (as also stated in the FAQ)! There's also this old saying, no wipe - no whine. :)

As a device developer/maintainer my concerns are that the hardware features are working (listed under working/not working) as well as the additional software features I've decided to support on my builds (i.e. what you find in Settings -> System -> Raspberry Pi settings).
[Raspberry Pi Original Development] Cypher2:
Ok!

I use 2560x1440 (Advanced settings) and have fonts set to Small and interface set to Smallest.

I am referring to the arrow while typing overlapping with the 'Virtual buttons' settings (Power, volume)

The power button overlaps the keyboard arrow keys.

Good to know.

Surprising considering I've rarely had to do so on custom builds haha! Even The 18.1 build worked just fine when i flashed once without any wiping.

Thanks for the responses!
[Raspberry Pi Original Development] KonstaT:
I doubt it's ever going to be possible to guarantee that each and every UI element is exactly where it is supposed to be when it's possible to use different display resolutions (not what Android is designed to do). User having more freedom also means having more responsibility.

Shouldn't be anything new or surprising here. It's always been this way on every Android device that ever existed. I highly doubt everything "worked just fine". Also see the important note under https://wiki.lineageos.org/gapps#installation.
[Raspberry Pi Original Development] Cypher2:
Agreed, although it worked fine on 18.1 - is the addition of the virtual power button one of your specific rpi4 features? UI elements should be able to order themselves in the same manner the status bar icons do, no?

OK
[Raspberry Pi Original Development] KonstaT:
No, even the whole navigation bar placement is different depending on the resolution let alone the buttons on the navigation bar. If you use resolution other than 1080p you would also in reality need to adjust display density ('ro.sf.lcd_density' property) to adapt.
[Raspberry Pi Original Development] Cypher2:
Interesting... thought it was programmed to be a little smarter than that.

Thanks for the insight.
[Raspberry Pi Original Development] KonstaT:
You can consider Android as an OS for embedded devices. It needs to work just on the hardware that the device has built-in and nothing else. It's not designed to support every possible hardware and configuration in the world at the same time.

I could of course just force 1080p for everyone to guarantee consistent UX but I just personally prefer to give the user the option rather than dumb it down because of some users.
[Raspberry Pi Original Development] Cypher2:
I see

Of course! it is good to keep things documented as well, to help the community. I'll play around with ro.sf.lcd_density and find something that works. If I am not mistaken, it is the same setting as the 'Density' section available in the Developer Options, or is it completely different?
[Raspberry Pi Original Development] Tom33231:
Alright I mean you definitely have a point but mainly just mentioned this as a proof of concept if the screen worked with the touchscreen. What other higher resolution displays could fit the phone concept of about 3.5 or even 4-5 inches for testing and as a concept of using this soc/single board computer with touch and screen output?
[Raspberry Pi Original Development] Tom33231:
Yea speaking of hardware compatibility do you know of any good tools for decompressing the system.img and recompressing it after doing modifications like adding my favorite apps to the pre installed apps folder with I think would be in the pre install folder in the root, than a android.mk. Was looking at this but need more up to date information on doing my own embedded mods or at least some direction.

Add prebuilt APKs to Android AOSP system.img

I'm building AOSP from source. What I would like to do is to include a few prebuilt files in the generated system.img as part of the make process. I'm trying to find the actual file that creates the

stackoverflow.com

Ship precompiled apks in your custom ROM

Hello there! today I want to give you a little tip on how to ship precompiled apks in your custom rom

medium.com

I know this forum is mainly for your rom and raspberry pi 4 android dev but how can I go about this and extracting the system.img and than after modifications extract back to a working system.img. Android versions I’m after are android 9.0-12. Also arch I’m going for is arm-64, and x86-64. Hopefully I made sense on my question.
[Raspberry Pi Original Development] Cypher2:
I just set it up the way i want it then do a TWRP backup with compression.. you can decide which partitions to save or eventually edit the restoration manifest to only write the partitions you'd like automatically
[Raspberry Pi Original Development] Cypher2:
So i've calculated the density for my monitor and played around with several resolutions and lcd_density settings: the virtual power button always overlaps the keyboard arrows. This is definitely an asset placement issue.
[Raspberry Pi Original Development] KonstaT:
There's tons information available about Android that applies to all devices running it. It would be practically impossible for me to maintain documentation that covers everything. I try to do it for the stuff that applies to my builds specifically. IMO I have a pretty good FAQ which unfortunately too few bother to read (maybe it's already getting too lengthy) because half of my replies usually include "please read the FAQ" (*grrhmm* you certainly didn't read the FAQ on installing gapps ;)).

I'm not aware there being any display density related options in developer settings. Settings -> Display -> Display size does similar thing.

Which manifests itself when you use non-standard resolution/density. LOL, maybe just adjust your settings to something that doesn't cause them to overlap then.

Any IMO the whole 'Show arrow keys while typing' feature is utterly useless on non-touchscreen devices and how often do you ever need to press (virtual) power button while typing anyway (BTW, Android 12 now has one in notification shade as well).

I take things are going pretty well if this is the biggest issue you can come across. :)