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

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

Mon Jan 06, 2020 1:33 pm

Here’s my build of LineageOS 16.0 for Raspberry Pi 4 Model B. It is unofficial and unsupported by the LineageOS team. It’s for advanced users only. This build currently uses Google’s SwiftShader software renderer so graphics performance is probably not what you’d expect. This build is not suitable for media device use or graphics intensive gaming. I’d also recommend using Pi 4 models with 2GB or 4GB of RAM 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_20200105-125543_Settings.png
Screenshot_20200105-125543_Settings.png (64.19 KiB) Viewed 1414 times
https://konstakang.com/devices/rpi4/LineageOS16.0/

Sources:
KonstaKANG.com

flyingboy_98
Posts: 2
Joined: Wed Jan 15, 2020 7:09 am

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

Wed Jan 15, 2020 7:46 am

Hi,
This is great! Thank you for your efforts!!
I'v tried on my Pi 4 and everything is fine but the WiFi, it shows "connected, no internet". I was using my phone's hot spot to share the internet and no problem with my other devices. Could you please tell me how to solve this problem?
Thanks in advance!

Konsta
Posts: 87
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

Wed Jan 15, 2020 9:05 am

flyingboy_98 wrote:
Wed Jan 15, 2020 7:46 am
Hi,
This is great! Thank you for your efforts!!
I'v tried on my Pi 4 and everything is fine but the WiFi, it shows "connected, no internet". I was using my phone's hot spot to share the internet and no problem with my other devices. Could you please tell me how to solve this problem?
Thanks in advance!
Yeah, there's a problem connecting when certain wifi mode/frequency/channel is used. Need to gather more information what is going on here.

I had trouble connecting to my router at one point as well but after messing with my AP setting I can no longer reproduce the issue. Connecting to APs created on other Android devices has always worked for me. This might even be a different issue as IIRC it only showed 'Saved' on mine and didn't even connect that far. Logs are always useful (logcat in this case).
KonstaKANG.com

flyingboy_98
Posts: 2
Joined: Wed Jan 15, 2020 7:09 am

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

Wed Jan 15, 2020 9:52 am

Konsta wrote:
Wed Jan 15, 2020 9:05 am
flyingboy_98 wrote:
Wed Jan 15, 2020 7:46 am
Hi,
This is great! Thank you for your efforts!!
I'v tried on my Pi 4 and everything is fine but the WiFi, it shows "connected, no internet". I was using my phone's hot spot to share the internet and no problem with my other devices. Could you please tell me how to solve this problem?
Thanks in advance!
Yeah, there's a problem connecting when certain wifi mode/frequency/channel is used. Need to gather more information what is going on here.

I had trouble connecting to my router at one point as well but after messing with my AP setting I can no longer reproduce the issue. Connecting to APs created on other Android devices has always worked for me. This might even be a different issue as IIRC it only showed 'Saved' on mine and didn't even connect that far. Logs are always useful (logcat in this case).
Thank you for your reply, this is very helpful! I’ll try once more.
Thank you again!

Konsta
Posts: 87
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

Thu Jan 16, 2020 2:30 pm

New build.

https://konstakang.com/devices/rpi4/LineageOS16.0/

-fix USB storage
-fix wifi tethering
-update to Linux 4.19.95 kernel and patch known vulnerabilities (CVE-xxxx-xxxx, and more)
-Android security patch level: 5 January 2020 (merged)
KonstaKANG.com

ChrisChris
Posts: 8
Joined: Thu Jan 16, 2020 1:33 pm

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

Fri Jan 17, 2020 11:49 am

Copied form another thread by request:

I am a newbi and am playing around with my first Raspberry Pi4 trying to set up an Android system. I did not have a problem installing Lineage for Pi 4 which seems to work fine. However, some apps I have been trying to install are being displayed cut off in a narrow portrait window, rendering them useless. They seem to install fine, no error messages show and installation is confirmed. I have not been able to find anthing on this problem on google so hopefully, someone has come across this already.

Also, my Bluetooth adapter (keyboard/mouse) works fine but I have not been able to get any other USB devices recognised in either the USB2 or USB3 ports. I tried almost a half dozen sticks of varying age and sizes, and an external hdd plus an SD card in an adapter, all of which are working fine on any other PC I have. Since all ports are effected, I do not think that the USB3 problem I read about is the culprit? Any input would be appreaciated.

Regards,
Chris
Attachments
screen02.jpg
screen02.jpg (19.5 KiB) Viewed 366 times
screen01.jpg
screen01.jpg (21.82 KiB) Viewed 366 times

ChrisChris
Posts: 8
Joined: Thu Jan 16, 2020 1:33 pm

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

Fri Jan 17, 2020 11:49 am

Thu Jan 16, 2020 9:19 pm

Welcome to the forum. :) Please use the existing thread instead of opening a new one. If you have questions/comments/problems with LineageOS 16.0 on the Pi 4, this is the topic you should use (https://www.raspberrypi.org/forums/view ... 1413acffdc).

These are actually good questions and someone else facing the same issues might appreciate the answer as well. I know I'm overly optimistic thinking that people actually bother to read anything before asking, but I can guarantee the next person facing the same issue will never find the info here after this gets buried after a while. If it's posted in the relevant thread, it's at least possible.

There is a problem with portrait apps as my builds have forced landscape orientation. If you don't mind tilting your head sideways, you can do this (https://www.raspberrypi.org/forums/view ... 8#p1493958).

There was an issue with USB storage in the first release but it is fixed in the build I released today.

ChrisChris
Posts: 8
Joined: Thu Jan 16, 2020 1:33 pm

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

Fri Jan 17, 2020 12:40 pm

Hi!

Thanks for the quick reply. I have copied the previous thread here to keep it together as suggested.

Tried the new release hoping to at least get the USB ports working but I cannot get past the setup routine due to constant restarts. I learned earlier that this is a power supply problem and have since bought an original Raspberry power supply. I have had one or two restarts when I first connected it, after that no more problems. (This was the previous install I was referring to in my original post.)

With this new build, it keeps restarting constantly. I got as far as the time zone which I was able to select, after that, it went into a re-start loop. I am using a brand new Sandisk sc card which seemed fine when putting the image on. I re-flashed the card and started all over, now re-start loop is running without even getting to any setup.

Konsta
Posts: 87
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

Fri Jan 17, 2020 12:55 pm

ChrisChris wrote:
Fri Jan 17, 2020 12:40 pm
Hi!

Thanks for the quick reply. I have copied the previous thread here to keep it together as suggested.

Tried the new release hoping to at least get the USB ports working but I cannot get past the setup routine due to constant restarts. I learned earlier that this is a power supply problem and have since bought an original Raspberry power supply. I have had one or two restarts when I first connected it, after that no more problems. (This was the previous install I was referring to in my original post.)

With this new build, it keeps restarting constantly. I got as far as the time zone which I was able to select, after that, it went into a re-start loop. I am using a brand new Sandisk sc card which seemed fine when putting the image on. I re-flashed the card and started all over, now re-start loop is running without even getting to any setup.
You need to use proper power source and sdcard of course. Cutting the power in the middle of write process is an easy way to corrupt a sdcard.

I haven't experienced any unexpected random reboots or received other reports so something is definitely wrong at your end. Difficult to say exactly what without seeing any logs (but those are also difficult to get without having a serial console adapter).
KonstaKANG.com

ChrisChris
Posts: 8
Joined: Thu Jan 16, 2020 1:33 pm

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

Sat Jan 18, 2020 11:10 am

Okay, I have replaced the original(!) power supply with another original one, replaced the card with a brand new one and tried with both cards from scratch. Same result. I have not done anything differently than with the first installation - which btw still works fine, it just won't recognize the USB ports. I have installed Libreelec without a problem as a test, so I would assume the board is fine?

I understand that the rainbow screen followed by a re-start does indicate inadequate power supply, is that correct? It seems that two original power supplies with 3A should be able to handle the demand, both being broken would be very unlikely. Sorry, no serial console available here. I have a pc only. Is there anything else I can do to get to the bottom of this? I am at a loss at what else to try.

Konsta
Posts: 87
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 Jan 18, 2020 12:15 pm

ChrisChris wrote:
Sat Jan 18, 2020 11:10 am
Okay, I have replaced the original(!) power supply with another original one, replaced the card with a brand new one and tried with both cards from scratch. Same result. I have not done anything differently than with the first installation - which btw still works fine, it just won't recognize the USB ports. I have installed Libreelec without a problem as a test, so I would assume the board is fine?

I understand that the rainbow screen followed by a re-start does indicate inadequate power supply, is that correct? It seems that two original power supplies with 3A should be able to handle the demand, both being broken would be very unlikely. Sorry, no serial console available here. I have a pc only. Is there anything else I can do to get to the bottom of this? I am at a loss at what else to try.
Which Pi 4 model is this?

So you're saying 20200106 build works fine. No reboots whatsoever.
20200116 build boots to what point exactly until it reboots? Rainbow screen or you said something about time zone screen?

No, reboot in rainbow screen doesn't indicate power source issue. It can be for several different reasons.

USB ports work just fine on both builds. Just USB storage devices are not accessible from Android UI in the 20200106 build. You can also copy /boot/ramdisk.img from 20200116 build to the first build to fix this.
KonstaKANG.com

ChrisChris
Posts: 8
Joined: Thu Jan 16, 2020 1:33 pm

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

Sat Jan 18, 2020 1:43 pm

Raspberry Pi 4 Modell B.

20200106 build works fine now except for the usb storage. 20200116 build boots to the complete Lineage logo on the black screen and reboots following a rainbow screen when it should be starting the white setup screen.

I replaced ramdisk.img in the original installation with the current version, it started to the first android screen but showed a rainbow screen and re-started before the first icons appeared. Went back to the old version and everything worked fine as before.

Konsta
Posts: 87
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 Jan 18, 2020 2:00 pm

ChrisChris wrote:
Sat Jan 18, 2020 1:43 pm
Raspberry Pi 4 Modell B.

20200106 build works fine now except for the usb storage. 20200116 build boots to the complete Lineage logo on the black screen and reboots following a rainbow screen when it should be starting the white setup screen.

I replaced ramdisk.img in the original installation with the current version, it started to the first android screen but showed a rainbow screen and re-started before the first icons appeared. Went back to the old version and everything worked fine as before.
Yeah, but one with 1GB, 2GB, or 4GB of RAM?

Only changes in that ramdisk are the changed platform device path for the USB and I removed use of zRAM.
Last edited by Konsta on Sat Jan 18, 2020 3:13 pm, edited 2 times in total.
KonstaKANG.com


Konsta
Posts: 87
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 Jan 18, 2020 2:51 pm

ChrisChris wrote:
Sat Jan 18, 2020 2:21 pm
Sorry, 4GB.
Well, that's interesting because I can't reproduce such issue on my 4GB model (and I'd expect to receive other reports if this was a common issue).

If you have any USB and/or GPIO devices connected, try removing those as well just to eliminate all moving parts. E.g. if you have USB drives that are formatted to a filesystem Android doesn't support that might have unexpected result.

It is possible to get logs using adb over ethernet if the device boots far enough. Ethernet seems to connect when bootanimation is still showing so that should work in your case.
KonstaKANG.com

ChrisChris
Posts: 8
Joined: Thu Jan 16, 2020 1:33 pm

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

Sat Jan 18, 2020 4:18 pm

The only device connected is the Bluetooth adapter for the keyboard/mouse. I have not connected anything else since the system is not set up yet. I like to go one step at a time. :-)

I have heat sinks installed and they seemed like body temp at the most which should have been ok. The Raspberry is not in a case yet but I connected the fan I have and put the top part of the cover over the board. This got me a step into the setup before rebooting. I figured this was the right attempt and put a small dry(!) bag from the freezer on top. That got me through the installation setup with only one reboot.

Unfortunately, this was how far I got. The system now starts and displays the start screen, but before I can do anything shows the now familiar rainbow screen and reboots. It seems to make no difference if the freezer bag is on top or not. The heat sink still does not seem to be very hot and a bathroom thermometer (hell, I am getting desperate :-)) measured 39 degrees Celsius without the fan, which would not really constitute a heat wave for a cpu.

How do I get adb set up to get logs?

Konsta
Posts: 87
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 Jan 18, 2020 5:30 pm

ChrisChris wrote:
Sat Jan 18, 2020 4:18 pm
How do I get adb set up to get logs?
And you haven't made any of your own modifications to e.g. /boot/config.txt or anywhere else? I just find it extremely strange if you can reproduce that even by changing the ramdisk.img in the 20200106 build with the one from 20200116 because there should be only those couple of things changed (you can also test switching the ramdisk.imgs the other way around).

https://developer.android.com/studio/command-line/adb has links to download adb for different OS and some documentation on how to use adb. You can only use adb over wifi or ethernet on this device. For adb over wifi your Pi and your computer need to be connected on the same wireless network. For adb over ethernet you need an ethernet cable between your Pi and your computer. You probably also need to enable a setting to share your computer's network connection with the ethernet (how to do that depends on the OS you're running on your computer). Then you need to know your Pi's IP address. You'll find it in Settings -> About tablet -> IP address in both cases but there are other ways to acquire it as well ('arp -a' if you're connected with ethernet works IIRC both Linux and Windows).

adb connect <Pi's IP address>

After connecting you can use adb commands as usual. E.g. to get logs:
adb logcat
adb shell dmesg
KonstaKANG.com

Return to “Android”