Bootloader and FastBoot

Bootloader and FastBoot

  • By huaweicomputers
  • 23/03/2023

There are "Bootloader", "RECOVERY", and "FastBoot", such as acquiring roots, such as acquiring ROOT.There is also the word "ADB".In many sites, you may be able to eat without any explanation.That's why I will explain these three terms this time.

Bootloader (or Boot Loader) is an Android device, the name of the program used to launch a system.Speaking of PCs, the Bootloader is the part of the BOOTLOADER and launches the Linux kernel.

Usually, this bootloader moves while displaying the maker logo at startup, reading the Linux kernel and launching it.The kernel will then launch an Android environment.

In the ARM -based device, the Exposition Vector table is generally placed on the first 0th memory space, loading the first 4 bytes, and starting the program as the program execution start position.The bootloader is started at this time.

Bootloader creates the environment necessary for starting the kernel, such as initializing the CPU or I/O, and reads the kernel into the RAM.

For this reason, it is generally not to look at the Bootloader screen, but by using a special method, you can stop Bootloader before reading the kernel and display the built -in user interface.In many cases, you can use the FastBoot command described later from here.

This Bootloader program is called a "firmware" made by a hardware manufacturer, and how to make it depends on the manufacturer.However, in Android, the rules of bootloaders should be supported, so many manufacturers, Bootloader, follow this.

Bootloader may also detect the condition and update the system.Although it depends on the model, if you place a file with a specific name on the root folder of the SD card, you can recognize it and rewrite the flash memory.However, any file is not eligible.In general, smartphones etc. are accepted only for updates files provided by manufacturers.It is said that such a state is "locked".

However, some manufacturers can unlock this lock.The operation for that is called "Bootloader unlock".However, depending on the manufacturer, the system protects the system in another way, and Bootloader may not be locked.Since Bootloader is unique to the manufacturer, it seems that the idea is different depending on the manufacturer.

With Nexus -based devices sold by Google, Bootloader is locked at the time of shipment, but users can unlock this.

GALAXY NEXUS boot screen.The icon with the key below indicates that Bootloader is unlocked

ADB is an abbreviation of "Android Debug Bridge", a program for connecting android aircraft with a PC or other USB and debugging applications on an actual machine.This is included in Android SDK and can be used for installation.The so -called "shell" is used to launch an ADB command.

adb shell

Let the command run.In the case of a PC, use it from the command prompt.

In order to use ADB, you need to enable USB debugging on the android side, and on the PC side, you need to incorporate a device driver for ADB.This ADB driver is also included in Android SDK, but in rare cases it may be downloaded from the manufacturer's site.

ブートローダーとfastboot

Various tasks are performed using the above -mentioned ADB Shell, but at this time there are commands and processing that require administrator privileges, and in order to do this, ROOT (UNIX -based operating system is the administrator.The user name represented) is required.With normal android, you cannot work as root.This is commonly called "root" or "root authority".In addition, if you enter a system that can acquire root authority in Adb Shell, the "SU" (abbreviation for SUPER user) can be used, and if you use it, you will be able to execute the command with root authority.

Rooting uses a bug of the system to acquire root authority and install Linux management commands that contain commands such as SU.At this time, it seems that a program called "BUSYBOX", which is packed with various commands in one binary program, is often installed to reduce storage capacity.

When USB debug is enabled by connecting to a PC, the "Android Adb Interface" driver is incorporated.

Fastboot is the name of the command contained in Android SDK, and is also the name of the protocol in which the PC and Android communicate using this command.Also, the fact that Bootloader is in a state of accepting the Fastboot command is called FastBoot mode.

The Fastboot command is a command that connects a PC and an Android with a USB cable to run on the PC side, mainly writing to a flash memory and managing partitions made on a flash memory.

When connecting in FastBoot mode, a dedicated device driver is required.This is a different driver from the USB debug mode, and is called a Bootloader driver or a FastBoot driver.

If the aforementioned ADB is running, you can enter the Fastboot mode with "Adb REBOOT FASTBOOT".In addition, depending on the model, you can enter the FastBoot mode (or command reception state) by turning on the power while holding down multiple keys (buttons).

In Google's Nexus series, for example, Galaxy Nexus allows you to turn on the power key up and down at the same time, turn on the power, enter the FastBoot mode, start up the system and launch a recovery (described later).It is.

The role of the Fastboot command is to enable a single command to work related to flash memory.The Fastboot command is also used for writing custom recovery.This is because you can install custom recovery by writing an image file containing custom recovery into the recovery area with the Fastboot command.

Bootloader in Fastboot mode.Operate with a volume key and power button

In the case of Fastboot mode, become an Android Bootloader interface driver

You can also enter recovery mode from Fastboot mode

Recovery is a system incorporated into an Android, which is generally installed in a different partition from the Android itself, mainly restoring flash memory and erasing data areas.

Android has three partitions, Boot, Recovery, and System, and each image file is different.This is to launch a system in the recovery area because you cannot launch a normal Android while rewriting the system.The Boot domain is separate to enable the minimum startup operation even if the recovery or system area is broken.

When you unlock Bootloader, you will be able to write custom programs without electronic signatures in the recovery area.This is called "custom recovery".Custom recovery has functions such as handling partitions, such as partition backups that are not found in normal recovery.In addition, custom recovery can easily work with root acquisition.This is because it is possible to rewrite the system area when recovery is running.

The method of activating recovery varies depending on the hardware.Some manufacturers cannot start recovery without using a special method.Smartphones and tablets are for general consumers, and these functions may not be open to the general public as a manufacturer for repairs.

The recovery mode can be launched from there if Bootloader has a command reception state.It can also be started from the ADB command described above.

One of the custom recovery (Team Win Recovery Project).Written in the recovery area and has various functions not found in standard recovery

本稿は、2013年9月6日にAndorid情報のWeb専門誌「AndroWire」に掲載した記事を再構成したものです。