Home > Tips and Tricks

What are the Commands to Flash Files to Both Slots? [Video]

In this guide, we will make you aware of all the plausible commands through which you could flash files to both slots. Beginning with the A/B Partition scheme, there have been some drastic changes in the way you used to flash files to their partitions. Earlier, simply using a generic command without specifically defining the slots would have been sufficient enough to flash the file to their dedicated partition.

However, now, that is no longer the case. In most cases, you might have to specify the slot to which you want to flash the file. Regarding this, there are three plausible outcomes: flash it to the current active slot, flash it to the inactive slot, or flash to both slots. Unless stated otherwise, your best bet is to flash to both the slots so that both the active and inactive partitions are populated with the same data, which greatly minimizes the risk of bootloop or softbrick.

In this regard, there exist three different commands through which you could flash files to both slots. And in this guide, we will make you aware of each of them. So without further ado, let’s check them out.

What are the Commands to Flash Files to Both Slots?

Before starting, please take a backup of all the data on your device, just to be on the safer side. Moreover, for the sake of reference, we will be flashing the boot.img file to the boot partition. Whatever file you want to flash, make sure to place it inside the platform-tools folder. Likewise, boot your device to Fastboot Mode and connect it to the PC via a USB cable before starting the flashing.

COMMAND 1

fastboot flash boot_a boot.img
fastboot flash boot_b boot.img

Flash Files to Both Slots

There might be a few instances wherein you would have to explicitly mention the slots to which you are flashing the file. In the above command, we have listed both slots A and B, so we can be sure that the file has been flashed to both the partitions.

COMMAND 2

fastboot flash boot --slot all boot.img

Flash Files to Both Slots

This command will automatically flash the designated file to both slots. So in this case, it will auto-flash the boot.img to both the active and inactive slots in one go!

COMMAND 3

fastboot flash boot_ab boot.img

This command will also flash the files to both slots A and B and that too at once! However, it comes with the least success rate [Xiaomi devices are among the very few ones that accept this command]. So unless stated otherwise, it’s better not to use this one.

Flash Files to Both Slots
Didn’t work on my Pixel

That’s it. These were the four different commands that should help you flash the files to both slots A and B. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.

NOTE

fastboot flash boot boot.img

Flash Files to Both Slots

As opposed to the general notion, this command will not flash the file to both slots. Instead, it will only flash to the current active slot, and hence it doesn’t qualify for this guide.


Share: