Friday, June 10, 2016

[Bootloader] EFIDroid - The MultiROM alternative on OPT?

Hi guys,
I'm not a Dev but I want to talk about something interesting in the Android modding scene.
A Dev called Michael Zimmermann is developing a Grub version fof Qualcomm Android Devices (OPT is based on SD810..!).

Could be interesting to see in on Oneplus TWO, right?

Info about the project here.

Code:

Let me talk about #EFIDroid( #G4A ).
You might have eared something about it, not much up to now because there's nothing released for users.
Let's start: what's it?
First of all this amazing project is developed by +Michael Zimmermann I am NOT the dev��
G4A is a port of the well-known GNU GRUB bootloader to Qualcomm (up to now) (android) devices.
Many when it was announced asked: will we be able to boot windows or <insert Linux distro here> ?
The answer is partially no. At least it's not the main goal of the project, bit grub is able to boot a linux distro,
cuz it's the same bootloader you may have on your pc. Actually G4A is used as multiboot solution for android, like multirom.
Android ROMs are not designed for multiboot and you see that (for example) on multirom: you need a kernel with kexec-hardboot, a custom recovery and huge crazy hacks on ramdisk.
Damn, this makes your device crazy... G4A is different. Totally different. Much easier. Better.
So how does it works?
One of the rules is to make the less impact on system as possible. G4A only needs a custom boot loader.
Qualcomm released LK (their bootloader that every qcom device uses) sources.
This bootloader support almost all qcom soc, even old ones such as msm7x27.
This bootloader was hacked with some additions like uboot api (that's used to load grub).
Now the problem is booting that lk. There are two ways: let's start with the easier:
Some devices allow us to boot unsigned bootloader images (that's dangerous on security side) but we use that to write our hacked lk that will boot grub and stop. Other (and most) devices don't support unsigned bootloaders.
The bootloader is flashed both on boot and recovery partitions. Then the magic show starts.
We call this 2th boot: the stock bootloader thinks it's booting a kernel (or recovery) while it's booting another bootloader, stunningly easy and stupid.
The 2th bootloader will detect from which partition is loaded and it will choose to boot straight to recovery or of it has to load grub.
Grub is placed on a folder (boot/grub) placed on NAND, usually on sdcard and protected from user by fuse and rw permissions.
When you boot android, the bootloader will load grub, this one will make you choose what to boot recovery, system, a multibooted system, recovery running "on" a multibooted system etc.
Ofc the ramdisk has to be hacked, but to keep rom intact, the hacks are done on-the-go.
How can I install it/ manage multibooted systems?
G4A will be releases with an app called 'GRUB Manager' that will install it with a few clicks,
you just need root and an unlocked bootloader.
This app will help you creating and managing systems by adding entries to grub.cfg (for who knows how grub works).

Which devices will be supported?
Almost all qcom-powered devices can run this, the port is surprisingly easy (for devs ofc), it may take you just an half hour. Currently official supported devices are: Xiaomi Mi2(s), Motorola Moto E and Xiaomi Redmi 1s.
If you're an expert dev and you've done a port for your device/ you're interested in, hangout me.

ETA?
Sorry not eta allowed, the first build will be for devs and advanced users (I remember that on some devices we write on bootloader partition, if something goes wrong, it's not so easy to recover it) when multiboot will be fully working (now about 80%).

To sum up
> EFIDroid is an opensource project that has the goal to provide the best multiboot solution for qcom devices
> There are two ways to install this: on bootloader and 2th boot
> The GRUB Manager app will install EFIDroid and it will manage multibooted systems
> It can support almost all qcom devices
> It will be released soon for devs and advanced users as a first public beta

Some links:
Follow +EFIDroid for news
Sources
Community


from xda-developers http://ift.tt/1syPMtd
via IFTTT

No comments:

Post a Comment