EFIDroid Takes Booting To A Completely New Level




Michael Zimmermann, the owner of this project, defines EFIDroid as an "open source bootloader" or a "powerful 2ndstage-bootloader" which allows you to "take over control before loading the operating system".

Introduction 

Before we get into the complicated terms on how EFIDroid works, it would only be fair enough to get an introduction of it. EFIDroid is a replacement of the Grub4Android project, or you might well take EFIDroid as a new name for the Grub4Android project.

Started back in 2014, EFIDroid allows you to boot any number of operating systems and custom recoveries. Want me to define this in simpler terms, then this means that you can have all the recoveries such as CWM, TWRP and Philz together at the same time. If you have own a OnePlus One, then even better, because using EFIDroid you can keep all the following ROMs in your device at the same time:

  • OxygenOS
  • HydrogenOS
  • CyanogenMod 13
  • Sailfish OS
  • MIUI 7
  • Ubuntu Touch



What's more, at the time of booting up your device, you can choose which ROM you want to boot into. In fact, you can choose which recovery to boot into as well!

Extensible Firmware Interface was a firmware standard developed by Intel to improve and add on features to BIOS. Basic Input/Output System (BIOS) is a set of instructions which guides the computer on how to initialise the hardware properly so that it can boot up the software. Intel ceased EFI's development in July 2005. EFI's development from there on was carried over by the United EFI Forum under the project name Unified Extensible Firmware Interface (UEFI). EFIDroid thus refers to Extensible Firmware Interface for Android. EFIDroid is based on UEFI only.


How it works? (Credits: Michael Zimmermann)



Devices running a Qualcomm processor (Snapdragons included in here, they are made by Qualcomm after all!) have a bootloader known as Little Kernel (LK). After Qualcomm made the sources of the bootloader public, the bootloader was soon hacked into and modified. The modified bootloader image is obviously unsigned, that is, it is not approved by the manufacturer. LK was modified to boot up EFIDroid.

To understand the working of EFIDroid, we will take a look at the booting sequence which takes place when a device is powered on. To take up an example, we will be considering the Motorola Mote E (code named condor), one of the first official devices to be supported by EFIDroid. Let us take a look at the Partition Table of the Motorola Moto E in EFIDroid's common wiki.



Using the "Name" header of the partition table, we can figure out the boot sequence of the Moto E. After initial allocation of file systems is done, the first bootloader (contained inside the sbl1 partition) is loaded by the SoC's boot ROM (read-only). This is followed up by the initialisation of the hardware components of the device (such as the RAM). Once this is done, the code from the 'aboot' partition is loaded. The 'aboot' partition is usually the place where the device manufacturers place the stock bootloader. The stock bootloader is LK for most of the devices running a Snapdragon chipset, however, certain manufacturers do prefer to write their own bootloaders. The stock bootloader is responsible for finding and loading the linux kernel.




At this specific point in the bootchain, the device may enter the recovery mode or fastboot mode if a particular key combination is used. We are now at a point in the boot chain where we can run unsigned code (for this to happen we need the bootloader to be unlocked). The linux kernel is contained inside of the boot.img, and that's what we replace with our own bootloader. The boot.img is now hacked to boot UEFI (=EFIDroid) prior to linux. Several other modifications in the boot.img do make it possible to boot linux later on. UEFI has a app which then can load another linux kernel later.

Which devices are supported?

As described in the previous sections, EFIDroid was started by modifying Little Kernel, bootloader which Qualcomm devices come with. All the Qualcomm processors have the same bootloader in the form of Little Kernel. Hence any device which runs a Snapdragon or Qualcomm chipset can have a port of EFIDroid. Developers do need to make the effort to do the same.

Devices having EFIDroid ports are: Motorola Moto G 2013, Samsung Galaxy Note 3, Xiaomi Mi2(s), Motorola Moto E, Xiaomi Redmi 1s.

Wondering about Mediatek devices, huh? Well, we first need to convince Mediatek to start respecting GPL and to release the source code for the chipsets they make, instead of charging manufacturers for every bits and pieces of the code. 

How to install EFIDroid?



Officially supported devices can have an installation of EFIDroid just with the help of a few clicks. You need to be rooted and have an unlocked bootloader.



To install EFIDroid, all you need to do is download the EFIDroid application from Play Store. You can grab the APK for the same by clicking here. The app will help you configure MultiROMs on your device and install/remove/update EFIDroid.

Quick Links

No matter whether you are a developer or an avid Android user, these links will definitely help you out.





Krittin Kalra is an 18 year old Android freak. Striving for passions, chasing down his dreams and living a life without regrets is his sole mantra. A bit moody, he also does custom ROM reviews for AndroGuider. Currently pursuing his B.Tech, he aspires to follow his heart.
EFIDroid Takes Booting To A Completely New Level EFIDroid Takes Booting To A Completely New Level Reviewed by Krittin Kalra on 10/17/2016 01:19:00 am








Subscribe To Us

Get All The Latest Updates Delivered Straight To Your Inbox For Free!





Powered by Blogger.