• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

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

Search This thread

Balnafasae

Member
Jan 5, 2017
12
0
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.
i tried with my 18.5, 15.6 inch non touch DPI_LVDS monitor. DPI displays doesnt seem to work in these builds..ill work on that with help from konstakang and will update once it works
 
Last edited:

Balnafasae

Member
Jan 5, 2017
12
0
Don't comment out/remove the rpi-backlight line. Your device won't boot because Android lights HAL needs to have the backlight path accessible. It doesn't affect DPI display or anything else.

I'm entirely sure what is the status of DPI display with KMS driver used with hw accelerated graphics on Android builds. Raspberry Pi OS (and other Linux distros) usually use the firmware/fake KMS (FKMS). Unfortunately this kind of information is not easily available but you'd need to dig the relevant pieces of info from Pi Foundation engineers' random forum post or their GitHub issue tracker.

It's possible that Android graphics HALs also don't know to configure the DPI display. Pretty sure you would need to remove /boot/resolution.txt for start at least. Impossible to say what is the exact issue with DPI display without seeing any logs. Testing my older LineageOS builds (16/17) that use/have support SwiftShader software rendederer is also an option.

Also please try to stick with one medium instead of making the same post on various different places (removed your post from my site).

Hello, konstakang. Thanks for a swift response.

1. I will keep the rpi-backlight toverlay uncommented.

2. I get the splash screen but no display afterwards ( which i think the splash screen is from the rpi firmware)

3.For now, could you tell me how /boot /resolution.txt does affect the android from outputting dpi?

4. i will try removing resolution.txt and running older builds to see swift shader helps.

ill keep you posted

Im also posting on rpi forum about the dpi firmware appraoch and android hal to learn more about them. thanks agai
 

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
i tried with my 18.5, 15.6 inch non touch DPI_LVDS monitor. DPI displays doesnt seem to work in these builds..ill work on that with help from konstakang and will update once it works
Display connection technology != display size.

I know people have used these Android builds on displays ranging from 4" to as big TVs get these days. If you use a display with resolution other than the default 1080p you also need to change Settings -> Display -> Display size to adjust the pixel density.
Hello, konstakang. Thanks for a swift response.

1. I will keep the rpi-backlight toverlay uncommented.

2. I get the splash screen but no display afterwards ( which i think the splash screen is from the rpi firmware)

3.For now, could you tell me how /boot /resolution.txt does affect the android from outputting dpi?

4. i will try removing resolution.txt and running older builds to see swift shader helps.

ill keep you posted

Im also posting on rpi forum about the dpi firmware appraoch and android hal to learn more about them. thanks agai
If by splash screen you mean the rainbow screen, it's a Raspberry Pi firmware level thing.

/boot /resolution.txt is used in my Android builds to force a certain resolution that the connected (HDMI) display reports as supported via EDID. I highly doubt DPI display is reporting anything or if you're even getting that far for this to make any difference.

You really need to have proper ways to get logs if you want to debug this.
 

Balnafasae

Member
Jan 5, 2017
12
0
Display connection technology != display size.

I know people have used these Android builds on displays ranging from 4" to as big TVs get these days. If you use a display with resolution other than the default 1080p you also need to change Settings -> Display -> Display size to adjust the pixel density.
You are right.
I had changed the display size under settings to 1360x768

If by splash screen you mean the rainbow screen, it's a Raspberry Pi firmware level thing.

/boot /resolution.txt is used in my Android builds to force a certain resolution that the connected (HDMI) display reports as supported via EDID. I highly doubt DPI display is reporting anything or if you're even getting that far for this to make any difference.

You really need to have proper ways to get logs if you want to debug this.
Could you let me know how to get a proper log for you to look into?
im running 18.1 now.
 

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
Could you let me know how to get a proper log for you to look into?
im running 18.1 now.
Having a serial console adapter is the best option to get logs from that early in the boot process. I don't know if that works with the DPI display if it also uses some of the same pins as UART.

Regular USB ports on the Pi are host mode only so you can't use those for ADB. You can use ADB over the USB-C port on Pi 4 but you need a powered USB-C hub or an USB Y-cable and outside power source for this (or power over ethernet/GPIO). ADB over network is not possible this early in the boot.

IMO the first step for you is to get your display working Raspberry Pi OS with KMS (instead of FKMS is uses by default). We can look into how Android handles things after that.
 
Last edited:

Balnafasae

Member
Jan 5, 2017
12
0
er over ethernet/GPIO). ADB over network is not possible this early in the boot.

IMO the first step for you is to get your display working Raspberry Pi OS with KMS (instead of FKMS is uses by default). We can look into how Android handles things after that.
on pi forum, i was told , using KMS, i need to create a DTOVERLAY for the panel usinf the timings from SIMPLE-PANEL.C

TO test RPI OS with KMS i just need to mention
dtoverlay=vc4-kms-v3d
dtoverlay=cma,cma-384

in config.txt?

also is "M" needed to be added with memory allocation like "cma-384M"
?

ill try to make the display work with RPI os / ubuntu with KMS and revert back to you with updates.
 

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
on pi forum, i was told , using KMS, i need to create a DTOVERLAY for the panel usinf the timings from SIMPLE-PANEL.C

TO test RPI OS with KMS i just need to mention
dtoverlay=vc4-kms-v3d
dtoverlay=cma,cma-384

in config.txt?

also is "M" needed to be added with memory allocation like "cma-384M"
?

ill try to make the display work with RPI os / ubuntu with KMS and revert back to you with updates.
Just changing dtoverlay=vc4-fkms-v3d -> dtoverlay=vc4-kms-v3d in config.txt should be enough for Raspberry Pi OS.

I think there should also be an option for this in 'raspi-config' (or at least there was in some versions, I haven't checked with recent releases).

Increasing CMA is only needed for Android. No 'M' (https://github.com/lineage-rpi/andr...1/arch/arm/boot/dts/overlays/README#L628-L642).

My Android kernel also needs to have the DRM_PANEL_SIMPLE built-in for your dtoverlay to work but we'll get to that later if you get it working with Raspberry Pi OS first.

Also putting a link to the Pi forum discussion here because it has relevant information. https://www.raspberrypi.org/forums/viewtopic.php?f=73&t=310125&sid=6cd9e98bb3a0fe4ba438e6ba4cce09ba
 
Last edited:

OdeMix

Member
Feb 8, 2021
11
1
I don't understand why GPS works like that.
Yesterday was cloudy weather, rain. The system has found all the satellites. I have not made any changes to the settings. It's sunny today, no clouds. GPS found only one satellite. What ideas do you have?

P.S. And after I asked the last question, I haven't made any changes to the settings. GPS itself started to work yesterday.

P10421-191121.jpg

P10418-162514.jpg
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
I don't understand why GPS works like that.
Yesterday was cloudy weather, rain. The system has found all the satellites. I have not made any changes to the settings. It's sunny today, no clouds. GPS found only one satellite. What ideas do you have?

P.S. And after I asked the last question, I haven't made any changes to the settings. GPS itself started to work yesterday.

I can only comment that the antenna on my U-Blox 7 unit is really bad I can't get a fix when I'm inside either. I don't think this is a software issue.
 

albertd52

New member
May 15, 2021
3
1
Just installed the version 17.1 20210122 on the Pi4 with 8gB and a 64 gB SD.
After booting I reach screen "Restore Apps and Data" and want to Skip. There I get stuck, nothing is happening. Pressing Restore from Backup (which I do not have) shows a short flash of the "Searching for Accessories" screen and then the menu flips back to Time and Date.
What could be the issue. I am really eager to get this working. Thanks.

I use Lineage on my phones and it is really the best.
 

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
Just installed the version 17.1 20210122 on the Pi4 with 8gB and a 64 gB SD.
After booting I reach screen "Restore Apps and Data" and want to Skip. There I get stuck, nothing is happening. Pressing Restore from Backup (which I do not have) shows a short flash of the "Searching for Accessories" screen and then the menu flips back to Time and Date.
What could be the issue. I am really eager to get this working. Thanks.

I use Lineage on my phones and it is really the best.
It would be worth pointing out if you're discussing the Android TV or the regular tablet UI build especially as both latest releases were on the same day. I assume you mean the Android TV build.

Have you installed gapps? Have you changed display resolution from the default? In any case difficult to say what could be the problem without seeing any logs.
 

albertd52

New member
May 15, 2021
3
1
It would be worth pointing out if you're discussing the Android TV or the regular tablet UI build especially as both latest releases were on the same day. I assume you mean the Android TV build.

Have you installed gapps? Have you changed display resolution from the default? In any case difficult to say what could be the problem without seeing any logs.
Hi Konstakang, thanks for the reply. Sorry for not pointing out that it is Android TV build. I have not yet installed GAPPS because the install procedure hangs at the "Restore Apps and Data" screen. Hence I cannot change the screen resolution other then on the TV which I put on HD (1920x1080). Other settings I cannot make because the install procedure hangs unfortunately. Where could I find the install log on the SD card?
Forgot to mention that pressing "Skip" in the "Restore Apps and Data" screen the monitor/TV turns black.
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
Hi Konstakang, thanks for the reply. Sorry for not pointing out that it is Android TV build. I have not yet installed GAPPS because the install procedure hangs at the "Restore Apps and Data" screen. Hence I cannot change the screen resolution other then on the TV which I put on HD (1920x1080). Other settings I cannot make because the install procedure hangs unfortunately. Where could I find the install log on the SD card?
Forgot to mention that pressing "Skip" in the "Restore Apps and Data" screen the monitor/TV turns black.
You would need to have a serial console adapter to get logs at this point.

You can boot to TWRP directly to install gapps using a hardware DIY power button (see FAQ). You can also change resolution by editing /boot/resolution.txt (also see FAQ).

The setup wizard is extremely memory hungry for some reason and graphics can run out of CMA allocation with higher resolutions. This shouldn't be a problem with 1080p.
 

albertd52

New member
May 15, 2021
3
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.
 
  • Like
Reactions: KonstaT

risant

Senior Member
Aug 6, 2016
271
30
How would you use it on some other Linux distro e.g. Raspberry Pi OS?

If Android detects it as an USB sound card then just simply plug it in.
onkyo hifi player detects it as hifi soundlaster usb sound card still no sound from digital out toslink of soundblaster even spotify no sound i used it on lineage 17.1 rpi.. developer's option usb configuration no audio device option.. what will i do to make it work?
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
428
291
KonstaKANG.com
onkyo hifi player detects it as hifi soundlaster usb sound card still no sound from digital out toslink of soundblaster even spotify no sound i used it on lineage 17.1 rpi.. developer's option usb configuration no audio device option.. what will i do to make it work?
There shouldn't be any difference how USB audio devices are handled between LineageOS 17 & 18. My USB soundcard works on both at least. There's no USB audio device option in developer options. Both have option to disable USB audio routing, though.

You'd need to provide logs (logcat, dmesg) on both where you have this working (LineageOS 17) and where it's not (LineageOS 18).
 
Last edited:

risant

Senior Member
Aug 6, 2016
271
30
There shouldn't be any difference how USB audio devices are handled between LineageOS 17 & 18. My USB soundcard works on both at least. There's no USB audio device option in developer options. Both have option to disable USB audio routing, though.

You'd need to provide logs (logcat, dmesg) on both where you have this working (LineageOS 17) and where it's not (LineageOS 18
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    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)