yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] KonstaT:
Hmm, it doesn't seem to work with my UVC (generic, cheap, chinese).

repo init -u git://github.com/LineageOS/android.git -b lineage-16.0
repo sync

and you'll get the full LineageOS 16.0 source code without the Pi device specific bits. V4L2 HALs readme pretty much covers the device specific changes I've made for camera.

Exact V4L2 camera HAL is here:

https://github.com/LineageOS/android_hardware_libhardware/tree/lineage-16.0/modules/camera/3_4

Other camera code in Android:

https://github.com/LineageOS/android_hardware_interfaces/tree/lineage-16.0/camera

https://github.com/LineageOS/android_frameworks_av/tree/lineage-16.0/camera

and there might be some scattered in other places as well...
[Raspberry Pi Original Development] senthor:
PSA: Just tried this on a fresh install using opengapps-arm-9-tvstock, but keep getting Setup Wizard and Package Installer crashes when accessing the launcher.
[Raspberry Pi Original Development] KonstaT:
Yeah, this was also recently discussed on my site. Pie AndroidTV gapps use some permissions that are not whitelisted on non-AndroidTV builds.
[Raspberry Pi Original Development] KonstaT:
New build.

lineage-16.0-20191222-UNOFFICIAL-KonstaKANG-rpi3.zip

https://www.androidfilehost.com/?fid=4349826312261681719

md5:956962b364583917b47046ef8556db85

-update to MESA 19.3 and latest upstream versions of minigbm gralloc, drm_hwcomposer, and libdrm

-set default resolution using a configuration file (see FAQ)

-add vendor init library to set serial number, revision, and resolution properties

-add health HAL to fake battery/charging

-add script to enable audio through 3.5mm jack (see FAQ)

-add initial support for RTC hardware (tested with DS3231)

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

-Android security patch level: 5 December 2019 (merged)
[Raspberry Pi Original Development] anthony24x:
Nice Christmas present!

Thanks a lot for your hard work.
[Raspberry Pi Original Development] hfmls:
when i try to open a youtube video i only get sound, no image, am i doying anything wrong?

latest version.

also, someone was saying netflix HD was possible, but i can't even open netflix app?

help please
[Raspberry Pi Original Development] KonstaT:
Quite difficult to say if you've done something wrong when you don't know what you've done in the first place...

Install gapps as instructed in the FAQ -> install Youtube from the Play Store -> both video & audio OK for me at least. Also m.youtube.com using the built in browser works OK as well as local video files.

This build doesn't pass Google's SafetyNet so Netflix app is not available on the Play Store. You can download the apk e.g. from APKMirror and sideload it, though. As far as I've tested it, it opens to the login screen at least (didn't bother to actually login). Some people have reported it working which I find surprising because of the SafetyNet. Maximum display resolution with this build is 720p so you won't be playing HD (1080p) videos anyway.

I ran the SafetyNet Test app (https://play.google.com/store/apps/details?id=org.freeandroidtools.safetynettest) and this build fails on 'Basic Integrity' (userdebug build, permissive SELinux, disabled dm-verity, root access, etc) and 'CTS Profile' (Rasberry Pi is not an Android device to begin with so there's isn't any Android build that has passed Google's Compatibility Test Suite to have Google Play certification). This means that many secure apps (protected video content, banking, etc) that check the status of SafetyNet API will not work.

As this is not an Android device to begin with there is no drivers to support hardware video decoding/encoding which is why I've never really intended my builds to be used as media/TV device.
[Raspberry Pi Original Development] devarshi84:
I have been using your build since many month satisfactorily. Thank you for the hardwork.

But a problem has cropped up recently. I also used the newer android build but facing the same problem.

1. When I am using Prime Video, the video is extremely blurred and it exits the playback in 5 seconds.

2. Videos on Chrome dont play. I only hear sound.

This is also happening on a fresh install. What should I be checking?

My build

Raspberry pi 3b+ with fan

Samsung 32 inch LCD

HDMI cable

your android Install.
[Raspberry Pi Original Development] KonstaT:
Like already said few times, Rasperry Pi is not an Android device to begin with so there is no drivers to support hardware video decoding/encoding. This is why I've never really intended my builds to be used as media/TV device. If you want to use your Pi primarily for media consumption, I'd recommend looking somewhere else (e.g. LibreELEC).

Quality of video playback depends on the app and what video formats it uses. I tested m.youtube.com using Chrome browser and both video & audio is OK for me at least.
[Raspberry Pi Original Development] TheAndras:
Hello,

I have an issue, when I switch off my TV or change HDMI1 (rpi) to HDMI2 the pi is crashing down immediately.

When I go back to HDMI 1 it's showing me black screen and I need to take out the power cable from the pi to reboot.

Except this issue this build is awesome, it's very smooth and could play 720p youtube videos as well.

I tried LineageOS 15.1 and LineageOS 14.1 too none of them had this issue. But these are so much slower than this one.

Do you know any solution for this problem?

I want that the pi could run in the background even if the TV is turned off. I don't even how can the pi sense which HDMI port is active on the TV :eek:
[Raspberry Pi Original Development] KonstaT:
I think that's unexpected behavior from your TV/display if it cuts all HDMI connectivity in those cases. At least I can switch input sources or power off (stand by) my displays without any problem. Graphics drivers in this build expect a connected HDMI display and EDID data that is transmitted.
[Raspberry Pi Original Development] sco1984:
Thanks [MENTION=7223862]KonstaT[/MENTION] for your effort.

1) I downloaded zip > extracted > burned on sd card > booted my pi 3

2) OS booted without any issues, Audio & video all ok. Wireless mouse & keyboard working without any issue.

3) Now, I want to install gapps to install mainly Google Play Store.

4) I tried to use command 'su' in default terminal and hit ENTER key

5) Now I type = rpi3-recovery.sh

6) I am getting message saying must run as root

7) I tried to run as = su rpi3-recovery.sh

8) I am back at the prompt

9) I reboot my pie using F5 command but it doesnt go to TWRP Recovery.

Which step I am missing?

I am following = https://konstakang.com/devices/rpi3/LineageOS16.0/

Regards,

Amey.
[Raspberry Pi Original Development] KonstaT:
'su' and 'rpi3-recovery.sh' are two separate commands. You also need to enable developer options and enable root access in the dev settings first (FAQ covers both).

BTW, there's an issue with the latest gapps package so you need to use an older gapps package for now (20200117 or older is known to work).

https://www.reddit.com/r/LineageOS/comments/ethlvr/warning_open_gapps_builds_20200122_23_24_25_26/
[Raspberry Pi Original Development] sco1984:
Yes [MENTION=7223862]KonstaT[/MENTION]

1) I tried both ways i.e. 1st just executed 'su' & then the 2nd command

2) I also tried to = su rpi-recovery.sh

3) I enabled 'Developer options' as well.

4) What I missed I guess is to 'enable' root access in it. Let me check again.

5) I tried to download Google play store apk indivisually > It got installed > But ..when I start it crashes. Screen DPI of that apk is 'nodpi' . I downloaded couple of Play store apk's from apkmirror. Didn't help
[Raspberry Pi Original Development] TheNT:
Is there any problem with back button not working on keyboard? ESC or BACK same thing.

Even tried on airmouse keyboard same thing.

Keyboard shortcuts show them right assignment in system but it just does nothing.

As i noticed on some overlay window it usually does something but on system and desktop it does nothing.

Thank you

btw best android for rpi that i saw by now.

DRM apps and stuff working. some issues with root for them as they notice it even if u have turned it off but...

minor bugs... but with all limitations of rpi and broadcom doing nothing it is great.

If with time something is done with hardware decoding that would be really something.
[Raspberry Pi Original Development] KonstaT:
I'm not aware of any issue with the back button. Works fine with the keyboard and air mouse I have. AFAICT back key isn't even supposed to do anything on the home screen (what do you expect it to do?) and ESC is not supposed to do anything anywhere.

Many secure apps (banking, protected video content, etc) use Google's SafetyNet API to check the status of the device which is a lot more than just a check for root access.
[Raspberry Pi Original Development] TheNT:
Issue is not from desktop sure u can not go back from desktop but let me say from settings menu, with backspace on keyboard you should go back to main screen.

It is important to me as from other apps is same like from Kodi or anywhere else where backspace brings you back to previous screen or main app page.

Kodi is usable with this build, very, if u limit it on 720p streams and u can do that in most addons.

But it is not just Kodi where backspace ain't working as i said.

Remote keyboards that you use as remotes like those wireless keyboards u use for media centers use also back button that emulate backspace on keyboard.

Also not working, i tried HP big keyboard and few others, backspace ain't working in my case on menus apps dialogs...

---------- Post added at 02:20 PM ---------- Previous post was at 01:47 PM ----------

Maybe it should be like that i do not know.

But let's make it simple.

What key on keyboard you use to emulate back arrow down in navigation bar.

That is in short what i need to avoid mouse usage.

thank you

---------- Post added at 02:44 PM ---------- Previous post was at 02:20 PM ----------

i think i found something seems F2 interfere with backspace in some programs.

F2 takes that role
[Raspberry Pi Original Development] KonstaT:
Backspace is not supposed to work as back key on Android either. If you have an air mouse/remote with power, home, back, vol up/down, select/ok, and arrow -keys, those should be mapped to the right keys (or at least they are on mine).

Please read the FAQ. F2 key on the keyboard is mapped to back button used in Android.
[Raspberry Pi Original Development] TheNT:
My apologies if that is writen somewhere, was searching and i didn't found so i asked.

At the end found out myself about F2 but it is not real solution for me.

My airmouse acts as keyboard on one side and remote other side and back button is not working in aps or from settings.

I use same that remote on androidbox and there it work fine.

And even regular keyboard work that way i described above.

No offense imo way more user friendly than F2 as remotes do not have F buttons usually.

Thank you for your work i just searched solution for problem i have.

Will use some key mapper app.
[Raspberry Pi Original Development] KonstaT:
If your air mouse uses some non-standard key mappings, you can add a specific key layout file for it (https://source.android.com/devices/input/key-layout-files). Or you can edit the default one (/system/usr/keylayout/Generic.kl). That's what I've done (https://github.com/lineage-rpi/andr...001-rpi3-modify-generic-keyboard-layout.patch).

F2 key does exactly the same thing as the back button on the navigation bar and it works just fine system wide.
[Raspberry Pi Original Development] sco1984:
[MENTION=7223862]KonstaT[/MENTION]

-Able to boot in to TWRP

-But unable to come out from TWRP

-System & Boot partitions are mounted but those directories are empty even after doing ls -la

-Is there any other way to exit from TWRP and boot in to Lineage OS?

-Do I need to clean up dalvic & cache?
[Raspberry Pi Original Development] KonstaT:
They're not empty unless you've formatted something you shouldn't have.

Yes, there's also the recovery2boot flashable zip. Please read the FAQ.

No, you're not supposed to anything other than what is told in the FAQ.
[Raspberry Pi Original Development] sco1984:
-I only flashed the latest gapps zip file in TWRP recovery but it failed with architecture type errors. [I have flashed gapps many times in previous lineage OS in Android phones]

-Did this destroyed the OS? [Shouldn't be ..but still]

-I ensured that I downloaded gapps for ARM64 i.e. Raspberry Pi 3 Model B and of course for Android 9 version.
[Raspberry Pi Original Development] KonstaT:
Please read the FAQ and follow the instructions provided! This is a 32-bit ARM Android image. Correct gapps package (open_gapps-arm-9.0-pico-xxxxxxxx.zip) is even linked in the FAQ!
[Raspberry Pi Original Development] sco1984:
Thanks.

-Shall I conclude that the 64bit gapp zip which I tried to install corrupted the OS?

-When I said 'Boot' & 'System' are mounted, I mean if I go to '/' partition and do the ls -la, I see those directories but I am unable to find = rpi3-recovery.sh file in those dir's.

-Is there a work around to go back to the OS? Or only option is to repeat the whole process i.e. rewrite the microSD card with Lineage 16 OS and follow the FAQ's? Thanks.
[Raspberry Pi Original Development] KonstaT:
No, trying to install gapps with wrong architecture shouldn't do anything other than exit with error message.

rpi3-recovery.sh is in /system/bin/ which is on $PATH so you can execute it from anywhere. There's also the recovery2boot flashable zip if running the script is too difficult.

You can also read what the script does and do the same changes manually e.g. after mounting the sdcard on your computer.
[Raspberry Pi Original Development] witzyz:
hi 2/7/2020 i install os = lineage-16.0-20191222-UNOFFICIAL-KonstaKANG-rpi3

how to install lcd 3.5inc for resberry pi3 model Bv1.2

thank ^^
[Raspberry Pi Original Development] KonstaT:
It depends what display you have and what hardware it uses. How would you do it in some other OS e.g. Raspbian?
[Raspberry Pi Original Development] witzyz:
my hardware lcd 3.5inc xt2046 touch controller 480*320 pixel with android LineageOS 16.0 (Android 9) for Raspberry Pi 3

https://www.img.in.th/image/T5ecfA
[Raspberry Pi Original Development] KonstaT:
Well, have you tried it with LineageOS? Can you get logs?

Kernel already has TOUCHSCREEN_ADS7846 driver that is used with those displays. There's still some other modifications needed for the touchscreen (https://konstakang.com/devices/rpi3/CM14.1/#comment-3865392433). As for the display itself, I honestly don't know how the graphics drivers used in LineageOS 16.0 currently handle displays like that (uses SPI?) I think someone had some luck with VGA666 that uses DPI, though. I should probably get myself one of those displays to test with.
[Raspberry Pi Original Development] KonstaT:
New build. A lot of new stuff in this one. :)

https://konstakang.com/devices/rpi3/LineageOS16.0/

add camera HAL to support Pi camera modules and USB webcams (thanks to Android-x86)

update to MESA 19.3.3 and latest upstream versions of minigbm gralloc, drm_hwcomposer, and libdrm

enable hardware overlays (improves graphics performance)

add option to switch to SwiftShader software renderer e.g. to use official 7" touchscreen or to boot without any display connected (see FAQ)

fix portrait apps on forced landscape orientation (thanks to Ladehunter)

update GPS HAL

option to use DIY hardware power button to boot to TWRP recovery (see FAQ)

initial support for IR modules and remotes (tested with TSOP4838)

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

Android security patch level: 5 January 2020 (merged)
[Raspberry Pi Original Development] TheNT:
Not sure am i first to try but unpacked file is too big for FAT32 to make update from TWRP.

will expand my card storage
[Raspberry Pi Original Development] KonstaT:
What? You don't install the image using TWRP.

Please read the FAQ under 'How to install'. If you want to keep user data from a previous release, there's also a FAQ section that covers that.
[Raspberry Pi Original Development] TheNT:
ughhh fck me sorry

i saw twrp in faq and went with it like with any other mobile os in past.

sorry again i just reread and saw my mistakes.
[Raspberry Pi Original Development] hfmls:
Thank you for new build. Do you think we will ever get video acceleration or simply not possible?
[Raspberry Pi Original Development] KonstaT:
I assume you mean hardware video decoding & encoding here (i.e. offloading e.g. H.264 dec/enc to hardware). I've done some research on this and Linux kernel has a thing called V4L2 MEM2MEM driver that can be used for this. With 4.19 kernel and going forward there is now bcm2835-codec driver that makes it possible to use the M2M kernel interface on the Pi for video dec/enc (https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=234778). GStreamer and FFMPEG can utilize the M2M driver on Linux distros. Problem is how to utilize it on Android and hook it up with Android's media stack. LineageOS used to have FFMPEG for extra codec support but it was dropped after Nougat (LineageOS 14.1). Android-x86 project still uses FFMPEG but it's an old version that doesn't yet support M2M codecs. So, one option is to bring up newer version of FFMPEG for Android. Or someone needs to come up with some other framework to utilize it. It's also very possible that this might happen eventually because this is a cross-platform thing that can be used on wide range of devices as it uses generic Linux interface. So yes, this might be possible sometime in the future when things mature. With the current state of things with the kernel and graphics drivers, Pi 3 will likely also run any new Android version in any foreseeable future...

Due to the open nature of things here there are actually very few things that are impossible. It's just a matter of if something is possible to achieve with any reasonable amount of effort.
[Raspberry Pi Original Development] Priyansu67:
So new build runs fine but everytime I flash open gapps tv stock it is stuck at boot animation.
[Raspberry Pi Original Development] KonstaT:
Please read the FAQ under 'How to install Google apps?'. This is not an Android TV build so you're not supposed to flash Android TV gapps either.
[Raspberry Pi Original Development] Priyansu67:
I followed the exact procedure of flash gapps and wiping data and I thought we can flash any gapps let that be pico or tv stock.
[Raspberry Pi Original Development] Priyansu67:
Having some size issue from all sides of the screen, the status bar and navigation bar appears to be outside the screen. Any solution?
[Raspberry Pi Original Development] KonstaT:
Nope, regular gapps in different sizes are for regular Android builds and Android TV gapps are for Android TV builds.

Try adjusting your display's settings if you can.

Normally you could remove/comment out 'disable_overscan=1' in /boot/config.txt but this seems to cause some issue with hardware overlays enabled. You could also disable hw overlays from Settings -> System -> Developer options -> Disable HW overlay or more permanently uncomment/add 'hwc.drm.use_overlay_planes=0' in /system/build.prop.
[Raspberry Pi Original Development] xChr11s:
Thanks for your effort, it works like a charm.

But I have one question: Is it possible the completely remove the root?

The App I was testing detected the root, even when it was deactivated in the developer settings.

Kind regards
[Raspberry Pi Original Development] KonstaT:
You can flash addonsu-remove-16.0-arm-signed.zip from https://download.lineageos.org/extras in TWRP to remove su binary.

I doubt that's going to help, though. Most secure apps these days also test various other things besides root access. Many apps use Google's SafetyNet API to determine the device status.
[Raspberry Pi Original Development] xChr11s:
Worked for me ! Thanks
[Raspberry Pi Original Development] justjoin:
Hey KonstaT thanks for build.. but i have questions, im using DS3231 on i2c port on Raspi 3.. but its doesn't detected automatically, even it's error when i try hwclock -s
[Raspberry Pi Original Development] KonstaT:
You need to uncomment the line under RTC section in /boot/config.txt first.

After that e.g.

su
hwclock -s -f /dev/rtc0
[Raspberry Pi Original Development] rhtb4theeyeblnks:
cant download no mirrors found :(
[Raspberry Pi Original Development] justjoin:
Its working now.. but i can't change the hwclock file.. after i hwclock -s -f /dev/rtc0 then hwclock it won't change.. it still on /dev/misc/rtc and everytime i create symlink to it, its gone after reboot..
[Raspberry Pi Original Development] KonstaT:
Sorry, can't quite understand what you're trying to change and why. Why not just use the '-f /dev/rtc0' argument with hwclock?

You could add a script to /system/etc/init.d/ if you want to create your own symlinks (or read the time from rtc), etc on boot.
[Raspberry Pi Original Development] diaahussein:
I know that this is not planned to be a TV box but it would be nice to have the option

Does that mean that we can not install the TVstock GApps

Because i also got stuck in the boot animations for ever when i installed them

Is there any work around for this

While installing the PICO GAPP went very smooth

P.S. excellent work my friend
[Raspberry Pi Original Development] KonstaT:
You can install a different launcher if you want to tune this into something more TV friendly.

I see no reason to create builds with Android TV UI. It doesn't offer anything that you don't already have here. Actually it only has limited access to some hardware functionalities.
[Raspberry Pi Original Development] HuTcHx:
Hello all,

quick question, I have installed lineage os, but I am getting some out of synch audio. Any idea how to fix that or some tips? :)
[Raspberry Pi Original Development] iruxx:
Does somebody know if a gsm module would work and you would be able to make calls or send SMS ?
[Raspberry Pi Original Development] A4Alpha:
Kudos to the creator, Hope to see it get more updates & optimizations.
[Raspberry Pi Original Development] prguzman1978:
Good Job! Running this version on my RPI3-B+, will there be any future builds with 1080p res? Happy 4th!!!
[Raspberry Pi Original Development] turtleletortue:
Good evening. iirc, Konstakang left a file called "resolution.txt" in the fat32 partition with the boot files in it. You can edit this to match the resolution of your monitor. Ex: my monitor is 1920 by 1080, so I'd change it to say 1920x1080 instead of 1280x720. I don't know if this messes up performance or anything, though. Happy 4th of July!
[Raspberry Pi Original Development] prguzman1978:
Thanks for your reply, the .txt file is read-only you cannot edit. I will see if I can edit when I burn the image to the SD.

Update: Perfect all I had to do is pull out sd card edit res file and once booted up change the font size and display to large.
[Raspberry Pi Original Development] cmckee.cna:
Nm, found what I needed, and now I can't figure out how to just delete this.
[Raspberry Pi Original Development] KonstaT:
New build.

https://konstakang.com/devices/rpi3/LineageOS16.0/

-add ir-keytable tool to configure IR remotes

-enable USB gadget support & fix adb toggle in developer options

-add support for storage devices with exFAT filesystem

-hide su binary when root access is not enabled in developer options

-add support for PCM512x audio DACs (tested with Hifiberry DAC+)

-improve support for Waveshare HDMI touchscreens

-fix recording videos with camcorder

-add TWRP flashable zip to resize data partition (see FAQ)

-update TWRP to 3.3.1-1

-update to MESA 20.1.3 and latest upstream versions of minigbm gralloc, drm_hwcomposer, and libdrm

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

-Android security patch level: 5 July 2020 (merged)
[Raspberry Pi Original Development] ccMi9t:
Sounds cool! Will this work with any "Waveshare" compatible display or is it just the 7 inch one

Looking at this in particular as I need a very specific form factor:

https://www.waveshare.com/5inch-HDMI-LCD-H.htm

Any help would be greatly appreciated!