-
- Posts: 26
- Joined: Thu Jan 05, 2012 5:28 pm
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
How's the performance with Android 9 on the Pi 3 B+? I'm looking into buying a Raspberry Pi for game streaming and other media streaming, but I saw in other older posts that performance is iffy with Android on the Pi 3 B+ but that Android 7 runs great on the Pi 3 non plus model. Should I go with a non plus model and just run Android 7 version of LineageOS or go with the plus model and run Android 9?
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Performance on LineageOS 16.0 is superior to both previous versions (14.1 & 15.1) and it also supports Pi 3 B+.Generalkidd wrote: ↑Tue Jan 28, 2020 5:46 amHow's the performance with Android 9 on the Pi 3 B+? I'm looking into buying a Raspberry Pi for game streaming and other media streaming, but I saw in other older posts that performance is iffy with Android on the Pi 3 B+ but that Android 7 runs great on the Pi 3 non plus model. Should I go with a non plus model and just run Android 7 version of LineageOS or go with the plus model and run Android 9?
None of these builds support hardware video decoding/encoding so I'm not sure if this is best suited for the use case you had in mind. It depends on the app and what video formats it uses.
KonstaKANG.com
-
- Posts: 3
- Joined: Wed Nov 18, 2015 4:36 pm
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Hi Konsta,
I have a question. Does LineageOS 16.0 for a RPi 3 have bash installed within it? I have a few bash scripts that I'd like to run. Plus, I have a RemotePi (a device that allows you to shutdown a RPi in an orderly manner) which also uses a couple of bash scripts.
Thanks in advance.
Best regards.
I have a question. Does LineageOS 16.0 for a RPi 3 have bash installed within it? I have a few bash scripts that I'd like to run. Plus, I have a RemotePi (a device that allows you to shutdown a RPi in an orderly manner) which also uses a couple of bash scripts.
Thanks in advance.
Best regards.
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Yes, LineageOS has bash but it's not the default shell. There's also tools like vim and nano text editors, that are usually not included in Android, that can make your life a bit easier with scripts.Trespasser wrote: ↑Thu Feb 06, 2020 4:41 amHi Konsta,
I have a question. Does LineageOS 16.0 for a RPi 3 have bash installed within it? I have a few bash scripts that I'd like to run. Plus, I have a RemotePi (a device that allows you to shutdown a RPi in an orderly manner) which also uses a couple of bash scripts.
Thanks in advance.
Best regards.
You can place your scripts inside /system/etc/init.d/ directory if you want that your scripts are executed on boot (don't forget to set permissions on your scripts to 755 and system partition needs to be mounted rw before editing, too).
KonstaKANG.com
-
- Posts: 3
- Joined: Wed Nov 18, 2015 4:36 pm
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Hey Konsta,
I will say one thing about LineageOS 16.0...it ran smooth as silk. Much smoother than 15.0. I really liked it. Great work.
Thanks for your reply, and help.
Best regards.
Bob
I will say one thing about LineageOS 16.0...it ran smooth as silk. Much smoother than 15.0. I really liked it. Great work.
Thanks for your reply, and help.
Best regards.
Bob
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
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)

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)
KonstaKANG.com
-
- Posts: 1
- Joined: Wed Feb 12, 2020 3:19 am
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
This build of Android is fantastic. It's working great on my 3B. I'm looking to use this as a CarPC. Obviously, boot times are pretty critical for that. Any recommendations on reducing the boot time (currently about 30s from cold start)? I'm looking to land directly in the AutoKit app that supports the Carlinkit CarPlay adapter. Thanks!
Keep up the awesome work.
Keep up the awesome work.
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Storage speed is one obvious bottleneck especially during booting the device so use a sdcard that is as fast as possible. Overclocking CPU/GPU/SD is an option though I wouldn't necessarily recommend it.davidbashman wrote: ↑Wed Feb 12, 2020 3:22 amThis build of Android is fantastic. It's working great on my 3B. I'm looking to use this as a CarPC. Obviously, boot times are pretty critical for that. Any recommendations on reducing the boot time (currently about 30s from cold start)? I'm looking to land directly in the AutoKit app that supports the Carlinkit CarPlay adapter. Thanks!
Keep up the awesome work.
You can also try to keep the system as minimal as possible for your requirements. You can even remove system apps you don't need if you have a specific purpose like that in mind. Low RAM configuration enabled on this build also sets some limitations. There's e.g. ro.config.max_starting_bg system property that you can use to set number of starting background services. It's currently one on low RAM config (8 on regular devices). I've set it to 4 on some previous builds. Maybe worth testing if different values have any impact on the time it takes to boot.
It just takes certain time to boot Android from zero so that's just something that you'll have to live with. I doubt you're taking several seconds away from that no matter what you do.
KonstaKANG.com
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Hello Everybody
Sorry for my English. I have a question. Can I use IR remote control on this build? LIRC or something different. How can I configure it? Thanks
Sorry for my English. I have a question. Can I use IR remote control on this build? LIRC or something different. How can I configure it? Thanks
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Yes, you can use IR remotes on both Pi 3 and Pi 4. Latest Pi 3 build doesn't yet include ir-keytable tool that you might need for configuring your remote but latest Pi 4 build already has it. Here's a TWRP flashable zip to add it on Pi 3 (https://www.androidfilehost.com/?fid=43 ... 2261722342).
This is using gpio-ir driver instead of LIRC. There's a line in /boot/config.txt under 'IR' section that you need to uncomment after connecting your IR module. If your remote is supported by the Linux kernel (https://github.com/lineage-rpi/android_ ... rc/keymaps) you can use rc-map-name parameter (https://github.com/lineage-rpi/android_ ... #L745-L758) on that line to select the correct keymap. Otherwise you need to use ir-keytable tool to configure your remote.
KonstaKANG.com
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Thank you for your answer.
1. So, can I turn ON/OFF my Pi3B+ with remote control?
2. Sorry, I'm not programmer. And I don't understand how to configure the "IR keytable". Maybe You can explain me with "2-3 words" how to? Thank you again
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
1. Well, you can invoke the power menu or put the device to 'sleep' (switch display off) i.e. exactly the same thing that happens on any Android device when you press the power button. You can't use it to power on the device of course (can wake from sleep).
2. 'ir-keytable --help' or Google search. Even that was more than 2-3 words...
KonstaKANG.com
-
- Posts: 441
- Joined: Mon Jan 01, 2018 2:14 pm
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
I have a question about adding usb device :
I have a 4g modem I want to add to the pi running android
I have the drivers , but as I understadn I need to complie them with the all kernel and "create" a new image? - is this true ?
maybe there is a fastet way to load driver to the unit?
if not -
is there any way to download the android and edit it with the drivers?
Thanks ,
I have a 4g modem I want to add to the pi running android
I have the drivers , but as I understadn I need to complie them with the all kernel and "create" a new image? - is this true ?
maybe there is a fastet way to load driver to the unit?
if not -
is there any way to download the android and edit it with the drivers?
Thanks ,
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Hi,
I have installed lineageOS 16, and flashed Gapps ARM 9.0 tvstock in TWRP, then I reboot back to android using recovery2boot.zip.
Now my raspberry pi 3B+ is stuck in the lineageOS startup for at least 30mins now. Is there something wrong with it?
I have installed lineageOS 16, and flashed Gapps ARM 9.0 tvstock in TWRP, then I reboot back to android using recovery2boot.zip.
Now my raspberry pi 3B+ is stuck in the lineageOS startup for at least 30mins now. Is there something wrong with it?
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
I think you'd need to do a lot of work to get something like that working on Android. Source code for the Linux kernel is here (https://github.com/lineage-rpi/android_kernel_brcm_rpi) if you want to try something out but you'll need a lot more than just some kernel driver.david_1234 wrote: ↑Wed Apr 01, 2020 11:03 amI have a question about adding usb device :
I have a 4g modem I want to add to the pi running android
I have the drivers , but as I understadn I need to complie them with the all kernel and "create" a new image? - is this true ?
maybe there is a fastet way to load driver to the unit?
if not -
is there any way to download the android and edit it with the drivers?
Thanks ,
Last edited by Konsta on Thu Apr 02, 2020 4:45 pm, edited 1 time in total.
KonstaKANG.com
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Please read the FAQ under 'Q: How to install Google apps?'. This is not an Android TV build so you're not supposed to install Android TV gapps (pico package recommended).
KonstaKANG.com
-
- Posts: 441
- Joined: Mon Jan 01, 2018 2:14 pm
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
why ,I think you'd need to do a lot of work to get something like that working on Android. Source code for the Linux kernel is here (https://github.com/lineage-rpi/android_kernel_brcm_rpi) if you want to try something out but you'll need a lot more than just some kernel driver.
I have the driver from the modem company ,
if I take the Linux Kernal and add the drivers like they say ?
and wouldn't change anything else -
will it work?
Thanks ,
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Already gave you the link for the kernel source so you're welcome to give it a try.david_1234 wrote: ↑Sun Apr 05, 2020 6:28 amwhy ,
I have the driver from the modem company ,
if I take the Linux Kernal and add the drivers like they say ?
and wouldn't change anything else -
will it work?
Thanks ,

I honestly don't know without knowing the specifics of the hardware and the driver. Maybe you can control it from the command line somehow but it's not going to be hooked up to the Android UI in any way.
KonstaKANG.com
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Tried this today.
Downloaded image, burn to card using balenaEtcher, put card in raspberry, plug keyboard, network, hdmi, power... And nothing. Waited for about 10 min. No signs of anything. Have I dinner anything wrong? I know the screen is 1680x1050 but it supports 1280x720. Unless I need to use one like that? Or do I need to try with a 1920x1080?
Please help. I want to try this androidTV on my old TV.
Downloaded image, burn to card using balenaEtcher, put card in raspberry, plug keyboard, network, hdmi, power... And nothing. Waited for about 10 min. No signs of anything. Have I dinner anything wrong? I know the screen is 1680x1050 but it supports 1280x720. Unless I need to use one like that? Or do I need to try with a 1920x1080?
Please help. I want to try this androidTV on my old TV.
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
There's a FAQ section about display issues. Graphics drivers used in this build rely on the EDID data your display reports.dvaitman wrote: ↑Tue Apr 07, 2020 11:48 amTried this today.
Downloaded image, burn to card using balenaEtcher, put card in raspberry, plug keyboard, network, hdmi, power... And nothing. Waited for about 10 min. No signs of anything. Have I dinner anything wrong? I know the screen is 1680x1050 but it supports 1280x720. Unless I need to use one like that? Or do I need to try with a 1920x1080?
Please help. I want to try this androidTV on my old TV.
This is not an Android TV build...
KonstaKANG.com
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Hello, what's the bottleneck currently?
My previous smartphone - 1/8gb MT6737M Mali-T720MP2 - has 4gb left and runs everything perfectly smooth despite worse specs than the Pi. It can hold 2-5 apps in RAM on average, can play a lot of games at 60fps without any stutter.
I can imagine VC4 driver is only a problem in video decode and games but problems don't end here. Is it emmc vs microsd? Unoptimized build?
https://source.android.com/devices/tech/perf/low-ram
I'd guess something is wrong with RAM management, as Raspbian is quite OK after disabling many background ram hogs with early-oom enabled, even though X11 is very tearing-prone and unoptimized compared to Surfaceflinger.
Thanks for the best build so far, though!
My previous smartphone - 1/8gb MT6737M Mali-T720MP2 - has 4gb left and runs everything perfectly smooth despite worse specs than the Pi. It can hold 2-5 apps in RAM on average, can play a lot of games at 60fps without any stutter.
I can imagine VC4 driver is only a problem in video decode and games but problems don't end here. Is it emmc vs microsd? Unoptimized build?
https://source.android.com/devices/tech/perf/low-ram
I'd guess something is wrong with RAM management, as Raspbian is quite OK after disabling many background ram hogs with early-oom enabled, even though X11 is very tearing-prone and unoptimized compared to Surfaceflinger.
Thanks for the best build so far, though!
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
You can't really compare this to any regular Android device. Raspberry Pi is not meant to run Android so it doesn't have any Android specific hardware drivers (GPU, hw video dec/enc, etc). Also running the OS from sdcard is much slower compared to eMMC/UFS used on modern mobile devices. 1GB of RAM on Raspberry Pi 3 is shared with the GPU. With current CMA allocations graphics can take up to 320mb of that so there's really not much left for the OS.Tichun wrote: ↑Fri May 01, 2020 8:39 amHello, what's the bottleneck currently?
My previous smartphone - 1/8gb MT6737M Mali-T720MP2 - has 4gb left and runs everything perfectly smooth despite worse specs than the Pi. It can hold 2-5 apps in RAM on average, can play a lot of games at 60fps without any stutter.
I can imagine VC4 driver is only a problem in video decode and games but problems don't end here. Is it emmc vs microsd? Unoptimized build?
https://source.android.com/devices/tech/perf/low-ram
I'd guess something is wrong with RAM management, as Raspbian is quite OK after disabling many background ram hogs with early-oom enabled, even though X11 is very tearing-prone and unoptimized compared to Surfaceflinger.
Thanks for the best build so far, though!
VC4 graphics works fairly well now. I could enable the last missing features after switching to Linux 4.19. Slow storage and lack of RAM are the biggest bottle necks. IMO overall this runs really well considering (if you don't install gapps which is another memory hog).
This build is already configured for low RAM, Android Go configuration, and it uses zRAM. You're of course welcome to create a separate swapfile or tune low memory killer parameters (https://github.com/LineageOS/android_sy ... -16.0/lmkd) if you find something that works better for you.
KonstaKANG.com
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
Hello,
Thank you so much for all of your work. This is really awesome.
I am trying to interface a rotary encoder to control the volume of the pi in Android through the GPIO pins. I've added some gpis-keys lines into config.txt and the pi is reading the input, but of course can't tell if the encoder is turning the volume up or down. Is there somewhere I can interpret the logic from the encoder or a way to install a driver? I did find a line in the kernel file mentioning a rotary encoder, but I don't know how to go about accessing that or quite what it is.
Apologies in advance if this is a redundant or confusing question. Any info you can point me in the direction of is greatly appreciated.
*EDIT: I missed your post a few above. I am going to attempt to preprocess the encoder signal with a microcontroller then send a signal from there to the GPIO Pins.
Thank you so much for all of your work. This is really awesome.
I am trying to interface a rotary encoder to control the volume of the pi in Android through the GPIO pins. I've added some gpis-keys lines into config.txt and the pi is reading the input, but of course can't tell if the encoder is turning the volume up or down. Is there somewhere I can interpret the logic from the encoder or a way to install a driver? I did find a line in the kernel file mentioning a rotary encoder, but I don't know how to go about accessing that or quite what it is.
Apologies in advance if this is a redundant or confusing question. Any info you can point me in the direction of is greatly appreciated.
*EDIT: I missed your post a few above. I am going to attempt to preprocess the encoder signal with a microcontroller then send a signal from there to the GPIO Pins.
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
I'm not familiar with how rotary encoders work. If you wanted to use gpio-keys driver with this, you'd need to use two separate GPIO pins - one for volume up and another one for vol down.n8orz wrote: ↑Thu May 07, 2020 10:48 pmHello,
Thank you so much for all of your work. This is really awesome.
I am trying to interface a rotary encoder to control the volume of the pi in Android through the GPIO pins. I've added some gpis-keys lines into config.txt and the pi is reading the input, but of course can't tell if the encoder is turning the volume up or down. Is there somewhere I can interpret the logic from the encoder or a way to install a driver? I did find a line in the kernel file mentioning a rotary encoder, but I don't know how to go about accessing that or quite what it is.
Apologies in advance if this is a redundant or confusing question. Any info you can point me in the direction of is greatly appreciated.
*EDIT: I missed your post a few above. I am going to attempt to preprocess the encoder signal with a microcontroller then send a signal from there to the GPIO Pins.
KonstaKANG.com
Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 3 B and B+
So I thought to help someone who still has screen rotation problems (touch screen 7 "official)
[*]after loading LineageOS 16.0 to SD you will have these files, in particular (Config.txt) , open it and edit it with brackets, notepad ++ and the like ... if you don't want problems.
[*]in the file (config.txt) under the wording "disable_overscan = 1" insert a space and lcd_rotate=2 ( as in the image)
the last image will clarify everything .. I hope I have been of help to someone ..
[*]Raspberry pi 4 model b (4gb)[*]
[*]after loading LineageOS 16.0 to SD you will have these files, in particular (Config.txt) , open it and edit it with brackets, notepad ++ and the like ... if you don't want problems.
[*]in the file (config.txt) under the wording "disable_overscan = 1" insert a space and lcd_rotate=2 ( as in the image)
the last image will clarify everything .. I hope I have been of help to someone ..

[*]Raspberry pi 4 model b (4gb)[*]