Sample Header Ad - 728x90

Install Linux on Android phones (bare metal but with needed drivers)

0 votes
0 answers
371 views
So, to summarise the questions: 1. How do I get the bootloader to work if I want to install Linux ARM distro on Android phones (in this case, OnePlus 5T) 2. Is it possible to copy drivers in /vendor in any possible way to my Linux install and get it to work? Details: I've installed Ubuntu Touch on my OnePlus 5T phone. After some experience with it, I found that it's not fun so I want to switch to other distros that allow me to install whatever GUI I want, 99% open-source (no Snap), be able to get into tty, and compile a custom kernel. Basically, most functionalities that could be found on x86 Linux distros. (It would be best if it's Gentoo) However, there are 2 big problems that I couldn't get over with: bootloaders and modules. From installing Gentoo Linux by hand, I'm pretty familiar with installing bootloaders with Grub on EFI. But there's no such thing as BIOS or EFI on phones (just fastboot), and as for the drivers, on Ubuntu Touch (which is supposed to be more "Linux" than "Android") don't have kernel modules .ko file but says all the drivers are in /vendor. Since I cannot boot from USB in phones but am able to install alternative OS from flashing .img files, I have come up with a way to install Linux on phones (ignoring driver and bootloader issues): 1. Plug a USB drive on the phone and mount it to a directory 2. In the directory, download and extract Gentoo/Arch/etc. stage tarball 3. chroot into the Linux environment and try all I can to install Linux on it 4. Unplug the USB drive, mount it on my Linux PC, and dd into a .img file 5. Flash the .img file in whatever way Is it possible, if so, how/why not? I know that Android is based on the Linux kernel, but it's still much different from Linux distros that I've seen. I have much less Android knowledge than Linux, so feel free to correct my misunderstandings.
Asked by gentoo user Vergil (1 rep)
Oct 1, 2024, 05:12 PM
Last activity: Oct 2, 2024, 02:16 PM