User avatar
procount
Posts: 2703
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Mon Mar 30, 2020 9:20 pm

@Konsta - Any reason why fstab is called fstab.rpi4 in ramdisk.img, but fstab.rpi3 in ramdisk-recovery.img?
Apart from that, the recovery image seems to have converted ok for PINN. Hopefully there are no other hardcoded partition references in there.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

gabrix
Posts: 6
Joined: Wed Feb 05, 2020 12:53 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Tue Mar 31, 2020 8:34 pm

I still haven't managed to get my pi4 box hdmi work with my tv monitor.
I wil appreciate some help ...

User avatar
procount
Posts: 2703
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Thu Apr 02, 2020 12:37 pm

LineageOS 16 from Konsta's Feb release (200207_rpi3 & 200212_rpi4) can now be installed via PINN with the TWRP Recovery mode enabled now as well.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

WODAK
Posts: 72
Joined: Thu Jan 23, 2020 1:53 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Thu Apr 02, 2020 3:24 pm

Great news procount! :D

Shoud I just reinstall the Lineage? Does the select="allnetwork" in recovery.cmdline work like that? I clicked the button Reload Repos but forgot to check the info of the OS. In all the excitement I just clicked replace :)

I thought there was a message with the update notice about a new version (I think i saw that before).

Thank you again for your great work!

User avatar
Konsta
Posts: 578
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Thu Apr 02, 2020 4:28 pm

Kred1t wrote:
Thu Mar 26, 2020 10:23 pm
Konsta, thank you for your hard work. It looks interesting but unfortunately it’s not ready for every day use.

It would be great if you could explain to people who are not very into Android development what are major challenges for running Android on Raspberry Pi ? Will something change after an open-source Vulkan driver is released?
What do you think about a community Android port? Is it possible without a support from the Raspberry Pi Foundation ?
There's actually only couple of things that are not working on Pi 4. Hw accelerated graphics is working reasonably well on Pi 3 so one thing less there.

Situation with hw accelerated graphics on Pi 4 has been discussed on this thread previously. There's already open source graphics drivers for Pi 4. I'm not expecting Vulcan driver to change anything (no plans to even use Vulcan anytime soon).

Hardware video decoding/encoding was discussed here (https://forum.xda-developers.com/showpo ... tcount=108).

General situation why Android is challenging on Pi was just recently discussed here (https://www.raspberrypi.org/forums/view ... 0#p1630088). Pi foundation has clearly stated that they are not supporting Android so there's no point in speculating with that.
KonstaKANG.com

User avatar
Konsta
Posts: 578
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Thu Apr 02, 2020 4:32 pm

WODAK wrote:
Sun Mar 29, 2020 2:11 pm
Firstly ... thank you for your effort and great work!

Just a few questions:

Is there a posibility to run VNC server (like dispman vnc) or RDP server on the system?
Is there a posibility to ssh to the system?
Is there a posibility to run any manual .sh scripts (for example mount other partitions and reboot to them with a shortcut) ?

Thank you for your anwsers!
Yes, I've been told VNC works.
You can use 'adb shell' for remote shell access.
Yes, you can run your own scripts at boot if that's what you're asking. Place them under /system/etc/init.d/ and set executable file permissions (755).
KonstaKANG.com

Tripp396
Posts: 12
Joined: Sat Apr 04, 2020 11:20 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Sat Apr 04, 2020 11:30 pm

Not sure if this is a os thing or app thing (working with the app support to on this) but one app wants to grab permissions and every time I do one thing in the app it always asks to give full permissions but the permissions are already given. To be specific it is asking for permissions to my microphone (have a Bluetooth headset connected) and then says to give the app full permissions (which it has). Just looking for any guidance.

User avatar
Konsta
Posts: 578
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Sun Apr 05, 2020 6:21 am

Tripp396 wrote:
Sat Apr 04, 2020 11:30 pm
Not sure if this is a os thing or app thing (working with the app support to on this) but one app wants to grab permissions and every time I do one thing in the app it always asks to give full permissions but the permissions are already given. To be specific it is asking for permissions to my microphone (have a Bluetooth headset connected) and then says to give the app full permissions (which it has). Just looking for any guidance.
You need to reboot/power off your device properly via the power menu (see FAQ) for the permissions to stick.
KonstaKANG.com

Tripp396
Posts: 12
Joined: Sat Apr 04, 2020 11:20 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Sun Apr 05, 2020 3:21 pm

Konsta wrote:
Sun Apr 05, 2020 6:21 am
Tripp396 wrote:
Sat Apr 04, 2020 11:30 pm
Not sure if this is a os thing or app thing (working with the app support to on this) but one app wants to grab permissions and every time I do one thing in the app it always asks to give full permissions but the permissions are already given. To be specific it is asking for permissions to my microphone (have a Bluetooth headset connected) and then says to give the app full permissions (which it has). Just looking for any guidance.
I’ll give it a try! Thanks!
You need to reboot/power off your device properly via the power menu (see FAQ) for the permissions to stick.

Tripp396
Posts: 12
Joined: Sat Apr 04, 2020 11:20 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Sun Apr 05, 2020 3:59 pm

Konsta wrote:
Sun Apr 05, 2020 6:21 am
Tripp396 wrote:
Sat Apr 04, 2020 11:30 pm
Not sure if this is a os thing or app thing (working with the app support to on this) but one app wants to grab permissions and every time I do one thing in the app it always asks to give full permissions but the permissions are already given. To be specific it is asking for permissions to my microphone (have a Bluetooth headset connected) and then says to give the app full permissions (which it has). Just looking for any guidance.
You need to reboot/power off your device properly via the power menu (see FAQ) for the permissions to stick.
Attempted a proper reboot. Whenever the app attempts to access the microphone it says I need to give the app full permissions (which is shows to already have).

I’ll try to see if the app devs are seeing this issue.

WODAK
Posts: 72
Joined: Thu Jan 23, 2020 1:53 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Sun Apr 05, 2020 7:48 pm

I have successfully installed and tested those functionalities:

Remote acces - for remote acces I used ADB and scrcpy https://github.com/Genymobile/scrcpy
SMB Server - with application LAN drive - SAMBA Server & Client https://play.google.com/store/apps/deta ... x.landrive
SSH Server - with application SSHelper https://play.google.com/store/apps/deta ... d.sshelper
FTP Server - with application FTP Server https://play.google.com/store/apps/deta ... ftpserverr
X-plore File Manager - Dual-pane tree view for exploring content, running scripts (also making shortcuts of scripts on the desktop), SMB client, FTP Client, SSH client and much much more https://play.google.com/store/apps/deta ... mes.Xplore
VNC Server - not really to mention one that works properly ....
VNC - to watch movies over network disk :)


This post is not meant to be an advertisement for any of mentioned applications, just for help other people to successfully access their Lineage OS with proper remote way :)

My goal was to execute a shortcut (script as a root) to reboot to another partition over PINN. And I did that also :)

Tripp396
Posts: 12
Joined: Sat Apr 04, 2020 11:20 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Sun Apr 05, 2020 8:38 pm

Tripp396 wrote:
Sun Apr 05, 2020 3:59 pm
Konsta wrote:
Sun Apr 05, 2020 6:21 am
Tripp396 wrote:
Sat Apr 04, 2020 11:30 pm
Not sure if this is a os thing or app thing (working with the app support to on this) but one app wants to grab permissions and every time I do one thing in the app it always asks to give full permissions but the permissions are already given. To be specific it is asking for permissions to my microphone (have a Bluetooth headset connected) and then says to give the app full permissions (which it has). Just looking for any guidance.
You need to reboot/power off your device properly via the power menu (see FAQ) for the permissions to stick.
Attempted a proper reboot. Whenever the app attempts to access the microphone it says I need to give the app full permissions (which is shows to already have).

I’ll try to see if the app devs are seeing this issue.
Next step I tried was deleting the offending app. Installed a voice recorder app, confirmed that the app was the only one with access to the microphone and when I tried to use it, it said that another app was using the microphone and to find that app and close it first.

Tripp396
Posts: 12
Joined: Sat Apr 04, 2020 11:20 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Mon Apr 06, 2020 1:58 am

Seems Bluetooth and USB mics aren’t usable currently, atleast on my device. Trying to use one says that the microphone is currently being used by another app, but if I revoke permissions for all apps except the one I want to use it still shows that error. Is there a system process that is trying to use the microphone, or someway I can tell what seems to be secretly using it?

User avatar
Konsta
Posts: 578
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Mon Apr 06, 2020 6:13 am

Tripp396 wrote:
Mon Apr 06, 2020 1:58 am
Seems Bluetooth and USB mics aren’t usable currently, atleast on my device. Trying to use one says that the microphone is currently being used by another app, but if I revoke permissions for all apps except the one I want to use it still shows that error. Is there a system process that is trying to use the microphone, or someway I can tell what seems to be secretly using it?
Sorry, I can't quite understand what you mean by "full permissions"? I though something was getting lost in translation and you meant root permission with this. At least that needs a proper reboot via power menu to stick.

I have an USB sound card and microphone works just fine for me. Please test your mic with the built-in Recorder app. After the microphone permission is granted once, it's not asked again.
KonstaKANG.com

Tripp396
Posts: 12
Joined: Sat Apr 04, 2020 11:20 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Mon Apr 06, 2020 1:34 pm

Konsta wrote:
Mon Apr 06, 2020 6:13 am
Tripp396 wrote:
Mon Apr 06, 2020 1:58 am
Seems Bluetooth and USB mics aren’t usable currently, atleast on my device. Trying to use one says that the microphone is currently being used by another app, but if I revoke permissions for all apps except the one I want to use it still shows that error. Is there a system process that is trying to use the microphone, or someway I can tell what seems to be secretly using it?
Sorry, I can't quite understand what you mean by "full permissions"? I though something was getting lost in translation and you meant root permission with this. At least that needs a proper reboot via power menu to stick.

I have an USB sound card and microphone works just fine for me. Please test your mic with the built-in Recorder app. After the microphone permission is granted once, it's not asked again.
I got it working. Seems that I had an issue with the USB port for my USB mic. I moved it to a USB 3 port and it started working perfectly. Thanks for taking time to answer my posts!

Kred1t
Posts: 4
Joined: Wed Mar 18, 2020 9:57 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Mon Apr 06, 2020 7:55 pm

Konsta wrote:
Thu Apr 02, 2020 4:28 pm
Kred1t wrote:
Thu Mar 26, 2020 10:23 pm
Konsta, thank you for your hard work. It looks interesting but unfortunately it’s not ready for every day use.

It would be great if you could explain to people who are not very into Android development what are major challenges for running Android on Raspberry Pi ? Will something change after an open-source Vulkan driver is released?
What do you think about a community Android port? Is it possible without a support from the Raspberry Pi Foundation ?
There's actually only couple of things that are not working on Pi 4. Hw accelerated graphics is working reasonably well on Pi 3 so one thing less there.

Situation with hw accelerated graphics on Pi 4 has been discussed on this thread previously. There's already open source graphics drivers for Pi 4. I'm not expecting Vulcan driver to change anything (no plans to even use Vulcan anytime soon).

Hardware video decoding/encoding was discussed here (https://forum.xda-developers.com/showpo ... tcount=108).

General situation why Android is challenging on Pi was just recently discussed here (https://www.raspberrypi.org/forums/view ... 0#p1630088). Pi foundation has clearly stated that they are not supporting Android so there's no point in speculating with that.
Thank you for a really detailed answer.
I think a position of the Raspberry Pi Foundation is a little bit strange. Because there is only one Android box with a good software support on the market currently. It’s Nvidia Shield Pro and it’s almost permanently sold out despite the fact it costs £200.

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Mon Apr 06, 2020 8:55 pm

Kred1t wrote:
Mon Apr 06, 2020 7:55 pm
Konsta wrote:
Thu Apr 02, 2020 4:28 pm
Kred1t wrote:
Thu Mar 26, 2020 10:23 pm
Konsta, thank you for your hard work. It looks interesting but unfortunately it’s not ready for every day use.

It would be great if you could explain to people who are not very into Android development what are major challenges for running Android on Raspberry Pi ? Will something change after an open-source Vulkan driver is released?
What do you think about a community Android port? Is it possible without a support from the Raspberry Pi Foundation ?
There's actually only couple of things that are not working on Pi 4. Hw accelerated graphics is working reasonably well on Pi 3 so one thing less there.

Situation with hw accelerated graphics on Pi 4 has been discussed on this thread previously. There's already open source graphics drivers for Pi 4. I'm not expecting Vulcan driver to change anything (no plans to even use Vulcan anytime soon).

Hardware video decoding/encoding was discussed here (https://forum.xda-developers.com/showpo ... tcount=108).

General situation why Android is challenging on Pi was just recently discussed here (https://www.raspberrypi.org/forums/view ... 0#p1630088). Pi foundation has clearly stated that they are not supporting Android so there's no point in speculating with that.
Thank you for a really detailed answer.
I think a position of the Raspberry Pi Foundation is a little bit strange. Because there is only one Android box with a good software support on the market currently. It’s Nvidia Shield Pro and it’s almost permanently sold out despite the fact it costs £200.

Android is a device Operating System, not many users want to drill down into the nuts and bolts, they just want to use it, hence why the vast majority of phones run Android.


The raison d'etre for the Raspberry Pi Foundation is "Education and Learning" and Android, as has been discussed over the last 8 years, is not an Operating System which fulfills that brief.
Take what I advise as advice not the utopian holy grail, and it is gratis !!

Tripp396
Posts: 12
Joined: Sat Apr 04, 2020 11:20 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Tue Apr 07, 2020 12:59 pm

Wondering if anyone has played around with bluetooth on this build. So far it seems that bluetooth audio works great, but if I try to use the microphone on my bluetooth headset (multiple different headsets I've tried) it just doesn't work. The recorder app just crashes if I try to record audio, and another app says the microphone is in use.

Wondering if there is a bluetooth setting in the developer options I need to change.

User avatar
Konsta
Posts: 578
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Tue Apr 07, 2020 4:50 pm

Tripp396 wrote:
Tue Apr 07, 2020 12:59 pm
Wondering if anyone has played around with bluetooth on this build. So far it seems that bluetooth audio works great, but if I try to use the microphone on my bluetooth headset (multiple different headsets I've tried) it just doesn't work. The recorder app just crashes if I try to record audio, and another app says the microphone is in use.

Wondering if there is a bluetooth setting in the developer options I need to change.
I can reproduce the Recorder issues with bluetooth earphones I have so this needs further looking into.
KonstaKANG.com

Tripp396
Posts: 12
Joined: Sat Apr 04, 2020 11:20 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Tue Apr 07, 2020 5:12 pm

Konsta wrote:
Tue Apr 07, 2020 4:50 pm
Tripp396 wrote:
Tue Apr 07, 2020 12:59 pm
Wondering if anyone has played around with bluetooth on this build. So far it seems that bluetooth audio works great, but if I try to use the microphone on my bluetooth headset (multiple different headsets I've tried) it just doesn't work. The recorder app just crashes if I try to record audio, and another app says the microphone is in use.

Wondering if there is a bluetooth setting in the developer options I need to change.
I can reproduce the Recorder issues with bluetooth earphones I have so this needs further looking into.
If there's any way I can help, let me know. Not sure if any sort of logs would help out.

User avatar
Konsta
Posts: 578
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Wed Apr 08, 2020 3:44 pm

Tripp396 wrote:
Tue Apr 07, 2020 5:12 pm
If there's any way I can help, let me know. Not sure if any sort of logs would help out.
Logs always help but in cases where I can reproduce the issue I rather grab the logs myself.
KonstaKANG.com

discombobulated
Posts: 2
Joined: Thu Jan 23, 2020 12:15 am

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Fri Apr 10, 2020 12:09 pm

Currently waiting for full KMS support on Pi 4 kernel side. Plan was to use mainline Android graphics HALs (drm_hwcomposer, minigbm gralloc). Fake/firmware KMS (vc4-fkms-v3d) that Pi 4 currently only supports doesn't seem to work with Android HALs on Pi 3 either.
Hello ,

With the testing release of kernel 5.4 as well as support for vc4-kms-v3d-pi4, I'm wondering if you will be releasing a kernel update for your rom with hardware acceleration enabled?

Or will the update require heavier modification.

Regards,
Chris.

User avatar
Konsta
Posts: 578
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Fri Apr 10, 2020 2:02 pm

discombobulated wrote:
Fri Apr 10, 2020 12:09 pm
Hello ,

With the testing release of kernel 5.4 as well as support for vc4-kms-v3d-pi4, I'm wondering if you will be releasing a kernel update for your rom with hardware acceleration enabled?

Or will the update require heavier modification.

Regards,
Chris.
There's currently no plans for any updates.

It's not even a small task to bringup 5.4 kernel for Android. The one I'm currently using (4.19) is actually too new for Android Pie as it's basically Android 10 (Q) kernel. 5.4 will be supported with the upcoming Android R that is not even released yet.

Then you'd need to bringup V3D driver for Android on MESA, minigbm gralloc and drm_hwcomposer. I have it built already (it's actually even included in the latest image) but it's not granted that it will just work. So if someone wants to test building 5.4 kernel for Android and using vc4-kms-v3d-pi4, they can already try it with the latest release. :)
KonstaKANG.com

SabirovRF
Posts: 2
Joined: Sun Jan 26, 2020 5:28 am

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Fri Apr 10, 2020 5:48 pm

Hi Konsta!
How do i change wifi country or wifi region ?This needed for connect to 5ghz wifi.
In Raspbian for properly connect to 5ghz wifi i change wifi country in wpa_supplicant.conf.

User avatar
Konsta
Posts: 578
Joined: Thu Aug 16, 2018 3:55 pm
Location: Finland

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B

Sat Apr 11, 2020 7:03 am

SabirovRF wrote:
Fri Apr 10, 2020 5:48 pm
Hi Konsta!
How do i change wifi country or wifi region ?This needed for connect to 5ghz wifi.
In Raspbian for properly connect to 5ghz wifi i change wifi country in wpa_supplicant.conf.
This is something that needs further looking into. There's some errors in kernel log about regulatory database missing because it's handled differently in Linux >= 4.15 and Android doesn't have crda(?). Global region (00) is used by default (check 'iw reg get').

Code: Select all

[    3.563451] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    3.572254] cfg80211: failed to load regulatory.db
I've managed to add the regulatory.db manually to the kernel and change wifi region. 5 GHz is still not available, though.
KonstaKANG.com

Return to “Android”