Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

[DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Thu Aug 16, 2018 7:47 pm

Here’s my build of LineageOS 15.1 for Raspberry Pi 3 Model B and Model B+ (bluetooth does not currently work on the new plus model). It is unofficial and unsupported by the LineageOS team. It’s for advanced users only. This build currently uses Google’s SwiftShader software renderer so display performance is probably not what you’d expect. This build is not meant as a daily driver and it’s certainly not suitable for media device use.
Screenshot_Settings_20180630-144620.png
Screenshot_Settings_20180630-144620.png (45.52 KiB) Viewed 40398 times
https://konstakang.com/devices/rpi3/LineageOS15.1/

Sources:
KonstaKANG.com

Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Sat Aug 18, 2018 10:07 pm

Pie on Pi! :D LineageOS 16 booted on Raspberry Pi3.

https://twitter.com/konstatuomio/status ... 8983569408
Last edited by Konsta on Wed Sep 05, 2018 7:24 pm, edited 1 time in total.
KonstaKANG.com

globiboulga666
Posts: 24
Joined: Sun Jun 17, 2018 6:38 pm

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Wed Sep 05, 2018 10:33 am

Hi, very cool work !

Had you used an original Android Kernel 4.14, or an original Vanilla Kernel 4.14, or current Raspberry Pi modified Kernel 4.14 ?
Did you have to write HAL/HIDL layers for having Android to work ?

According to all the things written in there : https://source.android.com/devices/architecture/
It seems that there is a huge work to do if not already delivered by founders, and updated with new and new versions of Android.
But it also seems that Android 9 requirements about drivers will be able to permit Android System updates without reworking the others layers.

But I'm not sure I understand everything, and I'm not sure if all of this layers are made available for the RPi, so I guess there is a chance you didn't have to do all this ?

Thank you again !

Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Wed Sep 05, 2018 7:23 pm

globiboulga666 wrote:
Wed Sep 05, 2018 10:33 am
Hi, very cool work !

Had you used an original Android Kernel 4.14, or an original Vanilla Kernel 4.14, or current Raspberry Pi modified Kernel 4.14 ?
Did you have to write HAL/HIDL layers for having Android to work ?

According to all the things written in there : https://source.android.com/devices/architecture/
It seems that there is a huge work to do if not already delivered by founders, and updated with new and new versions of Android.
But it also seems that Android 9 requirements about drivers will be able to permit Android System updates without reworking the others layers.

But I'm not sure I understand everything, and I'm not sure if all of this layers are made available for the RPi, so I guess there is a chance you didn't have to do all this ?

Thank you again !
My kernel is a combination of official Raspberry kernel (https://github.com/raspberrypi/linux/tree/rpi-4.14.y) and Google's Android kernel (https://android.googlesource.com/kernel ... oid-4.14-p) with latest Android security patches which I've merged together and configured for this device and Android.

There's bunch of open source HALs (audio, gps, and light). Display HALs are currently from Android Things. Using whatever works is common in the Android custom ROM scene. Switching to mainline graphics and VC4 driver would be great if someone had the required skills and experience (not sure I do). HIDL HALs have been used since Oreo but many things can be worked around to support older HALs.

I'm not an OEM and I'm not shipping official Android so passing Google's CTS (Compatibility Test Suite) or certification doesn't really concern me. This is initially based on what Google has made available through AOSP (Android Open Source Project) with great improvements by the LineageOS team.
Last edited by Konsta on Thu Sep 06, 2018 7:10 am, edited 1 time in total.
KonstaKANG.com

globiboulga666
Posts: 24
Joined: Sun Jun 17, 2018 6:38 pm

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Wed Sep 05, 2018 8:58 pm

Cool, it sounds pretty clear. Thank you for those explanations, as I'm trying to understand a maximum of things about all of this, and because I would have no idea of "how to transform Raspberry Pi Kernel 4.14 into an RPi Android Kernel 4.14 plus all of the things needed to have Android working", these details are giving me some help in my quest :)

Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Thu Sep 06, 2018 3:19 pm

globiboulga666 wrote:
Wed Sep 05, 2018 8:58 pm
Cool, it sounds pretty clear. Thank you for those explanations, as I'm trying to understand a maximum of things about all of this, and because I would have no idea of "how to transform Raspberry Pi Kernel 4.14 into an RPi Android Kernel 4.14 plus all of the things needed to have Android working", these details are giving me some help in my quest :)
Good thing it's open source (https://github.com/lineage-rpi) so that makes your quest a lot easier. :)
KonstaKANG.com

Samgivesls
Posts: 4
Joined: Tue Oct 23, 2018 3:53 am

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Wed Oct 24, 2018 1:45 am

when everything is perfectly plugged in to my pi i just get a black screen when turning on the pi, is this an issue with my micro sd card or os? i have been using the monitor for multiple tests so i do not think that is the issue. power is good and everything. This has to be a boot issue but i used Win32DiskImager and Etcher and everything and it has not worked out! please help!

Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Wed Oct 24, 2018 6:01 am

Samgivesls wrote:
Wed Oct 24, 2018 1:45 am
when everything is perfectly plugged in to my pi i just get a black screen when turning on the pi, is this an issue with my micro sd card or os? i have been using the monitor for multiple tests so i do not think that is the issue. power is good and everything. This has to be a boot issue but i used Win32DiskImager and Etcher and everything and it has not worked out! please help!
More likely an issue with your display. You need to use a display that supports 720p resolution (it's the maximum resolution this build supports). Maybe try with a different display or modifying config.txt (https://www.raspberrypi.org/documentati ... t/video.md) for your current one?
KonstaKANG.com

Samgivesls
Posts: 4
Joined: Tue Oct 23, 2018 3:53 am

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Thu Oct 25, 2018 12:30 am

Konsta wrote:
Wed Oct 24, 2018 6:01 am
Samgivesls wrote:
Wed Oct 24, 2018 1:45 am
when everything is perfectly plugged in to my pi i just get a black screen when turning on the pi, is this an issue with my micro sd card or os? i have been using the monitor for multiple tests so i do not think that is the issue. power is good and everything. This has to be a boot issue but i used Win32DiskImager and Etcher and everything and it has not worked out! please help!
More likely an issue with your display. You need to use a display that supports 720p resolution (it's the maximum resolution this build supports). Maybe try with a different display or modifying config.txt (https://www.raspberrypi.org/documentati ... t/video.md) for your current one?
Now that i have tried a new display, it boots but, I have a certain variation of the "stuck rainbow screen" where it gets past the rainbow box but now there are rainbow pixels on the edge of the screen while the rest of the screen is black. :roll: I have tried messing with my config and everything, nothing works for me!

Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Thu Oct 25, 2018 11:58 am

Samgivesls wrote:
Thu Oct 25, 2018 12:30 am
Now that i have tried a new display, it boots but, I have a certain variation of the "stuck rainbow screen" where it gets past the rainbow box but now there are rainbow pixels on the edge of the screen while the rest of the screen is black. :roll: I have tried messing with my config and everything, nothing works for me!
Sorry, can't reproduce such issue so difficult to say. It's also difficult to get logs from the boot unless you have a serial console adapter. You could try LineageOS 14.1 build as well and see if you have better luck with that.
KonstaKANG.com

shripal17
Posts: 2
Joined: Sat Dec 15, 2018 10:59 am

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Sat Dec 15, 2018 11:04 am

Hi, can we control the gpio pins through shell commands? Does your kernel support it? If yes, would you mind writing a few sample commands for usage?

Thanks for your android builds, they're great!

Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Sat Dec 15, 2018 5:21 pm

shripal17 wrote:
Sat Dec 15, 2018 11:04 am
Hi, can we control the gpio pins through shell commands? Does your kernel support it? If yes, would you mind writing a few sample commands for usage?

Thanks for your android builds, they're great!
Yes, kernel supports it and you can control GPIO pins in shell. I haven't played around with this much, though. See e.g. viewtopic.php?t=193096

Some sample commands on Android:

Code: Select all

su
echo 18 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value

cat /sys/class/gpio/gpio18/direction 
cat /sys/class/gpio/gpio18/value

echo 18 > /sys/class/gpio/unexport
KonstaKANG.com

shripal17
Posts: 2
Joined: Sat Dec 15, 2018 10:59 am

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Sun Dec 16, 2018 5:22 pm

Konsta wrote:
Sat Dec 15, 2018 5:21 pm
shripal17 wrote:
Sat Dec 15, 2018 11:04 am
Hi, can we control the gpio pins through shell commands? Does your kernel support it? If yes, would you mind writing a few sample commands for usage?

Thanks for your android builds, they're great!
Yes, kernel supports it and you can control GPIO pins in shell. I haven't played around with this much, though. See e.g. viewtopic.php?t=193096

Some sample commands on Android:

Code: Select all

su
echo 18 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value

cat /sys/class/gpio/gpio18/direction 
cat /sys/class/gpio/gpio18/value

echo 18 > /sys/class/gpio/unexport
Alright Thanks a lot great work :)
Your and previous contributions to aosp on RasPi open up a lot of new possibilities for RasPi!

sundar247
Posts: 1
Joined: Mon Aug 26, 2019 9:39 am

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Mon Aug 26, 2019 9:41 am

How do I enter into the recovery mode to install Gapps?

Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Mon Aug 26, 2019 3:13 pm

sundar247 wrote:
Mon Aug 26, 2019 9:41 am
How do I enter into the recovery mode to install Gapps?
Please read the FAQ on my site because there's a section that answers this question.

This build has been discontinued for ages and you should use my LineageOS 16.0 build (https://www.raspberrypi.org/forums/view ... 3&t=243832) instead anyway.
KonstaKANG.com

vishal.shukla
Posts: 1
Joined: Fri Aug 30, 2019 11:25 am

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Fri Aug 30, 2019 11:29 am

hi i am trying to install andriod pie on raspberry 4 my question is does raspberry 4 support the andriod pie if yes then which version

Konsta
Posts: 68
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland
Contact: Website Twitter

Re: [DEV] LineageOS 15.1 (Android 8.1.0) for Raspberry Pi 3 B and B+

Fri Aug 30, 2019 1:15 pm

vishal.shukla wrote:
Fri Aug 30, 2019 11:29 am
hi i am trying to install andriod pie on raspberry 4 my question is does raspberry 4 support the andriod pie if yes then which version
Why post on an Android Oreo thread then?

There's no Android images publicly available for the Pi 4.
KonstaKANG.com

Return to “Android”