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

[DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Mon Jul 27, 2020 12:24 pm

Here’s my build of LineageOS 17.1 for Raspberry Pi 4 Model B, Pi 400, and Compute Module 4. It is unofficial and unsupported by the LineageOS team. It’s for advanced users only. Pi 4 model with at least 2GB of RAM is required to run this build.

Important! This image includes parts that are licensed under non-commercial license (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International). You may use this build freely in personal/educational/etc use. Commercial use is not allowed with this build!
Screenshot_20200727-114321_Settings.png
Screenshot_20200727-114321_Settings.png (73.4 KiB) Viewed 46035 times
https://konstakang.com/devices/rpi4/LineageOS17.1/

There is also Android TV version available.
Screenshot_20200815-143204_Settings.png
Screenshot_20200815-143204_Settings.png (72.25 KiB) Viewed 34695 times
https://konstakang.com/devices/rpi4/LineageOS17.1-ATV/

Sources:
Last edited by Konsta on Sat Mar 06, 2021 5:20 pm, edited 4 times in total.
KonstaKANG.com

Pokemonbulbasaur
Posts: 49
Joined: Fri May 29, 2020 9:17 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Mon Jul 27, 2020 10:02 pm

I installed GAPPS is there a way I can remove it
Its really unstable
lineage os 17.1 pi4 will reboot after booting
I need to get rid of GAPPS
can you help
It was stable before I installed gapps

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Tue Jul 28, 2020 7:32 am

Pokemonbulbasaur wrote:
Mon Jul 27, 2020 10:02 pm
I installed GAPPS is there a way I can remove it
Its really unstable
lineage os 17.1 pi4 will reboot after booting
I need to get rid of GAPPS
can you help
It was stable before I installed gapps
Please read the FAQ on how to install Google apps. Correct gapps package is linked in the instructions and it works just fine if you follow the steps.

Your options are either to rewrite the image to your sdcard or restore a system backup in TWRP (if you created one before). Steps to install gapps require wiping your device (i.e. factory reset) so you'll be starting from scratch anyway.
KonstaKANG.com

Pokemonbulbasaur
Posts: 49
Joined: Fri May 29, 2020 9:17 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Tue Jul 28, 2020 5:25 pm

I reflashed sd card and reinstalled Gapps
Its still unstable pi4 can crash in Gapps
launching the playstore it can crash
At least it doesn't crash when not running play store
I fixed it

snowballEarth
Posts: 92
Joined: Wed Feb 18, 2015 9:05 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Tue Jul 28, 2020 6:45 pm

Gpu acceleration has made a massive difference!

There's just a colour problem in some 3D games like Vice City, Minecraft and Asphalt.

The right colours are not showing up on textures. I'm seeing purples and brown tints.

But great progress anyways

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Wed Jul 29, 2020 9:55 am

Pokemonbulbasaur wrote:
Tue Jul 28, 2020 5:25 pm
I reflashed sd card and reinstalled Gapps
Its still unstable pi4 can crash in Gapps
launching the playstore it can crash
At least it doesn't crash when not running play store
I fixed it
General advice is to use proper sdcard (at least class 10) and power source (3A in case of Pi 4). Also make sure that you haven't made any system modifications that can cause instability (e.g. overclocking that some YouTubers seem to recommend - don't, if you don't know what you're doing).
snowballEarth wrote:
Tue Jul 28, 2020 6:45 pm
Gpu acceleration has made a massive difference!

There's just a colour problem in some 3D games like Vice City, Minecraft and Asphalt.

The right colours are not showing up on textures. I'm seeing purples and brown tints.

But great progress anyways
Thanks for the report. It seems wrong color format is being selected somewhere. Is there any small game/app that doesn't require Play Services where you can reproduce this issue? It would make testing things much quicker and easier.
KonstaKANG.com

snowballEarth
Posts: 92
Joined: Wed Feb 18, 2015 9:05 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Wed Jul 29, 2020 10:38 am

thanks for lookin into this.

I've just seen it happen in the included browser. Going to YouTube.com and when video is changed to 1080p and fullscreen. Purple tinge.

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Wed Jul 29, 2020 11:18 am

snowballEarth wrote:
Wed Jul 29, 2020 10:38 am
thanks for lookin into this.

I've just seen it happen in the included browser. Going to YouTube.com and when video is changed to 1080p and fullscreen. Purple tinge.
I think it's a separate issue with videos. Quite sure I already fixed this.

Can still reproduce the issue with games. Asphalt is way too big and requires Google Play Services so need to find something lighter for testing.
KonstaKANG.com

snowballEarth
Posts: 92
Joined: Wed Feb 18, 2015 9:05 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Wed Jul 29, 2020 3:45 pm

Found an open source game called Pixel Wheels which is downloadable through F-Droid or directly from dev's website.
Hopefully it demonstrates this discolouration.
On the title screen, the word "WHEELS" is blue when it's meant to be yellow/gold, as shown on the dev's website or on youtube.
Other backgrounds and sprite colours are changed too.
I'd upload a picture but file size is too large.

Weirdly, if you press F3 on the game title screen to bring up a menu of open apps, then the colours display correctly.
So it could be a problem only seen in fullscreen.

Some games work fine, some don't. Hope this helps

bruceby
Posts: 3
Joined: Wed Jul 29, 2020 8:53 am

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Wed Jul 29, 2020 4:18 pm

How can I get widevine to work on this build?

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Wed Jul 29, 2020 4:21 pm

snowballEarth wrote:
Wed Jul 29, 2020 3:45 pm
Found an open source game called Pixel Wheels which is downloadable through F-Droid or directly from dev's website.
Hopefully it demonstrates this discolouration.
On the title screen, the word "WHEELS" is blue when it's meant to be yellow/gold, as shown on the dev's website or on youtube.
Other backgrounds and sprite colours are changed too.
I'd upload a picture but file size is too large.

Weirdly, if you press F3 on the game title screen to bring up a menu of open apps, then the colours display correctly.
So it could be a problem only seen in fullscreen.

Some games work fine, some don't. Hope this helps
Thanks, having an easy way to reproduce this already helps.
KonstaKANG.com

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Thu Jul 30, 2020 10:59 am

bruceby wrote:
Wed Jul 29, 2020 4:18 pm
How can I get widevine to work on this build?
Thanks for the report. It's broken with the current image but will be fixed if/when there's another release.
snowballEarth wrote:
Wed Jul 29, 2020 3:45 pm
Found an open source game called Pixel Wheels which is downloadable through F-Droid or directly from dev's website.
Hopefully it demonstrates this discolouration.
On the title screen, the word "WHEELS" is blue when it's meant to be yellow/gold, as shown on the dev's website or on youtube.
Other backgrounds and sprite colours are changed too.
I'd upload a picture but file size is too large.

Weirdly, if you press F3 on the game title screen to bring up a menu of open apps, then the colours display correctly.
So it could be a problem only seen in fullscreen.

Some games work fine, some don't. Hope this helps
You can workaround this issue by disabling hw overlays. Settings -> Developer options -> Disable HW overlays or add 'hwc.drm.use_overlay_planes=0' to /system/build.prop for more permanent solution. This will of course decrease performance slightly.
KonstaKANG.com

bruceby
Posts: 3
Joined: Wed Jul 29, 2020 8:53 am

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Thu Jul 30, 2020 3:33 pm

Thanks for the report. It's broken with the current image but will be fixed if/when there's another release.
Thanks, this is great build so far...

snowballEarth
Posts: 92
Joined: Wed Feb 18, 2015 9:05 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Thu Jul 30, 2020 5:16 pm


You can workaround this issue by disabling hw overlays. Settings -> Developer options -> Disable HW overlays or add 'hwc.drm.use_overlay_planes=0' to /system/build.prop for more permanent solution. This will of course decrease performance slightly.
adding that line to build.prop doesn't make the change permanent for me
i have to turn Disable HW overlays back on after rebooting

i have edited build.prop using 'BuildProp Editor' app with root access.
the line 'hwc.drm.use_overlay_planes=0' is saved to the file, but doesn't seem to have any effect

LionWorld
Posts: 4
Joined: Tue Jul 16, 2019 3:04 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Thu Jul 30, 2020 7:59 pm

I'm also having similar issues with the colours (reds turning blue). It only seems to effect some 1080p fullscreen videos for me. No issue for 720p. My monitor is only 720p though so I think that might have something to do with it (I would just watch the streams in 720p if I could but the only option available is 1080p for some of them).


I tried disabling HW overlays but no luck. Will try the pi with a 1080p monitor at some point tomorrow to see if there's any difference.

Edit: Tried with a 1080p screen and the issue is still there

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Fri Jul 31, 2020 8:04 am

snowballEarth wrote:
Thu Jul 30, 2020 5:16 pm

You can workaround this issue by disabling hw overlays. Settings -> Developer options -> Disable HW overlays or add 'hwc.drm.use_overlay_planes=0' to /system/build.prop for more permanent solution. This will of course decrease performance slightly.
adding that line to build.prop doesn't make the change permanent for me
i have to turn Disable HW overlays back on after rebooting

i have edited build.prop using 'BuildProp Editor' app with root access.
the line 'hwc.drm.use_overlay_planes=0' is saved to the file, but doesn't seem to have any effect
You need to mount the partition writable to make any changes.

Code: Select all

su
mount -o rw,remount /
echo hwc.drm.use_overlay_planes=0 >> /system/build.prop
LionWorld wrote:
Thu Jul 30, 2020 7:59 pm
I'm also having similar issues with the colours (reds turning blue). It only seems to effect some 1080p fullscreen videos for me. No issue for 720p. My monitor is only 720p though so I think that might have something to do with it (I would just watch the streams in 720p if I could but the only option available is 1080p for some of them).


I tried disabling HW overlays but no luck. Will try the pi with a 1080p monitor at some point tomorrow to see if there's any difference.

Edit: Tried with a 1080p screen and the issue is still there
Like already discussed above, this is a separate issue. This should be fixed if/when there's another release.
KonstaKANG.com

snowballEarth
Posts: 92
Joined: Wed Feb 18, 2015 9:05 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Fri Jul 31, 2020 1:19 pm

Konsta wrote:
Fri Jul 31, 2020 8:04 am
snowballEarth wrote:
Thu Jul 30, 2020 5:16 pm

You can workaround this issue by disabling hw overlays. Settings -> Developer options -> Disable HW overlays or add 'hwc.drm.use_overlay_planes=0' to /system/build.prop for more permanent solution. This will of course decrease performance slightly.
adding that line to build.prop doesn't make the change permanent for me
i have to turn Disable HW overlays back on after rebooting

i have edited build.prop using 'BuildProp Editor' app with root access.
the line 'hwc.drm.use_overlay_planes=0' is saved to the file, but doesn't seem to have any effect
You need to mount the partition writable to make any changes.

Code: Select all

su
mount -o rw,remount /
echo hwc.drm.use_overlay_planes=0 >> /system/build.prop
I followed these steps but it didn't work:

enabled local terminal in dev options
gave apps root access
opened terminal app
ran each line of code above
then held down f5 to reboot
disable hw overlays option is still off by default

I am new to android / lineage. Did I miss something?
Thanks in advance

WoScha
Posts: 34
Joined: Sun Jul 26, 2020 5:43 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Fri Jul 31, 2020 4:31 pm

Hello Konsta,

thank you for your new Android version.

Do you now need a new setting in the config.txt for the Waveshare 10.1 touchscreen?
So far I have had the following:

Code: Select all

# Display WS
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
hdmi_drive=2
display_rotate=3
With these settings I only get a black screen!

Which version of EEPROM is version 17.1 running?
Have problems booting with the USB stick (common boot loop).
Use this version:
https://github.com/raspberrypi/rpi-eepr ... e---stable

Best regards
WoScha

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Sat Aug 01, 2020 7:51 am

snowballEarth wrote:
Fri Jul 31, 2020 1:19 pm
I followed these steps but it didn't work:

enabled local terminal in dev options
gave apps root access
opened terminal app
ran each line of code above
then held down f5 to reboot
disable hw overlays option is still off by default

I am new to android / lineage. Did I miss something?
Thanks in advance
These are two different ways to do the same thing on different levels of the system (property does it on hwcomposer HAL and settings option on Android graphics framework). The system property has no effect on the status of the settings toggle which basically becomes no-op.

It still works to workaround the issue.
WoScha wrote:
Fri Jul 31, 2020 4:31 pm
Hello Konsta,

thank you for your new Android version.

Do you now need a new setting in the config.txt for the Waveshare 10.1 touchscreen?
So far I have had the following:

Code: Select all

# Display WS
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0 0
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
hdmi_drive=2
display_rotate=3
With these settings I only get a black screen!

Which version of EEPROM is version 17.1 running?
Have problems booting with the USB stick (common boot loop).
Use this version:
https://github.com/raspberrypi/rpi-eepr ... e---stable

Best regards
WoScha
You would need to change value of debug.drm.mode.force property in /system/build.prop to resolution of your display (1024x600?). I'll move this back to /boot/resolution.txt if/when there's another release to make it easier to edit.

EEPROM is not shipped with the OS. It is installed separately (https://www.raspberrypi.org/documentati ... teeprom.md).

There's currently no support for booting from USB devices. Android 10 uses system as root by default which makes this a bit trickier. There's two fstabs that you would need edit to change mount points - one in the ramdisk like previously and one in /vendor/etc/fstab.rpi4. To make this easy enough for average user, I would need to maintain a separate image for USB boot and I really don't want to.
KonstaKANG.com

WoScha
Posts: 34
Joined: Sun Jul 26, 2020 5:43 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Sat Aug 01, 2020 11:06 am

Hello Konsta,

thank you for your feedback.

Yes, please put the settings for the screen back into the boot area.
It is not pleasant to sit in front of a black screen and not to know which screw to turn on to get back to a working TFT.

EEProm und USB-Boot:

The last "stable" version of the eeprom works excellently with many USB devices, so I installed them on my Raspis.

With your last version of LineageOS (V16), thanks to the second Ramdisk, it was easy to boot from a USB stick and take advantage of its speed advantages over the SD card.
I miss this possibility very much with the new version.

I have already seen the second fstab in the directory /vendor/etc/fstab.rpi4 in the last version.
But I didn't want to change it, as I didn't know anything about the impact on the Android essay.

If there was the possibility of a second Ramdisk version again, that would be a great thing.

Best greetings

WoScha

Edit:
Can the fstab be adjusted in /vendor/etc/ possibly via a script during booting? (Ramdisk USB version)

WoScha
Posts: 34
Joined: Sun Jul 26, 2020 5:43 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Sat Aug 01, 2020 6:37 pm

Booting via USB now works perfectly.
Go super fast!

Which unfortunately does not work, is the Waveshare 10.1 touchscreen.
The entry "debug.drm.mode.force=1024x600" has been performed.
Unfortunately to no avail: The touchscreen transitions into a red screen when it transitions to lineageOS (out of range?)
What do I have to do and where do I have to change the configuration?

Thanks for your help!

scooly
Posts: 1
Joined: Sun Aug 02, 2020 12:56 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Sun Aug 02, 2020 1:01 pm

Konsta wrote:
Tue Jul 28, 2020 7:32 am
Pokemonbulbasaur wrote:
Mon Jul 27, 2020 10:02 pm
I installed GAPPS is there a way I can remove it
Its really unstable
lineage os 17.1 pi4 will reboot after booting
I need to get rid of GAPPS
can you help
It was stable before I installed gapps
Please read the FAQ on how to install Google apps. Correct gapps package is linked in the instructions and it works just fine if you follow the steps.

Your options are either to rewrite the image to your sdcard or restore a system backup in TWRP (if you created one before). Steps to install gapps require wiping your device (i.e. factory reset) so you'll be starting from scratch anyway.
Hello from Germany.
Is there any other way to install the gapps? The bootloader doesn't work for me.
Whenever I want to go into the boot loader I only get the rainbow colors.
Both the same with Lineage 17 or 16

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Sun Aug 02, 2020 2:34 pm

WoScha wrote:
Sat Aug 01, 2020 6:37 pm
Booting via USB now works perfectly.
Go super fast!

Which unfortunately does not work, is the Waveshare 10.1 touchscreen.
The entry "debug.drm.mode.force=1024x600" has been performed.
Unfortunately to no avail: The touchscreen transitions into a red screen when it transitions to lineageOS (out of range?)
What do I have to do and where do I have to change the configuration?

Thanks for your help!
Good to hear you got USB boot working.

Any HDMI display should basically work if it reports resolutions it support via EDID. I don't have any Waveshare displays I could test with.
scooly wrote:
Sun Aug 02, 2020 1:01 pm
Hello from Germany.
Is there any other way to install the gapps? The bootloader doesn't work for me.
Whenever I want to go into the boot loader I only get the rainbow colors.
Both the same with Lineage 17 or 16
TWRP (and if you switch to SwiftShader) still use 720p resolution so your display should support it as well. You can edit lines in /boot/config.txt under 'Display' section to switch to e.g. 1080p for TWRP as well (see https://www.raspberrypi.org/documentati ... t/video.md for reference). 720p is still the max resolution for SwiftShader. Graphics drivers that are used by default rely on EDID information your display send so config.txt options don't have any effect on that (debug.drm.mode.force property is used to set resolution). They do still affect TWRP and SwiftShader.

Also make sure that you've connected your display to the first HDMI port.
KonstaKANG.com

snowballEarth
Posts: 92
Joined: Wed Feb 18, 2015 9:05 pm

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Sun Aug 02, 2020 2:41 pm

Thanks for the build.prop workaround. It corrects the colours in the games I've played so far.

Minecraft behaves a bit differently. When I use mouse and keyboard it's correct, but when I use a usb xbox one controller, it shows incorrect colours. Then going back to mouse fixes it again. If I toggle disable hw overlay it is fixed permanently no matter the input. Don't know if that helps anyone or not.

Also, is there a way of dropping overall resolution of lineage o/s so I can get more performance? Some android games don't have this option within them.
Minecraft seems to render at the same resolution as my t.v. 1920 x 1080 and that's a lot even for an overclocked pi4.

Always appreciate your efforts! Great build!

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

Re: [DEV] LineageOS 17.1 (Android 10) for Raspberry Pi 4 B

Sun Aug 02, 2020 3:41 pm

snowballEarth wrote:
Sun Aug 02, 2020 2:41 pm
Thanks for the build.prop workaround. It corrects the colours in the games I've played so far.

Minecraft behaves a bit differently. When I use mouse and keyboard it's correct, but when I use a usb xbox one controller, it shows incorrect colours. Then going back to mouse fixes it again. If I toggle disable hw overlay it is fixed permanently no matter the input. Don't know if that helps anyone or not.

Also, is there a way of dropping overall resolution of lineage o/s so I can get more performance? Some android games don't have this option within them.
Minecraft seems to render at the same resolution as my t.v. 1920 x 1080 and that's a lot even for an overclocked pi4.

Always appreciate your efforts! Great build!
Well, that's strange behavior. Can't come up with any reason for that.

You can drop the resolution by modifying debug.drm.mode.force property in /system/build.prop. You also need to change display density as well to adapt to the smaller resolution - Settings -> Display -> Display size (or change ro.sf.lcd_density to 160 in /vendor/build.prop).
KonstaKANG.com

Return to “Android”