Advertisements

What is fastbootd? How to Enable and Boot?

Google introduced the Android 10 operating system back in September 2019. Android 10 brought in new support for resizable partition which relocates the Fastboot from bootloader to userspace. This, in turn, allows the flashing code to be in a common location implemented by HAL (Hardware Abstraction Layer). With the help of Fastboot, the user can perform and modify various system images using a PC over a USB cable.

It basically can be defined by three things, a command to execute the instructions, software to run the phone when in Fastboot mode, and a program to talk to your phone over a USB connection.  There are different methods by which you can enable Fastboot on your devices. But in this post, we will guide you on how to enable fastbootd which has been brought over by Android 10 that requires some ADB commands to integrate fastbootd. So, without any further ado, let us get straight into the article itself:

What is Fastbootd?

Fastbootd

To support fastbootd, the bootloader must implement a new boot control block (BCB) command of boot-fastboot. To enter fastbootd mode, bootloader should write boot-fastboot into the command field of the BCB message and leave the recovery field of BCB unchanged (to enable the restart of interrupted recovery tasks). The status, stage, and reserved fields remain unchanged as well. The bootloader is expected to load and boot into the recovery image upon seeing boot-fastboot in the BCB command. Recovery then parses the BCB message and switches to fastbootd mode.

As per Google:

You can find the below commands that are required to integrate fastbootd.

New ADB Command
reboot fastboot
  • Reboots into fastbootd (system).
  • Enters fastbootd directly without a reboot (recovery).
New fastbootd Command
reboot recovery
  • Reboots into recovery (bootloader).
  • Enters recovery directly without a reboot (fastbootd).
reboot fastboot Reboots into fastbootd.
getvar is-userspace
  • Returns `yes` (fastbootd).
  • Returns `no` (bootloader).
getvar is-logical:<partition> Returns `yes` if the given partition is a logical partition, `no` otherwise. Logical partitions support all of the commands listed below.
getvar super-partition-name Returns the name of the super partition. The name includes the current slot suffix if the super partition is an A/B partition (it is usually not).
create-logical-partition <partition> <size> Creates a logical partition with the given name and size. The name must not already exist as a logical partition.
delete-logical-partition <partition> Deletes the given logical partition (effectively wiping the partition).
resize-logical-partition <partition> <size> Resizes the logical partition to the new size without changing its contents. Fails if not enough space is available to perform the resize.
update-super <partition> Merges changes to the super partition metadata. If a merge isn’t possible (for example, the format on the device is an unsupported version), then this command fails. An optional “wipe” parameter overwrites the device’s metadata rather than performing a merge.

How To Enable Fastbootd

In order to enable Fastbootd on any Android device:

  1. You need to Add fastbootd to PRODUCT_PACKAGES in device.mkPRODUCT_PACKAGES += fastbootd.
  2. Make sure that the fastboot HAL, boot control HAL, and health HAL are packaged as part of the recovery image.
  3. You need to add any device-specific sepolicy permission required by fastbootd.

How to Boot into Fastbootd

  • First, boot into stock recovery on your device.
  • To enter recovery mode, Turn off your device, press Volume down + Power button together
  • You will enter stock recovery.
  • In your stock recovery option, you will find “Enter Fastboot”
  • Tap on it and you will see a new window called Fastbootd.

So, there you have it from my side in this post. I hope you guys liked the post and were able to understand this fastbootd and how to enable it on any device. Until the next post…Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.