yashsingh1/xdaforums huggingface dataset:
[Raspberry Pi Original Development] KonstaT:
Here’s my build of LineageOS 14.1 for Raspberry Pi 3 Model B. It is unofficial and unsupported by the LineageOS team. It’s for advanced users only.

https://konstakang.com/devices/rpi3/CM14.1/

lineage-14.1-20180817-UNOFFICIAL-KonstaKANG-rpi3.zip

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

md5:affa35dd70b51e4b70c9acb996f7304b

Sources:

lineage-rpi

Thanks:

peyo-hd and everyone who’s contributed to android-rpi

LineageOS team & everyone who’s been working on CM14.1
[Raspberry Pi Original Development] KonstaT:
How to install:

Follow the official Raspberry Pi instructions for writing the image to the SD card (Linux, Mac, Windows).

FAQ:

Q: I can’t find developer options, why?

A: Settings -> About phone -> Click ‘Build number’ several times

Q: I don’t have reboot options in power menu, why?

A: Settings -> Developer options -> Advanced restart

Q: I have no root, why? What is that hashtag on my status bar?

A: You need enable root access under Settings -> Developer options -> Root access. Root management is now integrated as part of LineageOS’ Privacy Guard and you can manage per app permissions under Settings -> Developer options -> Manage root access. You’ll have a persistent notification in the status bar when you’re running an app that uses root permissions.

Q: I have official 7” LCD display and touchscreen. What should I do?

A: Execute following commands in ‘adb shell’/serial console/terminal (you can enable built-in terminal app from Settings -> Developer options -> Local terminal) and reboot your device:

su
rpi3-display.sh

Q: Settings -> Storage shows xx GB used by system. There’s unallocated space on my sdcard. What should I do?

A: This is a 4 GB image, remaining space on your sdcard will remain unallocated. Settings app shows unallocated space as used by system which in reality it is not. You can use e.g. GParted and extend /data partition (/dev/block/mmcblk0p3) to cover the unallocated space. Resizing the partition manually will break support for encrypting /data. Format /data in TWRP recovery (Wipe->Format data) after resizing to leave required space for crypto footer.

Q: Raspberry Pi doesn’t have power button, how do I power off/reboot my device?

A: Following keyboard keys work as Android buttons: F1 = Home, F2 = Back, F3 = Multi-tasking, F4 = Menu, F5 = Power, F11 = Volume down, and F12 = Volume up. You can also use one of many third party reboot applications.

Q: How to boot to TWRP recovery?

A: There’s currently no proper way to boot between Android and TWRP, but this can achieved by renaming the ramdisk you want to boot. Execute following commands in ‘adb shell’/serial console/terminal (you can enable built-in terminal app from Settings -> Developer options -> Local terminal) and reboot your device:

su
rpi3-recovery.sh

If mouse cursor doesn’t appear, try replugging your mouse.

Q: How to boot out of TWRP recovery?

A: Flash my recovery2boot zip in TWRP.

Q: How to install Google apps?

Download open_gapps-arm-7.1-pico-xxxxxxxx.zip and save it to your device’s internal storage or use an external USB drive

Boot to TWRP recovery (see FAQ)

Install open_gapps-arm-7.1-pico-xxxxxxxx.zip from your selected storage

Wipe->Factory reset!

Boot out of recovery (see FAQ)
[Raspberry Pi Original Development] KonstaT:
Merged commits not mentioned in the changelog.

17.8. changelog:

include TWRP 3.2.3-0 custom recovery (see FAQ how to boot)

fix Gallery app crashing (and likely various third party apps as well)

add support for encrypting the device

merge AOSP kernel/common android-4.4-n branch to have proper Android Nougat kernel

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

Android security patch level: 5 August 2018 (merged)

15.6. changelog:

add support for USB webcams (UVC) with third party USB webcam apps

default to noop I/O scheduler

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

Android security patch level: 5 June 2018 (merged)

15.4. changelog:

update audio HAL (fix USB microphone, etc)

add support for external USB GPS dongles (1546:01a7 U-Blox AG, etc - GPS dongle must be plugged-in while booting the device)

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

Android security patch level: 5 April 2018 (merged)

18.1. 2018 changelog:

add support for I2C devices

enable Android low-RAM configuration

add lights HAL to control display brightness from Android on offical RPI display (version 1.1)

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

Android security patch level: 5 January 2018 (merged)

17.11. changelog:

fix wifi reconnect on boot (thanks to Google)

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

patch recently disclosed BlueBorne and KRACK vulnerabilities (merged)

Android security patch level: 5 October 2017 (merged)

10.8. changelog:

update to Linux 4.4.80 kernel

merge AOSP kernel/common android-4.4 branch to have proper Android kernel

enable sdcardfs

add BFQ i/o scheduler and enable it by default

Jelly browser (merged)

Android security patch level: 5 August 2017 (merged)

16.4. changelog:

add support for wifi tethering

add support for Widevine DRM

improve Play Store compatibility

Android 7.1.2 (merged)

Android security patch level: 5 April 2017 (merged)

11.4. changelog:

initial relase

Previous builds:

AndroidFileHost
[Raspberry Pi Original Development] Project999:
I cannot boot out of recovery after installing Gapps in TWRP. When I run rpi3-recovery.sh boot I got Segmentation Fault error. Please help. Thanks
[Raspberry Pi Original Development] KonstaT:
Please read the FAQ! It doesn't say to run the same script, it says to flash recovery2boot zip in TWRP.

I'm aware of the segfault.
[Raspberry Pi Original Development] Project999:
Ok, I was doing both ans will only flash the zip file next try.
[Raspberry Pi Original Development] Project999:
Yes. It worked this time after only flashing the recovery2boot zip file. Thank you.
[Raspberry Pi Original Development] laharl_22:
Its possible to update ROM via recovery?
[Raspberry Pi Original Development] KonstaT:
No, not currently. Partition structure (especially boot partition) on this device is different than on Android devices usually (well, as Raspberry is not an Android device to begin with). It would require some quite significant modifications to LineageOS build system to build recovery flashable ROM zips for this device (it's all open source so you're welcome to have a crack at it). There's also no proper way to cold boot (from power off) to recovery which makes it less useful than on other devices. I only included TWRP recently and it's currently mostly just used for installing gapps.
[Raspberry Pi Original Development] laharl_22:
So no way for updating ROM without loose data?
[Raspberry Pi Original Development] KonstaT:
No, not currently and who said there was going to be any updates. :P

Well, you can actually restore your previous /data partition in TWRP after you've installed a new image.
[Raspberry Pi Original Development] KonstaT:
Sorry, double post.
[Raspberry Pi Original Development] ulfdogg:
Hi.

Is there a GPIO support? Everything is working great, but I build it into my car, and I have some pushbuttons connected. I would like to use it for opening apps or shutdown etc. Any ideas? couldn't find anything on google? Thanks
[Raspberry Pi Original Development] KonstaT:
Yes, that should be possible but you need to do a little work for that.

4.4 kernel used in LineageOS 14.1 doesn't have gpio-key overlay (https://github.com/raspberrypi/linux/commit/7bc9c88a0eb043c5387a23d4ade23359749398e0) but I have already enabled KEYBOARD_GPIO that is also needed for this. So you need to build that overlay, copy it to device, and configure it in config.txt depending on what GPIO pins you're using. There's also another similar approach (different overlay) that's been reported working. https://stackoverflow.com/questions/50224010/using-gpio-keys-interrupt-to-wake-up-screen-on-rpi3
[Raspberry Pi Original Development] zhengyw:
Does this build support 3b+?If not,how to ?
[Raspberry Pi Original Development] KonstaT:
No, you can use LineageOS 15.1 build instead.

This build uses Linux 4.4 kernel and Broadcom added support for 3B+ only on later kernel versions (4.9 and 4.14). 4.4 is actually the newest that Android Nougat supports (https://android.googlesource.com/kernel/common/) and there's some network issues using newer ones. 4.9 is the newest for Oreo and 4.14 for Pie. So the Linux kernel in LineageOS 15.1 is actually too new for the Android version. ;) There's no major changes between Oreo and Pie kernels, though.

Android kernel versions lag behind mainline because chipset manufacturers (Qualcomm, etc) need to make significant modifications to support their hardware. Android devices usually stay with the Linux kernel version they initially shipped with so there also needs to be quite long support time (4.4 is still supported with Pie).
[Raspberry Pi Original Development] zhengyw:
Thank you..So I have to wait till los 15.1 go stable
[Raspberry Pi Original Development] s1lex:
Hi, thanks for this build, I might have done something wrong as I can't past the setup wizard, after security setup it comes back to lineageOS startup screen and the begin button to start again the setup wizard :(
[Raspberry Pi Original Development] KonstaT:
I've heard about this but can't reproduce it myself and I haven't seen any logs (logcat). You could try using another faster sdcard. Some people have also removed the SetupWizard apk from the image manually.
[Raspberry Pi Original Development] Minas90:
Hi there,

Thanks for amazing work!

The only issue I'm experiencing is some flickering in graphic heavy and full screen apps. Am I doing something wrong or it's a known issue?

I just noticed that it's happening more when I use: "dtoverlay=vc4-fkms-v3d,cma-256"

But with dtoverlay=vc4-kms-v3d,cma-256 composite video output is not there. Any solutions?
[Raspberry Pi Original Development] KonstaT:
I've seen that happen (screen flickering during boot animation when system is under heavy load) so I guess you can say that's one of many known issues with the graphics drivers.

I don't have any hardware to test composite output so that's news for me that it even works using fkms.
[Raspberry Pi Original Development] Minas90:
Yeah with kms it's flickering only with very heavy load, but with fkms it's flickering eg when I scroll or simply move mouse. And it's getting even worse when I open some navigation app or play video in browser. It's the same both with HDMI and RCA when I use fkms.

I spent hours trying to make it work with composite output and nothing helped. Finally I tried to uncomment fkms which was already in config.txt and magically it started working.

I'm trying to build an entertainment system for my car ( it has a screen with RCA input ). I think full Android is the most flexible option. There is also OpenAuto for Raspberry Pi. It's kind of convenient to get everything from your phone including calls, but it's very limited, needs an Android phone to be connected and mouse cursor is missing, so without touchscreen it's a nightmare. BTW with your latest build cursor is distorted and it's fixed when I set "larger" in display setting for screen DPI.

Please if possible fix the cursor issue, it's easy to reproduce, simply connect a mouse with default config and you will see the distorted cursor.

And is it possible to somehow tweak fkms to try fixing the flickering?
[Raspberry Pi Original Development] KonstaT:
You can tick/untick Settings -> Accessibility -> Large mouse cursor and it will work until next reboot. More permanent solution is to modify display density (ro.sf.lcd_density is /system/build.prop). Or apparently you can also change display size from setting like you did.

I haven't really looked into differences between kms and fkms and what it means for Android but there's some info available here (https://www.raspberrypi.org/forums/viewtopic.php?t=159853).
[Raspberry Pi Original Development] Minas90:
I will try to modify density, thank you! The issue is that cursor is shown properly only when I set to "larger" from display settings. And only arrow cursor is shown properly, other cursors ( like hand when I point to a link ) have the same issue. And some apps show heavy noise instead of UI. It's fixed when I change density from display settings, but other apps and cursor get spoiled in that case. :(

I guess both kms and fkms are not perfect. At least kms has fewer graphical glitches when I move mouse, but sadly I can't use it, because I need to connect it via RCA. I tried to increase GPU memory and many other things, it still has the glitch.
[Raspberry Pi Original Development] Frazor_12:
Hey, i am new here. I managed to get LineageOS running on my raspi. Now i want to use my 7 inch touch display. But i don't know how i can use the console, or something like that. I tried to use putty, but i can't connect. The IP is right. I have another Raspberry in my network and it workes fine with putty. I hope you can help me. Thanks.
[Raspberry Pi Original Development] KonstaT:
Easiest way is to enable built-in terminal app (Settings -> Developer options -> Local terminal).

'Android debugging' and 'ADB over network' need to enabled from 'Developer options' if you want to use adb over wifi. Then follow these instructions (skip steps 2-5): https://developer.android.com/studio/command-line/adb#wireless
[Raspberry Pi Original Development] jjakajonas:
[MENTION=7223862]KonstaT[/MENTION]

I was thinking to ask you here.

Its about integrate TWRP in the ROM and how you got DRM to work?

I can't get TWRP to work on another ROM and WV DRM do not work either.
[Raspberry Pi Original Development] KonstaT:
There's instructions how to build TWRP and what do with it once you have (https://github.com/lineage-rpi/android_local_manifest/blob/twrp-8.1/README.md). If you're building TWRP for Nougat, you need to adapt the TWRP fstab for Nougat partition structure (https://github.com/lineage-rpi/android_device_brcm_rpi3/blob/twrp-8.1/twrp.fstab and https://github.com/lineage-rpi/android_device_brcm_rpi3/blob/lineage-15.1/ramdisk/fstab.rpi3 vs. https://github.com/lineage-rpi/android_device_brcm_rpi3/blob/cm-14.1/ramdisk/fstab.rpi3).

Widevine needs some proprietary drivers (https://github.com/lineage-rpi/prop...mmit/8d42dd647de79946927e4f070be886d2a1ddd868).

Sorry, but I'm not going to help you with hacking some old outdated existing build because I just find that extremely silly thing to do. :P If you want an Android TV build of LineageOS (why exactly? you can do the same stuff with tablet UI) you can quite easily build one yourself. Check e.g. android-rpi's (https://github.com/android-rpi/device_brcm_rpi3) diff between nougat-tablet and nougat branches and adapt similar changes to LineageOS device tree. There's even LineageOS build instructions available (https://github.com/lineage-rpi/android_local_manifest/blob/cm-14.1/README.md).
[Raspberry Pi Original Development] jjakajonas:
This is actually what I am doing.

I'm trying to build a new kernel and the system from android-rpi.

But there's no TWRP and the build from the other tread lacks in DRM support.

So I wanted to build a new build of it and try to fix some minor bugs.

The reason why a Android TV build is that I have an old flat screen TV that not even can show television

its an old analog and the provider I can have here is digital, so to use them I have to get a new TV or rent a box from them.

For now I have just had a chromcast (2. Edition) and my Android phone.

But I often have problems whit start streaming on the chromcast (I suspect my slow Internet Internet connection is the problem there) and started to test a android device (my pi) on the TV and got less problems.

But I don't want to use a keyboard and mouse all the time now that I have a few Android phones there can act as a Android TV remote.

So it all goes back to build a image with som bugs fixed. And minor adjustments to make it a bit better so I can customize it as I please.

Also I try to make this as a part in a much bigger DIY SmartHome project ;)
[Raspberry Pi Original Development] KonstaT:
Sorry, but android-rpi is also outdated. There's all kind of fixes/improvements I've done past year and half (see changelog in the third post of this thread) and the kernel in lineage-rpi is also on a completely different level (it has Google's Android reference kernel merged into it with all the monthly security patches). Why are you not using LineageOS sources or simply just the build I've provided?

You can't use your rpi3 as a Chromecast even if you make an Android TV build. You can't use your phone as remote even if you make an Android TV build.
[Raspberry Pi Original Development] jjakajonas:
No offense.

But you have done some work yourself.

I also would like to make my own ROM and try to se what I can do with it.

I'm also new to this kind of work.

But this ROM I work whit had a bug whit BT crashing at boot.

I have made a minor fix already so it don't crash and now can connect to it.

So well...

Back to google I see now that devs don't seems to want to help new there's wants to start development.

Thanks for your time and need to make me just use your work instead of learn how to do stuff...
[Raspberry Pi Original Development] KonstaT:
So you're saying I've done too much work (how would that offend me?) and you want to do the exact same work again yourself. That seems very reasonable. :P

Errm, you do understand how concept of open source works, right? I've initially forked android-rpi and fixed whatever I though needed fixing and improved it where I though it needed improving (a lot of stuff can happen in 18 months while android-rpi has been pretty much unmaintained or focused on display work on newer Android versions). I've open sourced my work so the next person doesn't need to do same work again! They can build great stuff on top of the work I've done and the work that came before me.

If there's something broken in LineageOS that you think needs fixing or things that you think need improving, why don't you want to contribute and fix it in LineageOS?

This is open source (https://github.com/lineage-rpi) so none of it is any secret - exactly the total opposite. I also take pride in the fact that I've documented my changes well so you might want to have a look in the git histories if you want to understand how things work and why.
[Raspberry Pi Original Development] jjakajonas:
I will not say you have made too much work.

Actually will I say you have made a so grate work that I don't know what to do to "fix" the system.

Honestly... Your ROM works and I have found parts in the work you have done that I wanted in my ROM.

The only reason for not use the ROM you have made is the lack of "Android TV" function.

If I somehow could get the Android TV function in your work and maybe try fix the problem whit the remote part would I use your work without a doubt.

But its the Android TV function I need and the one that I work the hardest on figure out..

As I stated. The BT there crash in the other ROM did I fix by changing a file and added e few others and now BT don't crash and I can pair it with my phone.

I don't say I can make it work.

But I only got my new pi to work on this project.

I also reinstalled a computer to work on a ROM to use on the pi that I could promote control from my phone.

My only problem is just that every time I talk to a dev (no matter what work theres talking about) do I often get the answer "If you want to learn to work with, search on google for how to do it" the thing is just that thing on google can mis in information, not be updated and be super hard to find out what is the right way to get stuff done.

That leave new commers like my to "try it on your own" and that do that there's a need to go back to previous work and try to work that to latest update to learn the stuff...

If that method works to learn develop then there's a long way to contribute to the community.

Also. If the community don't contribute to get new in to the community then will it be hard to contribute to the community.

I don't say that there's a need to devs drops every thing to guide from start to end.

But a few pointers are much appreciated to get started on...
[Raspberry Pi Original Development] KonstaT:
Which is exactly why I told you it would make more sense to build Android TV version of LineageOS. Why would you want to go back in time 18 months and dismiss all the work that is already done? Sure you can have your Android TV hacking some old build but it will be broken in various other ways. You think LineageOS is missing an Android TV UI - make it have an Android TV UI. ;) Fork it, do whatever you want with it (complying with the open source licensing of course), send a patch if/when you feel it's ready (any bluetooth patches are welcome as well :)).

Like said, learning to use git (diffs, etc) and looking into the git history helps a lot with learning and understanding things. Not much of the makefiles/code in Android device trees is commented, so git log is where you'll find them.

I thought I gave you good answers on both the questions you asked before. You can always ask if it's too technical or you need a clarification.
[Raspberry Pi Original Development] jjakajonas:
I will look in to it and see what I can do.

My knowledge is just basically nothing.

But I try build on lineage (I already have it on the phone theres planed as the remote)

So now I just need to clear out the other system and get the new repo.

That should be the easy part.
[Raspberry Pi Original Development] KonstaT:
What exactly are you trying to build? TWRP, LineageOS 14.1, and LineageOS 15.1 all have their own source repositories and build instructions (https://github.com/lineage-rpi/android_local_manifest/tree/twrp-8.1, https://github.com/lineage-rpi/android_local_manifest/tree/cm-14.1, and https://github.com/lineage-rpi/android_local_manifest/tree/lineage-15.1, respectively).

Build system usually tells what went wrong (fatal error: runtime: out of memory). You need to have 64-bit OS to build Android and I'd recommend a machine with at least 8GB of RAM for recent Android versions (most definitely wouldn't try with anything less than 4GB). Make sure you've followed general AOSP instructions to setup a build environment (https://source.android.com/setup/build/initializing). Setting 'export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"' helps with Jack running out of memory with recent Android versions, but your build never got that far that it would make any difference.

Repo should also tell which repository failed to sync (somewhere before that?). Repo also has verbose- and trace-options that should give more information. Or just sync one repository at a time (repo sync -j1) so you'll see which one fails.
[Raspberry Pi Original Development] jjakajonas:
I had planed to build TWRP witch fails.

I tryed to build lineage 14.1 that fails.

Then I tryed 15.1 that fails

And lastly I tryed the 15.1-4.4 that fails.

All was done separately and after a full redo of steps all the way back to following the steps on making the environment at AOSP web page.

I run latest Ubuntu on x64 and 4 GB ram.

But I can try to start over on another machine whit more RAM if that will do the trick.
[Raspberry Pi Original Development] KonstaT:
Something wrong in your end obviously because I know several people who've managed to build themselves following the instructions. How do those builds fail exactly?

You need to sync the different source repositories to their own directories of course. You're also mixing different instructions (e.g. 'export ALLOW_MISSING_DEPENDENCIES=true' is only for TWRP build). Pick a guide and stick with it. TWRP is the quickest to sync and build (it's a minimal manifest and you're only building the recovery vs. whole Android and everything you need for it).

I'd stick with LTS versions of Ubuntu. Latest (18.04) should work AFAIK.