rdarwish
Posts: 5
Joined: Mon Jul 07, 2014 9:19 pm

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B - stuck in google setup loop

Mon Apr 26, 2021 10:50 pm

Hello,
I hope someone can help me. I’m so close to getting this all working, but I’m stuck in an infinite loop of logging in to my google account after flashing/installing gapps.

I am running a pi 4 (8gb) with an official 7” touchscreen, so I am using 16.0. I hit some snags, but after trying the MindTheGapps distribution, and wiping things correctly, I have successfully gotten to the part of the setup where I input my google account information.

I’m so close!

However, the system is just continually going through the same setup process. It recognizes my account, and I can go through the setup, but after it is complete, I get the Lineage boot screen, and the google setup starts all over. I’ve tried it several times in a row, just to make sure, and it just keeps repeating.

I tried 17, but I only got a black screen. I understand that this has most likely to do with the change in drivers, but I didn’t understand if I can somehow select the right driver by altering config.txt prior to installation, or how I am supposed to do that, so I’ve been sticking with 16.

Anyone else have this specific problem?

I have poured through the forum pages and pages for the distribution(s), so I don’t THINK I’ve missed something very obvious, but maybe the search terms or something are different than what I have been trying to find what I’m looking for.

I apologize in advance if I’m overlooking something very basic, but any suggestions would be greatly appreciated.

Thanks!

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

Re: [DEV] LineageOS 16.0 (Android 9) for Raspberry Pi 4 B - stuck in google setup loop

Thu Apr 29, 2021 7:39 am

rdarwish wrote:
Mon Apr 26, 2021 10:50 pm
Hello,
I hope someone can help me. I’m so close to getting this all working, but I’m stuck in an infinite loop of logging in to my google account after flashing/installing gapps.

I am running a pi 4 (8gb) with an official 7” touchscreen, so I am using 16.0. I hit some snags, but after trying the MindTheGapps distribution, and wiping things correctly, I have successfully gotten to the part of the setup where I input my google account information.

I’m so close!

However, the system is just continually going through the same setup process. It recognizes my account, and I can go through the setup, but after it is complete, I get the Lineage boot screen, and the google setup starts all over. I’ve tried it several times in a row, just to make sure, and it just keeps repeating.

I tried 17, but I only got a black screen. I understand that this has most likely to do with the change in drivers, but I didn’t understand if I can somehow select the right driver by altering config.txt prior to installation, or how I am supposed to do that, so I’ve been sticking with 16.

Anyone else have this specific problem?

I have poured through the forum pages and pages for the distribution(s), so I don’t THINK I’ve missed something very obvious, but maybe the search terms or something are different than what I have been trying to find what I’m looking for.

I apologize in advance if I’m overlooking something very basic, but any suggestions would be greatly appreciated.

Thanks!
LineageOS 16 is still currently the best option if you want to use the official display. LineageOS 17 has an option in Settings -> System -> Advanced settings -> Graphics driver to switch to SwiftShader software rendedrer but there's some stability issues with it in Android 10.

I haven't tested MindTheGapps. I'm recommending pico variant of OpenGapps in the FAQ. Recent pico builds got bloated for some reason so they no longer fit the system partition of the Android image. OpenGapps download page has a link to older builds that you can use.
KonstaKANG.com

Smndk
Posts: 13
Joined: Fri Apr 30, 2021 11:24 pm
Location: Denmark

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

Fri Apr 30, 2021 11:37 pm

Hi

I am sorry if this has been answered before, but I am pretty confused about wether the official rpi display are are supported or not with mesa3d and the latest builds? If not what is it exactly that causes mesa3d to work with HDMI but not with the official display?

Kind regards,
Svend

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

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

Sat May 01, 2021 3:27 pm

Smndk wrote:
Fri Apr 30, 2021 11:37 pm
Hi

I am sorry if this has been answered before, but I am pretty confused about wether the official rpi display are are supported or not with mesa3d and the latest builds? If not what is it exactly that causes mesa3d to work with HDMI but not with the official display?

Kind regards,
Svend
It's not supported with hardware accelerated graphics (Mesa) on current builds. It only works using SwiftShader software renderer.

Kernel KMS driver that is used with hardware accelerated graphics doesn't have support for the DSI connector it uses (regular Linux distros for Pi use fake/firmware KMS i.e. FKMS which doesn't work for Android graphics HALs). This is the case with Linux 5.4 kernel but it was added in 5.10. I actually already have the official touchscreen working with hw accelerated graphics and Linux 5.10 on Android. There's still other issues why I haven't switched to 5.10 kernel on LineageOS 18 builds.

5.4 is the newest kernel version Android supports for R (Android 11). 5.10 is actually S (Android 12) kernel so there's that, too.
KonstaKANG.com

Smndk
Posts: 13
Joined: Fri Apr 30, 2021 11:24 pm
Location: Denmark

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

Mon May 03, 2021 12:29 pm

Konsta wrote:
Sat May 01, 2021 3:27 pm
Smndk wrote:
Fri Apr 30, 2021 11:37 pm
Hi

I am sorry if this has been answered before, but I am pretty confused about wether the official rpi display are are supported or not with mesa3d and the latest builds? If not what is it exactly that causes mesa3d to work with HDMI but not with the official display?

Kind regards,
Svend
It's not supported with hardware accelerated graphics (Mesa) on current builds. It only works using SwiftShader software renderer.

Kernel KMS driver that is used with hardware accelerated graphics doesn't have support for the DSI connector it uses (regular Linux distros for Pi use fake/firmware KMS i.e. FKMS which doesn't work for Android graphics HALs). This is the case with Linux 5.4 kernel but it was added in 5.10. I actually already have the official touchscreen working with hw accelerated graphics and Linux 5.10 on Android. There's still other issues why I haven't switched to 5.10 kernel on LineageOS 18 builds.

5.4 is the newest kernel version Android supports for R (Android 11). 5.10 is actually S (Android 12) kernel so there's that, too.
Thank you very much for your answer. Just to clarify:

[*] Hardware accelerated graphics with the DSI connector and HDMI are supported with the 5.10 kernel?
[*] Only Android 12 and later will work with the 5.10 kernel?

Kind regards,
Svend

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

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

Tue May 04, 2021 8:57 pm

Smndk wrote:
Mon May 03, 2021 12:29 pm
Thank you very much for your answer. Just to clarify:

[*] Hardware accelerated graphics with the DSI connector and HDMI are supported with the 5.10 kernel?
[*] Only Android 12 and later will work with the 5.10 kernel?

Kind regards,
Svend
Yes, official 7" DSI panel works with hw accelerated on 5.10 kernel using KMS driver.

No, like said I already have it working with LineageOS 18.1 (Android 11). There's also e.g. LineageOS 17 (Android 10) builds that use Linux 5.4 (which is only supported for Android 11 and forward). Android support span for certain LTS kernel version is usually three Android versions (you practically never see a major kernel version update on retail Android device). Android lags a bit behind (well, to be fair 5.4 was the latest LTS when Android 11 was released and 5.10 will be when Android 12 is released) and on the other hand Pi Foundation folks are pretty quick to update to latest kernel versions which creates a minor problem. It's something that's possible to deal with but not preferred of course.
KonstaKANG.com

rdarwish
Posts: 5
Joined: Mon Jul 07, 2014 9:19 pm

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

Wed May 05, 2021 12:20 am

Just writing to say that installing an older version (ie, smaller) of opengapps INSTEAD of MindThe Gapps worked! I now have a fully functioning Lineage OS 16 system on a Raspberry Pi 4.

Just to help others: I just looked back at older versions of the package through the link under the main menu on the gapps download screen. When I saw the filesize drop below 100mb, I snagged that version, and it worked perfectly!

Thanks Konstakang!

Smndk
Posts: 13
Joined: Fri Apr 30, 2021 11:24 pm
Location: Denmark

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

Sat May 15, 2021 9:35 pm

Konsta wrote:
Tue May 04, 2021 8:57 pm
Smndk wrote:
Mon May 03, 2021 12:29 pm
Thank you very much for your answer. Just to clarify:

[*] Hardware accelerated graphics with the DSI connector and HDMI are supported with the 5.10 kernel?
[*] Only Android 12 and later will work with the 5.10 kernel?

Kind regards,
Svend
Yes, official 7" DSI panel works with hw accelerated on 5.10 kernel using KMS driver.

No, like said I already have it working with LineageOS 18.1 (Android 11). There's also e.g. LineageOS 17 (Android 10) builds that use Linux 5.4 (which is only supported for Android 11 and forward). Android support span for certain LTS kernel version is usually three Android versions (you practically never see a major kernel version update on retail Android device). Android lags a bit behind (well, to be fair 5.4 was the latest LTS when Android 11 was released and 5.10 will be when Android 12 is released) and on the other hand Pi Foundation folks are pretty quick to update to latest kernel versions which creates a minor problem. It's something that's possible to deal with but not preferred of course.
Once again thank you very much for the answer. Can you share what needs to be done to get the official display working on Android 11 with the 5.10 kernel? I am having trouble making it work.

Kind regards,
Svend

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

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

Sun May 16, 2021 1:15 pm

Smndk wrote:
Sat May 15, 2021 9:35 pm
Once again thank you very much for the answer. Can you share what needs to be done to get the official display working on Android 11 with the 5.10 kernel? I am having trouble making it work.

Kind regards,
Svend
You would need to do a full 5.10 Android kernel bring up. There's nothing specific needed for the official display. Raspberry Pi kernels have the support for official display with KMS driver from 5.9 forward (https://github.com/raspberrypi/linux/pull/3954 ).
KonstaKANG.com

Smndk
Posts: 13
Joined: Fri Apr 30, 2021 11:24 pm
Location: Denmark

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

Sun May 16, 2021 7:01 pm

Konsta wrote:
Sun May 16, 2021 1:15 pm
Smndk wrote:
Sat May 15, 2021 9:35 pm
Once again thank you very much for the answer. Can you share what needs to be done to get the official display working on Android 11 with the 5.10 kernel? I am having trouble making it work.

Kind regards,
Svend
You would need to do a full 5.10 Android kernel bring up. There's nothing specific needed for the official display. Raspberry Pi kernels have the support for official display with KMS driver from 5.9 forward (https://github.com/raspberrypi/linux/pull/3954 ).
I have user the kernel from https://github.com/android-rpi/kernel_arpi. Shouldn’t that work?
Are no extra overlays needed?

Smndk
Posts: 13
Joined: Fri Apr 30, 2021 11:24 pm
Location: Denmark

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

Mon May 17, 2021 10:41 am

Smndk wrote:
Sun May 16, 2021 7:01 pm
Konsta wrote:
Sun May 16, 2021 1:15 pm
Smndk wrote:
Sat May 15, 2021 9:35 pm
Once again thank you very much for the answer. Can you share what needs to be done to get the official display working on Android 11 with the 5.10 kernel? I am having trouble making it work.

Kind regards,
Svend
You would need to do a full 5.10 Android kernel bring up. There's nothing specific needed for the official display. Raspberry Pi kernels have the support for official display with KMS driver from 5.9 forward (https://github.com/raspberrypi/linux/pull/3954 ).
I have user the kernel from https://github.com/android-rpi/kernel_arpi. Shouldn’t that work?
Are no extra overlays needed?
Sorry it is of course https://github.com/android-rpi/kernel_manifest/ I use, which uses the 5.10 kernel from android.googlesource.com.

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

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

Mon May 17, 2021 5:30 pm

Smndk wrote:
Mon May 17, 2021 10:41 am
Smndk wrote:
Sun May 16, 2021 7:01 pm
I have user the kernel from https://github.com/android-rpi/kernel_arpi. Shouldn’t that work?
Are no extra overlays needed?
Sorry it is of course https://github.com/android-rpi/kernel_manifest/ I use, which uses the 5.10 kernel from android.googlesource.com.
android-rpi kernel is missing all kind of things to work properly with my LineageOS builds. There's too much to go into detail and the source code is available for reference anyway. https://github.com/lineage-rpi/android_kernel_brcm_rpi/

Yes, you need to have the drivers for the display built into the kernel and the overlays to enable the drivers.
KonstaKANG.com

Smndk
Posts: 13
Joined: Fri Apr 30, 2021 11:24 pm
Location: Denmark

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

Mon May 17, 2021 6:47 pm

Konsta wrote:
Mon May 17, 2021 5:30 pm
Smndk wrote:
Mon May 17, 2021 10:41 am
Smndk wrote:
Sun May 16, 2021 7:01 pm
I have user the kernel from https://github.com/android-rpi/kernel_arpi. Shouldn’t that work?
Are no extra overlays needed?
Sorry it is of course https://github.com/android-rpi/kernel_manifest/ I use, which uses the 5.10 kernel from android.googlesource.com.
android-rpi kernel is missing all kind of things to work properly with my LineageOS builds. There's too much to go into detail and the source code is available for reference anyway. https://github.com/lineage-rpi/android_kernel_brcm_rpi/

Yes, you need to have the drivers for the display built into the kernel and the overlays to enable the drivers.
Thank you very much for your answers, they are much appreciated.

I am still a little confused. Isn’t the link https://github.com/lineage-rpi/android_kernel_brcm_rpi/ for the 5.4 kernel?

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

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

Tue May 18, 2021 8:30 am

Smndk wrote:
Mon May 17, 2021 6:47 pm
Thank you very much for your answers, they are much appreciated.

I am still a little confused. Isn’t the link https://github.com/lineage-rpi/android_kernel_brcm_rpi/ for the 5.4 kernel?
4.19 or 5.4 depending on the branch. It's a reference what you need to do if you want to have a proper kernel to use with my LineageOS builds.
KonstaKANG.com

Return to “Android”