yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] AtikAttar1104:
Hi There,

I Have A Lot Of Questions About Lineage OS 18.1.

And Due To Some Financial Problems, I Am Unable To Get Myself A Pi4. So I Need Some Info Before I Use It. Pls Help Me In It.

1. I've Read This In A Forum (Sorry I Don't Know Which One) That This Is Not A 64-bit Edition. What If I Have To Download An App From Site Like APKMirror, And I Have To Choose APK Based On Device Architecture (E.G. - APK For Armeabi-v7a, APK For Arm64 Or Aarch64, APK For x86, APK For x86_64)

Which APK Will Work In Pi4 With Lineage OS 18.1?

2. Is Root Access Really Required To Run Normally (Like Doing Basic Stuff, etc.) Or It Will Work Without Root Access?

3. How Is The Gaming Performance In It (Like FPS, Response While Playing)? Since I SHUFFLED THE WHOLE INTERNET FOR THIS But Didn't Got Anything LOL 😂😂😂, That's Why, This Question!😂

4. And Finally, Will USB WebCam Work In Pi4 With Lineage OS 18.1 Or USB UVC Camera Only Works?

And Which GCam Port Works In It?

I Still Have A Lot Of Questions But, Currently I Only Remember These.

Thanks N Sorry For My Bad English. I Am Not Good At It
[Raspberry Pi Original Development] KonstaT:
1. Android apps work universally unless the app has native libs that depend on the architecture (app can also include the libs for all architectures). ARM 32-bit = armeabi-v7a, ARM 64-bit = arm64-v8a, X86 32-bit = x86, X86 64-bit = x86_64. This is ARM 32-bit build.

2. No, you don't need root access for any normal use.

3. It's a $35 device with the specs to match the price. There's at least couple of YouTube channels that are nothing but gameplay on Raspberry Pi using Android.

4. Official Pi camera modules and UVC webcams are supported. Camera performance also depends on the app you use. If a camera advertises Linux support it most likely uses UVC.
[Raspberry Pi Original Development] mynameisnafe:
Hi again,

I'm also looking at this for a car.. will LineageOS work with a GPS/GNSS GPIO Hat, or only the ublox?

Also, are there any plans to support something like the waveshare LTE modem or a USB LTE modem?
[Raspberry Pi Original Development] KonstaT:
No, many different serial GPS devices (both USB and GPIO) have been reported working. Using GPIO GPS hardware has been discussed on this topic previously (https://xdaforums.com/t/dev-rom-uno...raspberry-pi-4-b.4212945/page-7#post-85192865 to https://xdaforums.com/t/dev-rom-uno...raspberry-pi-4-b.4212945/page-8#post-85321133).

Some 3G/4G USB dongles have been reported working with third party apps like PPP Widget 3 (https://play.google.com/store/apps/details?id=de.draisberghof.pppwidget3). This build doesn't have Android telephony framework or include drivers to support any modems. I have builds that have support Sixfab modem HAT and Quectel EC25. LTE data and SMS works fine. It's also possible to make/receive calls but in-call audio is not working.
[Raspberry Pi Original Development] oguzkarayemis:
Hello everyone,

First of all, thank you KonstaT for your fascinating work! My question is that: I want to use Magisk for bypassing Google Play SafetyNet on Raspberry Pi 400 Lineage OS ATV installation. But I cannot get "boot.img" for patching through any "how to" instruction (for example, TWRP boot backup or OS image). Does anybody know a working way for this, or could anybody get "boot.img"? Or maybe any other way for bypassing SafetyNet?

Thank you.
[Raspberry Pi Original Development] KonstaT:
https://twitter.com/i/web/status/1445453505091620868
[Raspberry Pi Original Development] Neogx:
wow nice!
[Raspberry Pi Original Development] KonstaT:
Raspberry Pi is not an Android device to begin with so it doesn't have boot/recovery images. You can create boot.img/recovery.img from the ramdisk.img/ramdisk-recovery.img and kernel zImage (both found in the boot partition) with 'mkbootimg' tool. Split it up again after patching with 'unpackbootimg'.

As Raspberry Pi is not an Android device to begin with it has never passed Google Play certification (pass CDD & CTS). Last I tested SafetyNet tests fail on the CTS profile match. You would likely need to spoof this to be some entirely different device.
[Raspberry Pi Original Development] oguzkarayemis:
Thanks for your answer, I'll try this.
[Raspberry Pi Original Development] oguzkarayemis:
Ok. I've totally different question today. I've installed ATV version on my RPI 400. Most things work just fine. Buy I've audio issues from time to time. Problem is that: While playing video (Netflix and Stremio installed from .apk), or music (Spotify installed from Google Play), usually (but not always) after pause and then play, there is no audio (but playback -and video- goes on). Is there anybody encountered this kind of problem?

Thank you.

Edit: Sorry I forgot, I get audio through HDMI.
[Raspberry Pi Original Development] KonstaT:
I don't think I've received other reports with similar issues. Logcat?
[Raspberry Pi Original Development] oguzkarayemis:
Ok, here my logs. Thank you very much for your interest.

Logs.txt

drive.google.com
[Raspberry Pi Original Development] KonstaT:
Thanks, maybe try narrowing the log down to where the issue is reproduced. Not sure what I'm even supposed to be looking for in there.
[Raspberry Pi Original Development] mllora81:
Have you found a way to use this in your car with bluetooth for in-call audio?
[Raspberry Pi Original Development] oguzkarayemis:
I believe this is relevant part that today I got from logcat when spotify audio was down:
[Raspberry Pi Original Development] KonstaT:
New builds.

LineageOS 18.1 (Android 11)

for Raspberry Pi 4

konstakang.com

-add support for Vulkan

-rework bluetooth (thanks to android-rpi)

-update to Mesa 21.1.8

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

-Android security patch level: 1 October 2021 (merged)

---

LineageOS 18.1 Android TV (Android 11)

for Raspberry Pi 4

konstakang.com

-add support for Vulkan

-rework bluetooth (thanks to android-rpi)

-switch to new two-panel settings UI (merged)

-update to Mesa 21.1.8

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

-Android security patch level: 1 October 2021 (merged)
[Raspberry Pi Original Development] mynameisnafe:
Is in-call audio something that is likely to get fixed? I guess a related question is do microphones work, via usb sound card, DAC, aux or otherwise?

That's PPP Widget 3 app looks very interesting, I seem to remember this from somewhere.. feels like deja vu.

I think I will probably order new GPS dongle, the one I have never seems to pick up a satellite and it's quite old :D
[Raspberry Pi Original Development] KonstaT:
Seems that it has something to do with Chromium WebView. Have you tried the latest build from yesterday (or did this happen with previous builds)? Android system WebView is usually also updated with every build.

It's not something that is actively worked on. Building a DIY Android phone out of Raspberry Pi has been bit of an eternity project. I think the problem is more than just audio routing issue.

Generally speaking USB microphones/sound cards with mic work. Bluetooth mic (SCO profile) is not working. I don't have any DACs with audio input to test with. Audio HAL can currently only open one ALSA device at a time. So, also using some I2S mic would require work on the audio HAL.
[Raspberry Pi Original Development] shar pi:
Hello! Can you please tell, what do you mean by rework? The issue with streaming music using bluetooth and geolocation enabled is fixed?
[Raspberry Pi Original Development] KonstaT:
It means that I switched to different bluetooth implementation entirely. I've never managed to reproduce the bluetooth audio stuttering related to Google location services because I rarely get around setting up my device with gapps. So definite maybe until it's been reported either way. Please test and report back.
[Raspberry Pi Original Development] shar pi:
I've tested, the problem the same.

But I found out, how to "fix it", until reboot.

Disable google play service, and enable them. Everything ok, but until this - audio is stuttering.
[Raspberry Pi Original Development] KonstaT:
Ok, thanks for reporting. Great that you found a workaround at least. :)
[Raspberry Pi Original Development] shar pi:
But now I need to find, how to perform it automatically on every boot.

is it possible to perform:

pm disable com.google.android.gms

pm enable com.google.android.gms

after the boot is done?
[Raspberry Pi Original Development] oguzkarayemis:
Thanks for new build. I did upgrade today. But problem continues from time to time, sadly. I'm very surprised no one having issues like me. I fallowed your instructions in your site, maybe I'm doing something wrong? Also I attached new logs regarding error from new build, I hope it'll be useful: https://drive.google.com/file/d/1ZHkNTy9nAM0AWho36_A8iW-OqFwtNF89/view?usp=sharing
[Raspberry Pi Original Development] shar pi:
Here is my solution:

1. Clean install

2. Install gapps (pico/nano - no difference)

3. Install su add-on

4. Settings -> System -> Developer options -> Rooted debugging

5. Settings -> System -> Developer options -> USB debugging

6. adb root && adb remount

7. adb shell

8. nano /etc/init.d/90userinit

#!/system/bin/sh
# call userinit.sh if present in /data/local

if [ -e /data/local/userinit.sh ];
then
log -p i -t userinit "Executing /data/local/userinit.sh";
/system/bin/sh /data/local/userinit.sh;
setprop lineage.userinit.active 1;
fi

#depends on your boot time, sleep until
#LineageOS is fully loaded and you see your desktop
sleep 30

#use logcat to understand is your restart is on time
log -p i -t userinit "Executing GS restart";

#Google Play Services stop
su -c "pm disable com.google.android.gms";

#this sleep seems not to be necessary
sleep 10

#Google Play Services start
su -c "pm enable com.google.android.gms";

#after Google Play Services start we have to wait 5-10 seconds,
#because if we start music immediately,
#we'll meet awful stuttering for 10-15 seconds
sleep 7

#run spotify
monkey -p com.spotify.music 1

#wait until spotify ui is fully loaded
sleep 7
#play press & enjoy
input keyevent 126
[Raspberry Pi Original Development] KonstaT:
Came to say that you could look into using some Tasker-like third party application for this or use an init.d script but I see you already figured this out. Well done! :)

Couple of notes on the above. It would be better practice to create a separate script for this. E.g. /system/etc/init.d/50myscript or call it whatever you like. Set permission on the file to make it executable ('chmod 755 /system/etc/init.d/50myscript'). You don't need to install su add-on for this (as you use 'adb root') nor does the script need to call 'su' as scripts in init.d are already executed as root.

#!/system/bin/sh

#depends on your boot time, sleep until
#LineageOS is fully loaded and you see your desktop
sleep 30

#use logcat to understand is your restart is on time
log -p i -t userinit "Executing GS restart";

#Google Play Services stop
pm disable com.google.android.gms

#this sleep seems not to be necessary
sleep 10

#Google Play Services start
pm enable com.google.android.gms

#after Google Play Services start we have to wait 5-10 seconds,
#because if we start music immediately,
#we'll meet awful stuttering for 10-15 seconds
sleep 7

#run spotify
monkey -p com.spotify.music 1

#wait until spotify ui is fully loaded
sleep 7
#play press & enjoy
input keyevent 126
[Raspberry Pi Original Development] shar pi:
Thank you very much! I will fix the solution according to your suggestions in the evening
[Raspberry Pi Original Development] c3497605:
Android 12 source code has been released lately. Do you know if they made any progress regarding V4L2 driver support?
[Raspberry Pi Original Development] KonstaT:
I did check and they've made some progress at https://android.googlesource.com/platform/external/v4l2_codec2/. I haven't gotten around testing anything, though.
[Raspberry Pi Original Development] KonstaT:
Only HDMI displays are supported out-of-the-box with this build.

Depends on the display. DSI displays (including the official 7" one) are not supported with KMS driver in 5.4 kernel. For DPI panels this is the answer (https://forums.raspberrypi.com/view...sid=3a386bb3231047b80b65258acf0c4b64#p1854781).
[Raspberry Pi Original Development] stason.s7:
Such a pity. Wanted to try Android on RPi. I have a 5" dsi display, connected to a standart display port.

Actually, I have HDMI+GPIO 3.5" display in a drawer too, but as I can remember it has very low resolution and very small, so I doubt if it could be at least a little comfortable in using.
[Raspberry Pi Original Development] KonstaT:
Older builds that have SwiftShader software renderer are still an option (my LineageOS 16 build uses it by default, LineageOS 17 has an option to use it).
[Raspberry Pi Original Development] stason.s7:
3.5" hdmi+gpio with mpi3508 and virtual resolution up to 1080p (unreadable on such scale), actually works with

hdmi_group=1

hdmi_mode=67

and 640x480 in resolution.txt

Touch works, but very laggy. It looks like Up and Down are swapped with Left and Right.

Thank you, may be will try it later with 5" (though I've heard that SwiftShader is pretty slow).
[Raspberry Pi Original Development] KonstaT:
Cool. hdmi_* options in config.txt are not used with KMS (but still needed if you want to use TWRP recovery that doesn't use hw accelerated graphics). There's some overlay parameters you can use to rotate the touch input (https://github.com/lineage-rpi/andr...mmit/8a6bf037e6ef397bb3752c55095b3998a906e692).

SwiftShader is certainly slower than hw accelerated graphics but it also performs better the lower resolution you use. It depends on the use case how usable you'll find it.
[Raspberry Pi Original Development] EpicLPer:
The day LineageOS 19 for Raspberry is out will be a good one, will finally be able to properly test my car setup :)
[Raspberry Pi Original Development] c3497605:
Sweet I will definitely keep an eye on any further progress. So far been sticking too Linux for HTPC use case.

If this issue is resolved in future perhaps this could even become an official LOS release? (First in history for SBC!)
[Raspberry Pi Original Development] c3497605:
This is the device used for decoding right? It doesn't list any format except uncompressed video.
[Raspberry Pi Original Development] KonstaT:
Well, I though it was missing H264. Should check how these look like on Raspberry Pi OS with FKMS/KMS when I get around.

Edit. Looks just the same on Raspberry Pi OS so this is unlikely a problem.
[Raspberry Pi Original Development] Anghenfyll:
I believe usually the network would set the time, but there won't be one in this case. I've had success with an Emteria build that used the same GPS HAL to set the time, but that was a much earlier version of Android - using the GPSTest App you can see the time just fine, just setting won't work. Could be the permissions as I think it would need root for this operation.

Seems easier to shell out for an RTC module than fight my way through the code, as I can't reproduce these builds.

Once again, thanks for the all effort. (y)
[Raspberry Pi Original Development] Spielmops:
My head unit does not sync time with the GPS-receiver. But with a network-connection.

Spielmops
[Raspberry Pi Original Development] KonstaT:
FAQ now has instructions how to install Magisk.
[Raspberry Pi Original Development] SuperPi911:
could anyone help me to fix this error on my build for raspberry pi 4

error: external/virglrenderer/Android.bp:61:1: "libvirglrenderer" depends on undefined module "libdrm_headers"

error: external/virglrenderer/Android.bp:61:1: "libvirglrenderer" depends on undefined module "libgbm"

10:45:04 soong bootstrap failed with: exit status 1
[Raspberry Pi Original Development] KonstaT:
Pretty impossible to give much advice without knowing what sources you are using but it seems that you're likely mixing some Android 11/12 stuff.

libdrm in Android 12 has libdrm_headers - Android 11 doesn't. libgbm was renamed to libgbm_mesa somewhere around Android 11 (I'm not using AOSP Mesa) because minigbm already uses name libgbm.
[Raspberry Pi Original Development] SuperPi911:
I'm trying to build Arrow OS 12 ,with sources from rpi-lineage on GitHub , revision linineage-18.1
[Raspberry Pi Original Development] KonstaT:
I haven't pushed any branches for Android 12. I didn't even push manifest for Android 11. We'll see if I'll make some minimal booting configuration available at some point but meanwhile you'd need to do some work of your own.
[Raspberry Pi Original Development] SuperPi911:
How can I modify the files for Android 12?
[Raspberry Pi Original Development] KonstaT:
I guess this is the part where your own development work comes in. :)

If we're talking about graphics GloDroid (https://github.com/GloDroid) is a good reference point. Roman has done tons of excellent work to upstream the required support (Mesa, drm_hwcomposer, gbm/minigbm gralloc).
[Raspberry Pi Original Development] KonstaT:
New builds. 64-bit so make sure to choose the right add-ons. Same changelog on both.

LineageOS 18.1 (Android 11)

for Raspberry Pi 4

konstakang.com

LineageOS 18.1 Android TV (Android 11)

for Raspberry Pi 4

konstakang.com

-switch to 64-bit kernel & userspace

-switch to minigbm gbm_mesa and gralloc@4 API (thanks to Roman Stratiienko)

-update to Mesa 21.2.4

-update to Linux 5.4.155 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
[Raspberry Pi Original Development] SuperPi911:
Could you add Android support for the new rpi zero 2 w?
[Raspberry Pi Original Development] KonstaT:
In theory yes, in practice never going to happen. I already dropped Pi 3 (same hardware) because 1 GB of RAM is nowhere near enough for recent Android versions and this only has half of that.
[Raspberry Pi Original Development] SuperPi911:
Android 7 or lower ?, I think it can run on 512mb ram
[Raspberry Pi Original Development] KonstaT:
No. For one Nougat has been EOL'ed by Google for years and you shouldn't use it for anything anymore.

PI Zero 2 W support was only added to 5.10 kernel by Pi Foundation. This basically means Android 12 (and couple of next Android versions moving forward). You would be in a world of trouble if you tried to run some old Android version with 5.10 kernel. Backporting the hw support to some old kernel version is likely not possible either in any reasonable way.
[Raspberry Pi Original Development] jeff862:
I am using rpi 4 8gb version .. with usb-dac the songs played then stop and played on spotify, deezer, tidal .. why this happening... any solution for this or workaround ..please help
[Raspberry Pi Original Development] KonstaT:
Logcat? And can you be more precise what you mean by stop & played on? Simply a network issue?
[Raspberry Pi Original Development] jeff862:
Not a network issue .. is there a patch to correct this problem .. i tried this usb dac on other android tv box it doesn't stop
[Raspberry Pi Original Development] KonstaT:
Well, please let everyone know if you find a patch.

I couldn't possible know because I haven't seen any logs or even understand what you mean by stopping and playing on.
[Raspberry Pi Original Development] Rom95:
Hello,

I use lineage-18.1-20211026 + raspberry pi4 + USB Touch screen, and my touchscreen doesn't work,

when connected to USB in the serial port you can see that the touchscreen is recognized:

can anyone tell me how to solve the problem?
[Raspberry Pi Original Development] KonstaT:
It doesn't work at all or there's some strange behavior? You can use 'getevent' tool in rooted shell to see if you're getting any events out of the touchscreen.

You likely need to create an idc file (https://source.android.com/devices/input/input-device-configuration-files) with your device's vendor/product ids. There's already configs for some touchscreens that otherwise work as a mouse or claim to report pressure but in fact don't. See configs in /vendor/usr/idc/ for reference.
[Raspberry Pi Original Development] jeff862:
Why it's very difficult to connect to wifi in rpi 4 lineage 18 .. what is the solution for this?please help
[Raspberry Pi Original Development] jeff862:
i am having hard time to connecting wifi --rpi4 -8gb ram -- lineage 18-- is there a patch to make it easier to connect to wifi?
[Raspberry Pi Original Development] KonstaT:
That doesn't really describe the issue very well. 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. I've sometimes faced similar issues and switching the channel from my router has helped with this.
[Raspberry Pi Original Development] Van31415:
how to start lineageos without (hdmi) display?

with display - starting and working

without display -not strarting

and connect wifi difficult(
[Raspberry Pi Original Development] SuperPi911:
how can i fix this erorr on a havoc os (android 11) build

rares@ASUS-VivoBook-X509FL:~/havoc$ m

============================================

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=11

HAVOC_VERSION=4.10

TARGET_PRODUCT=havoc_rpi4

TARGET_BUILD_VARIANT=userdebug

TARGET_BUILD_TYPE=release

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv8-a

TARGET_CPU_VARIANT=cortex-a72

HOST_ARCH=x86_64

HOST_2ND_ARCH=x86

HOST_OS=linux

HOST_OS_EXTRA=Linux-5.4.0-89-generic-x86_64-Linux-Mint-20.2

HOST_CROSS_OS=windows

HOST_CROSS_ARCH=x86

HOST_CROSS_2ND_ARCH=x86_64

HOST_BUILD_TYPE=release

BUILD_ID=RQ3A.211001.001

OUT_DIR=out

PRODUCT_SOONG_NAMESPACES=device/brcm/rpi4 vendor/brcm/rpi4 device/brcm/rpi-common vendor/brcm/rpi-common packages/apps/Bluetooth

============================================

[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja

FAILED: out/soong/build.ninja

out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp

error: external/minigbm/Android.bp:137:1: "libgbm" depends on undefined module "libdrm_headers"

11:50:09 soong bootstrap failed with: exit status 1

#### failed to build some targets (15 seconds) ####

rares@ASUS-VivoBook-X509FL:~/havoc$
[Raspberry Pi Original Development] KonstaT:
You need to have something connected that reports EDID information. If you want to use this headless (e.g. remotely with VNC) and you can buy a dummy HDMI adapter.

You need to be a lot more precise than something being difficult. And also just replied to similar post. Logcat?
[Raspberry Pi Original Development] KonstaT:
Same reply as the last time.

Which libdrm version you need to use depends on what other repos you are mixing and matching.
[Raspberry Pi Original Development] SuperPi911:
All from rpi-lineage git