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

Search This thread

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com
Is there any way that I can add my non-nexus Bluetooth tv remote for control? Specifically MI TV Remote.
Why not? Use Settings -> Remotes & Accessories to pair.

The official remote app works great including voice commands so I'd probably recommend using that.

The rom works pretty well now that official android remote control app. Great Work!
I wanna suggest 2 app very usefull:
1. Terminal shortcut very usefull to write 1 time only all terminal scripts.
2. Tv app Repo to show sideloaded apps into the stock launcher.

1. There's really no need for a "normal user" to run any scripts with the latest build anymore. Booting into/out of TWRP is handled from system menus.
2. Not quite sure what you mean with this. Which "stock launcher"? One before or after installing gapps? I think the gapps Android TV launcher only displays icons for actual Android TV compatible apps. Edit. Apparently Tv App Repo is an app. No, there's no need to include third party apps you can install yourself.
 
Last edited:

stibuz95

Senior Member
Sep 30, 2012
165
23
Why not? Use Settings -> Remotes & Accessories to pair.

The official remote app works great including voice commands so I'd probably recommend using that.



1. There's really no need for a "normal user" to run any scripts with the latest build anymore. Booting into/out of TWRP is handled from system menus.
2. Not quite sure what you mean with this. Which "stock launcher"? One before or after installing gapps? I think the gapps Android TV launcher only displays icons for actual Android TV compatible apps. Edit. Apparently Tv App Repo is an app. No, there's no need to include third party apps you can install yourself.

Yeah, the first one thing is to run scripts to switch from HDMI to JACK, i use your Rom sometimes with an HDMI tv, sometimes with a HDMI->DVI adapter, so i need to use audio from jack (or now the rom self understand what device to use?
The second thing is to put on google launcher (yes ive installed gapps) all not officially compatible sideloaded apps.
Mine suggestions wasn't intended to add these apps on your rom sure, only to give some useful tips to automate some little things :)
 

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com
Yeah, the first one thing is to run scripts to switch from HDMI to JACK, i use your Rom sometimes with an HDMI tv, sometimes with a HDMI->DVI adapter, so i need to use audio from jack (or now the rom self understand what device to use?
The second thing is to put on google launcher (yes ive installed gapps) all not officially compatible sideloaded apps.
Mine suggestions wasn't intended to add these apps on your rom sure, only to give some useful tips to automate some little things :)

With the regular Android build you can do things like this from the new device settings menu (Settings -> System -> Advanced settings) without running any scripts. Android TV doesn't have hooks for the device settings apps but I'll look into if it can be launched from the setting somehow (manually with 'am start -n org.lineageos.settings.device/.RaspberryPreferenceActivity' works at least). It doesn't have an Android TV friendly UI and I'm really not interested in making a Leanback version. I don't think average user need to switch between audio devices that often either (most likely you only do it once).

Tv App Repo is an app. I tested it and didn't manage to get it to do anything useful. It's been last updated in 2017. There's no point to include third party apps you can just install yourself.
 

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com
New Android TV build.
https://konstakang.com/devices/rpi4/LineageOS17.1-ATV/

-initial device settings for various Raspberry Pi specific options (Settings -> Device Preferences -> Raspberry Pi settings)
---audio device option (HDMI/3.5mm jack/audio DAC)
---display options (graphics drivers, display resolution, display rotation)
---options for IR remote, hardware keys, CPU overclock, SSH, and RTC
-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)
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com
New build. This has been now tested by quite a few people and it should be fully functional on Pi 400 as well.
https://konstakang.com/devices/rpi4/LineageOS17.1/

-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)
 
Last edited:

freddy0000

Senior Member
Dec 19, 2011
219
6
Just update to the latest version as I was on one of the earlier ones. Everthing feels better but how do I get things like live wallpapers to work. They did only the earlier version I was on but all I get is either a black screen or a message saying this video can not play
 

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com
Just update to the latest version as I was on one of the earlier ones. Everthing feels better but how do I get things like live wallpapers to work. They did only the earlier version I was on but all I get is either a black screen or a message saying this video can not play

Things are going pretty smoothly if something like live wallpapers is the main concern. :p

What was the previous build you were using? Logcat?
 

freddy0000

Senior Member
Dec 19, 2011
219
6
Things are going pretty smoothly if something like live wallpapers is the main concern. :p

What was the previous build you were using? Logcat?

Am not complaining and infact think it runs so much better it's. I was asking because I have it setup in my kitchen on a touchscreen display for everyone to use and the live wallpaper looked better. Sorry I can't remember which version it was on as it as been on it for a while
 

Linhx

Member
Dec 19, 2015
12
0
Thank you for your great work. Everything is working well, except the HDMI-audio when using bluetooth. Like in the the previous versions the audio is stuttering, no matter which bluetooth-device I use. Sometimes also the normal audio-output begins stuttering after a while. When I turn on bluetooth in that cases the stuttering in bluetooth-headset is gone. Weird behaviour! Do you have an idea how to fix that?
 

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com
Am not complaining and infact think it runs so much better it's. I was asking because I have it setup in my kitchen on a touchscreen display for everyone to use and the live wallpaper looked better. Sorry I can't remember which version it was on as it as been on it for a while
I didn't take it as a complaint (more of a compliment really ;)). There's just been a lot bigger issues to deal with to get where we are with Android on Raspberry Pi today.

Was it even a LineageOS 17.1 build? LineageOS 16.0 still used different graphics drivers (see FAQ on how to switch to SwiftShader on LineageOS 17.1).

Thank you for your great work. Everything is working well, except the HDMI-audio when using bluetooth. Like in the the previous versions the audio is stuttering, no matter which bluetooth-device I use. Sometimes also the normal audio-output begins stuttering after a while. When I turn on bluetooth in that cases the stuttering in bluetooth-headset is gone. Weird behaviour! Do you have an idea how to fix that?

There's been several issue reports of bluetooth audio stuttering after installing gapps. I don't think anyone has mentioned that it's HDMI audio that's stuttering! I have though that it's an issue with bluetooth audio and wondered why I haven't been able to reproduce it with my bluetooth speaker/headset. Though, I think some of them do actually mean bluetooth audio.

Either way, I don't think I've seen any proper logs yet (logcat?).
 

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com
https://twitter.com/KonstaKANG/status/1330067528144592898
EnVZUitW8AM19a4
 
Last edited:

Trey n

Senior Member
Nov 12, 2014
343
87
22
Samsung Galaxy S5
OnePlus 5
Would it be possible to make a USB ir remote receiver work with android tv? A build of Android tv x86 works on an older Dell latitude e5420, maybe if I find the keymap file on android x86 and copy it to the pie it'll work? Since they are both Linux based (libreelec on the pi works with the remote as well as hdmi cec) it's an old remote from the windows xp media center edition back in 2005. Thx! And it's working great Netflix, Hulu and Amazon prime video works as well as other apps
 

freddy0000

Senior Member
Dec 19, 2011
219
6
Things are going pretty smoothly if something like live wallpapers is the main concern. :p

What was the previous build you were using? Logcat?

I didn't take it as a complaint (more of a compliment really ;)). There's just been a lot bigger issues to deal with to get where we are with Android on Raspberry Pi today.

Was it even a LineageOS 17.1 build? LineageOS 16.0 still used different graphics drivers (see FAQ on how to switch to SwiftShader on LineageOS 17.1).
(logcat?).
:good:
Think I'll leave it as it is mate, it's running great as it is and knowing my luck I'll change somthing and blow the whole street up. Everyone can just live with a still image....:laugh:
 

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com
Would it be possible to make a USB ir remote receiver work with android tv? A build of Android tv x86 works on an older Dell latitude e5420, maybe if I find the keymap file on android x86 and copy it to the pie it'll work? Since they are both Linux based (libreelec on the pi works with the remote as well as hdmi cec) it's an old remote from the windows xp media center edition back in 2005. Thx! And it's working great Netflix, Hulu and Amazon prime video works as well as other apps
Not sure what you mean with USB IR remote receiver here. Why not just simply give it try? Depends on what type of device it appears as ('dmesg' pluggin it in?). I'm not supporting LIRC here (gpio-ir driver is used for GPIO IR receiver instead).

I have an USB air mouse/remote/keyboard/whatever combo that AFAICT uses IR between the remote and receiver and it works just fine.

Also I noticed the recent apps is broke u can't close the running apps on the android tv latest build

It's not broken. Android TV simply doesn't have a recent apps view. It's a dumbed down version of Android. For some reason the LineageOS 16.0 version still has it but this has been the case for regular Android TV devices for many Android versions.

You can close individual apps from the settings menu. There's also a development setting option not to keep activities which closes apps as you exit them.
 
Last edited:

SteveMinguel

New member
Nov 22, 2020
1
0
Bluetooth A2DP sink / HSP

Hi,

Brilliant work. I am looking to make a car system with this, for which i would need a headset / a2dp sink bluetooth set up. Is this possible?

Cheers,
Steve
 

Trey n

Senior Member
Nov 12, 2014
343
87
22
Samsung Galaxy S5
OnePlus 5
Not sure what you mean with USB IR remote receiver here. Why not just simply give it try? Depends on what type of device it appears as ('dmesg' pluggin it in?). I'm not supporting LIRC here (gpio-ir driver is used for GPIO IR receiver instead).

I have an USB air mouse/remote/keyboard/whatever combo that AFAICT uses IR between the remote and receiver and it works just fine.



It's not broken. Android TV simply doesn't have a recent apps view. It's a dumbed down version of Android. For some reason the LineageOS 16.0 version still has it but this has been the case for regular Android TV devices for many Android versions.

You can close individual apps from the settings menu. There's also a development setting option not to keep activities which closes apps as you exit them.

i just came across a flirc usb ir receiver which allows you to control a computer or media device in this case the pi with a remote control. you plug it in the pc and program the remote control keys from the remote which it receives. When Flirc receives Infrared (IR) signals from a remote control (e.g. a TV remote control) it then sends a keypress (as if it were a USB keyboard and you were pressing a key). so that will defiantly work! only 20 on amazon :D
 
Last edited:

KonstaT

Senior Member
Jan 20, 2016
394
273
KonstaKANG.com

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    This is what I meant
    It stays like this black screen
    There's a FAQ section about display issues. Have you read it? Have you tried what is instructed there?
    1
    Hello. I am trying to connect RTC Ds3231 to my Raspberry Pi. I connected the RTC module in the settings and in the config.txt file, using the command "su hwclock -w -f / dev / rtc0 I write the system time to the 3231 module, but after the device reboots, the time shows 1 hour more than it was. Maybe there are some solutions to this problem?
    That's the day light saving hour (summer time) that Android handles somewhere else.

    Check 'hwclock --help' for options how to read/write the time in different formats. Script that reads the time during boot is located at /system/etc/init.d/01rtc in case you need to modify something there as well.
  • 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