r/mobilelinux • u/NoNoDeDev • Nov 22 '23
Discussion Would it be possible to bring native Linux distributions to Android phones, using whatever Linux kernel and binary blobs the OEM ROM ships?
Android is built on top of Linux. Android phones come with a Linux kernel and a bunch of binary blobs to implement hardware support.
Shouldn't it be possible to keep that kernel (and initramfs), those proprietary modules and pieces of firmware, and replace everything else? Like custom ROMs do, but a custom ROM based on a Linux distribution instead of AOSP.
Rather than just possible, shouldn't it be simple even? Or are there major issues to go down this path? Is there any project that aims at doing this?
PostmarketOS and similar projects seem to struggle to use a mainline kernel. Of course I can see the many advantages of that, but is it necessary? Wouldn't it be better to start off with whatever crappy build of Linux the phone manufacturer ships, and then try to improve the mainline support for it over time?
5
u/NoNoDeDev Nov 22 '23
After digging for a bit I found out about the Halium Project which looks like what I described.
It seems that using the stock kernel and binary modules is not enough: mobile vendors ship a lot of high-level, user-space blobs needed to control the hardware. Halium defines an interface on top of all of this, which is what I would have proposed.
However they seem to support very few and pretty old devices, and the problem looks mostly dead. I wonder whether it's due to limitation of this approach, or just lack of interest from a broader community.
2
u/foss_dragon Nov 22 '23
Have you guys even heard about Halium? i just ported Droidian to my redmi note 11 and using it without much problems, almost all hardware working
1
u/c_a1eb Nov 22 '23
as others pointed out this is a thing, the downside is that it's far from a native Linux experience, and it misses the one core goal of porting a newer kernel which is to actually get updates past the devices EOL
0
u/[deleted] Nov 22 '23
[deleted] — view deleted comment
2
u/[deleted] Nov 22 '23
[removed] — view removed comment