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

Search This thread

KonstaT

Senior Member
Jan 20, 2016
413
279
KonstaKANG.com
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


https://konstakang.com/devices/rpi4/LineageOS17.1/

There is also Android TV version available.
Screenshot_20200815-143204_Settings.png


https://konstakang.com/devices/rpi4/LineageOS17.1-ATV/

Working:
  • Audio (HDMI, 3.5mm jack, USB microphones, bluetooth speakers/headsets, etc)
  • Audio DAC (using GPIO DACs e.g. Hifiberry DAC+)
  • Bluetooth
  • Camera (using official Pi camera modules & UVC USB webcams)
  • GPIO
  • GPS (using external USB modules e.g. U-Blox 7)
  • Ethernet
  • Hardware accelerated graphics (V3D)
  • HDMI display
  • I2C
  • IR remotes (using external GPIO IR modules e.g. TSOP4838)
  • RTC (using external GPIO I2C modules e.g. DS3231)
  • Sensors (using external GPIO I2C modules e.g. MPU6050, LSM6DS3 & LSM303DLHC accelerometer/gyroscope/magnetometer)
  • Serial console (using external GPIO serial console adapters e.g. PL2303)
  • SPI
  • Touchscreen/multi-touch (USB touchscreens, Waveshare SPI touchscreens, official 7" touchscreen using SwiftShader software renderer)
  • USB (mouse, keyboard, storage, etc)
  • USB-C (ADB, MTP, PTP, USB-tethering)
  • Wifi
  • Wifi tethering

Not working:
  • Hardware video decoding & encoding (software decoding & encoding works)

Issues:
  • Stock camera app is not working - many third party camera apps seem to work
  • SELinux is in permissive mode
  • and more…

Sources:

Thanks:
  • Peter Yoon and everyone who has contributed to android-rpi
  • brobwind for bluetooth fixes
  • Roman Stratiienko and GloDroid project for graphics fixes
  • Eric Anholt for V3D graphics driver
  • Maxime Ripard for Pi 4 KMS driver
  • Google for Android Things platform
  • Android-x86 project
  • LineageOS team & everyone who has contributed to LineageOS 17.1
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
413
279
KonstaKANG.com
Last edited:

KonstaT

Senior Member
Jan 20, 2016
413
279
KonstaKANG.com
Merged commits not mentioned in the changelog.

22.1. 2021 changelog:
  • add support for sensors (MPU6050, LSM6DS3 & LSM303DLHC accelerometer/gyroscope/magnetometer on I2C)
  • add support for more serial GPS devices
  • add support for USB-C (ADB, MTP, PTP, USB-tethering)
  • enable bluetooth tethering
  • add settings option for mouse back button feature
  • update to TWRP 3.5.0_9.0-KonstaKANG
  • update to Mesa 20.3.3
  • update to Linux 5.4.91 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
  • Android security patch level: 5 January 2021 (merged)

20.11. changelog:
  • device settings improvements
    • fix audio device option
    • add CPU overclock option (make sure to take care of cooling if you decide to overclock!)
    • add SSH option and improve support for built-in SSH server (see FAQ)
  • fix wifi & bluetooth on Pi 400, should be fully functional now (Compute Module 4 support still untested)
  • support using HDMI:1 (fix HDMI audio in Android & fix display in TWRP)
  • fix touch input on Fondar USB touchscreen (thanks to maxwen)
  • update to Linux 5.4.77 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)

8.11. changelog:
  • initial device settings for various Raspberry Pi specific options (Settings -> System -> Advanced settings)
    • audio device option (HDMI/3.5mm jack/audio DAC)
    • display options (graphics drivers, display resolution, display rotation)
    • options for IR remote, hardware keys, and RTC
  • fix wrong color format used in some games (thanks to Roman Stratiienko)
  • simplify booting to/out of TWRP recovery (see FAQ)
  • improve support for booting from USB devices (see FAQ, thanks to maxwen)
  • improve support for RTC & IR remotes (see FAQ)
  • add more options for rotating touch input on Waveshare SPI (ADS7846) touchscreens (thanks to mikenon)
  • allow switching display off with power button
  • map right mouse button to back key
  • initial support for Pi Compute Module 4 & Pi 400 (untested)
  • update to TWRP 3.4.0-1
  • update to Mesa 20.2.2 and latest upstream version of drm_hwcomposer
  • update to Linux 5.4.75 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
  • Android security patch level: 5 November 2020 (merged)

13.8. changelog:
  • bring back forced landscape orientation for portrait apps
  • bring back support for running scripts from /system/etc/init.d/
  • read resolution from /boot/resolution.txt
  • fix issue with color format in fullscreen 1080p videos
  • fix issue with drm video playback
  • initial support for SSH server
  • update Mesa to 20.1.5
  • update to Linux 5.4.58 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
  • Android security patch level: 5 August 2020 (merged)

27.7. changelog:
  • initial LineageOS 17.1 build
  • hardware accelerated graphics
    • V3D using Mesa 20.1.4 with drm_hwcomposer & gbm gralloc
    • 1920x1080 resolution
  • update TWRP to 3.4.0-0
  • update to Linux 5.4.53 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
  • Android security patch level: 5 July 2020 (merged)

Previous builds:
 
Last edited:

depace83

Member
Nov 28, 2014
8
1
Thank you for your hard work but i'm having a problem my tv hdmi is constantly connecting and disconnecting over and over again while trying this build. I'm using micro usb to hdmi adapter for viewing.
 

rs13885

New member
Aug 3, 2020
2
0
Mic Volume low using Logitech C525

This is working great! The only issue I found is that when using a Logitech C525 webcam, the built-in mic level is really low. Do you know if there is any option to increase it? Thanks!
 

dgershko

Senior Member
Nov 8, 2013
96
12
Hello, I installed the newest build, ran the recovery booting script and rebooted. It's now stuck at the rainbow like screen that's shown during boot and I don't see a way to fix this except reinstalling from scratch. Is there a quick fix for this?
 

kakekeke

Senior Member
Feb 9, 2008
76
6
Espoo
Any possibility to get the TV out working? I'm building accessory box that runs Carplay for my car, and i can only weed analog signal to the OEM screen. On previous lineageOS the TV-out was functional, but i was unable to get the carplay usb-dongle to work. Now the system feels super snappy, the USB dongle works... But the TV-out wount work...
 
  • Like
Reactions: GeauxGeauxGadget504

rs13885

New member
Aug 3, 2020
2
0
Hello, I installed the newest build, ran the recovery booting script and rebooted. It's now stuck at the rainbow like screen that's shown during boot and I don't see a way to fix this except reinstalling from scratch. Is there a quick fix for this?
I had this same issue but fixed it by using a different HDMI port (the one closest to the USB-C port). Hope this helps!
 

ScorpionKing24

New member
Nov 10, 2019
1
0
Couldn't boot in twrp recovery

When I try to go into recovery it stuck at boot screen ! I am using raspberry pi 4, so I use "rpi4-recovery.sh" then try to reboot and then it stuck at boot screen ( color full screen which come while we boot raspbian or any other os for raspberry pi).
 

Articunos

Senior Member
Nov 26, 2016
66
11
I'm unable to connect to any WiFi network. I'm using this on the 4GB model, and it always shows me connecting but never connects. Can anyone help me?
 

KonstaT

Senior Member
Jan 20, 2016
413
279
KonstaKANG.com
Any possibility to get the TV out working? I'm building accessory box that runs Carplay for my car, and i can only weed analog signal to the OEM screen. On previous lineageOS the TV-out was functional, but i was unable to get the carplay usb-dongle to work. Now the system feels super snappy, the USB dongle works... But the TV-out wount work...

Please read the FAQ on how to switch to SwiftShader that is used in LineageOS 16.0 build by default. I doubt there will be support for analog video with hw accelerated graphics drivers.

When I try to go into recovery it stuck at boot screen ! I am using raspberry pi 4, so I use "rpi4-recovery.sh" then try to reboot and then it stuck at boot screen ( color full screen which come while we boot raspbian or any other os for raspberry pi).

Please read the two posts above yours. If that doesn't work see http://disq.us/p/2avnosx

Any specific reason for this version does not have bootable usb option? i see lineage os 16 version have way to boot from usb

Android 10 uses system as root as default which complicates USB boot because there's two fstabs that you need to edit. I'm not sure if I can come up with some clever solution that will be easy enough for average user. Meanwhile you can do this to boot from USB ( http://disq.us/p/2ayc760).
 
Last edited:

kakekeke

Senior Member
Feb 9, 2008
76
6
Espoo
Please read the FAQ on how to switch to SwiftShader that is used in LineageOS 16.0 build by default. I doubt there will be support for analog video with hw accelerated graphics drivers.

Is there any way i can enable this in headless setup without serial connection? Any way to create script or something similar to sdcard that will make it work?
 

KonstaT

Senior Member
Jan 20, 2016
413
279
KonstaKANG.com
Is there any way i can enable this in headless setup without serial connection? Any way to create script or something similar to sdcard that will make it work?

ADB or built in terminal. You still need to reach Android UI to enable root access that is needed to make these changes to system. You can also ready the script and make the same changes manually after mounting the sdcard on your (Linux) computer.
 

KonstaT

Senior Member
Jan 20, 2016
413
279
KonstaKANG.com
New build.

https://konstakang.com/devices/rpi4/LineageOS17.1/

-bring back forced landscape orientation for portrait apps
-bring back support for running scripts from /system/etc/init.d/
-read resolution from /boot/resolution.txt
-fix issue with color format in fullscreen 1080p videos
-fix issue with drm video playback
-initial support for SSH server
-update Mesa to 20.1.5
-update to Linux 5.4.58 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
-Android security patch level: 5 August 2020 (merged)
 

major payne

Senior Member
Feb 27, 2012
121
5
How well would this work with a 13" -15" screen? I'm looking to make a home made tablet due to the fact as I get old seeing is not as easy as it used to be in bed.
 

Top Liked Posts

  • 1
    Yesterday I tried again and left the RPi on after the screen got black (at the point I mentioned before. After som 10 minutes suddenly the ATV startup screen came up and I could do the rest, including GAPS install. STrange but perhaps this is related to the memory hunger (...?). Thanks for your kind help. I now have it working an it works very well. Super work you have done.
  • 1
    Yesterday I tried again and left the RPi on after the screen got black (at the point I mentioned before. After som 10 minutes suddenly the ATV startup screen came up and I could do the rest, including GAPS install. STrange but perhaps this is related to the memory hunger (...?). Thanks for your kind help. I now have it working an it works very well. Super work you have done.
  • 21
    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


    https://konstakang.com/devices/rpi4/LineageOS17.1/

    There is also Android TV version available.
    Screenshot_20200815-143204_Settings.png


    https://konstakang.com/devices/rpi4/LineageOS17.1-ATV/

    Working:
    • Audio (HDMI, 3.5mm jack, USB microphones, bluetooth speakers/headsets, etc)
    • Audio DAC (using GPIO DACs e.g. Hifiberry DAC+)
    • Bluetooth
    • Camera (using official Pi camera modules & UVC USB webcams)
    • GPIO
    • GPS (using external USB modules e.g. U-Blox 7)
    • Ethernet
    • Hardware accelerated graphics (V3D)
    • HDMI display
    • I2C
    • IR remotes (using external GPIO IR modules e.g. TSOP4838)
    • RTC (using external GPIO I2C modules e.g. DS3231)
    • Sensors (using external GPIO I2C modules e.g. MPU6050, LSM6DS3 & LSM303DLHC accelerometer/gyroscope/magnetometer)
    • Serial console (using external GPIO serial console adapters e.g. PL2303)
    • SPI
    • Touchscreen/multi-touch (USB touchscreens, Waveshare SPI touchscreens, official 7" touchscreen using SwiftShader software renderer)
    • USB (mouse, keyboard, storage, etc)
    • USB-C (ADB, MTP, PTP, USB-tethering)
    • Wifi
    • Wifi tethering

    Not working:
    • Hardware video decoding & encoding (software decoding & encoding works)

    Issues:
    • Stock camera app is not working - many third party camera apps seem to work
    • SELinux is in permissive mode
    • and more…

    Sources:

    Thanks:
    • Peter Yoon and everyone who has contributed to android-rpi
    • brobwind for bluetooth fixes
    • Roman Stratiienko and GloDroid project for graphics fixes
    • Eric Anholt for V3D graphics driver
    • Maxime Ripard for Pi 4 KMS driver
    • Google for Android Things platform
    • Android-x86 project
    • LineageOS team & everyone who has contributed to LineageOS 17.1
    11
    How to install:
    1. Follow the official Raspberry Pi instructions for writing the image to the SD card (Linux, Mac, Windows).

    FAQ:

    FAQ is getting quite long and difficult to maintain in several different places. You can find the always up-to-date FAQs here:
    https://konstakang.com/devices/rpi4/LineageOS17.1/
    https://konstakang.com/devices/rpi4/LineageOS17.1-ATV/
    11
    Merged commits not mentioned in the changelog.

    22.1. 2021 changelog:
    • add support for sensors (MPU6050, LSM6DS3 & LSM303DLHC accelerometer/gyroscope/magnetometer on I2C)
    • add support for more serial GPS devices
    • add support for USB-C (ADB, MTP, PTP, USB-tethering)
    • enable bluetooth tethering
    • add settings option for mouse back button feature
    • update to TWRP 3.5.0_9.0-KonstaKANG
    • update to Mesa 20.3.3
    • update to Linux 5.4.91 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 January 2021 (merged)

    20.11. changelog:
    • device settings improvements
      • fix audio device option
      • add CPU overclock option (make sure to take care of cooling if you decide to overclock!)
      • add SSH option and improve support for built-in SSH server (see FAQ)
    • fix wifi & bluetooth on Pi 400, should be fully functional now (Compute Module 4 support still untested)
    • support using HDMI:1 (fix HDMI audio in Android & fix display in TWRP)
    • fix touch input on Fondar USB touchscreen (thanks to maxwen)
    • update to Linux 5.4.77 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)

    8.11. changelog:
    • initial device settings for various Raspberry Pi specific options (Settings -> System -> Advanced settings)
      • audio device option (HDMI/3.5mm jack/audio DAC)
      • display options (graphics drivers, display resolution, display rotation)
      • options for IR remote, hardware keys, and RTC
    • fix wrong color format used in some games (thanks to Roman Stratiienko)
    • simplify booting to/out of TWRP recovery (see FAQ)
    • improve support for booting from USB devices (see FAQ, thanks to maxwen)
    • improve support for RTC & IR remotes (see FAQ)
    • add more options for rotating touch input on Waveshare SPI (ADS7846) touchscreens (thanks to mikenon)
    • allow switching display off with power button
    • map right mouse button to back key
    • initial support for Pi Compute Module 4 & Pi 400 (untested)
    • update to TWRP 3.4.0-1
    • update to Mesa 20.2.2 and latest upstream version of drm_hwcomposer
    • update to Linux 5.4.75 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 November 2020 (merged)

    13.8. changelog:
    • bring back forced landscape orientation for portrait apps
    • bring back support for running scripts from /system/etc/init.d/
    • read resolution from /boot/resolution.txt
    • fix issue with color format in fullscreen 1080p videos
    • fix issue with drm video playback
    • initial support for SSH server
    • update Mesa to 20.1.5
    • update to Linux 5.4.58 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 August 2020 (merged)

    27.7. changelog:
    • initial LineageOS 17.1 build
    • hardware accelerated graphics
      • V3D using Mesa 20.1.4 with drm_hwcomposer & gbm gralloc
      • 1920x1080 resolution
    • update TWRP to 3.4.0-0
    • update to Linux 5.4.53 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    • Android security patch level: 5 July 2020 (merged)

    Previous builds:
    4
    New builds (regular & Android TV).


    -add support for sensors (MPU6050, LSM6DS3 & LSM303DLHC accelerometer/gyroscope/magnetometer on I2C)
    -add support for more serial GPS devices
    -add support for USB-C (ADB, MTP, PTP, USB-tethering)
    -enable bluetooth tethering
    -add settings option for mouse back button feature
    -update to TWRP 3.5.0_9.0-KonstaKANG
    -update to Mesa 20.3.3
    -update to Linux 5.4.91 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
    -Android security patch level: 5 January 2021 (merged)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone