Home > Tips and Tricks

How to Fix Bootloop in A/B Partition Android Devices

In this guide, we will show you the steps to fix the bootloop issue in dual partition A/B Android devices. Right since the inception of dual-slot devices, there has always been some or the other sort of confusion. But before we get on to that, what exactly is this A/B partition thing? In simplest terms, there are now two different slots for most of the partitions on your device.

These include the likes of system vendor, bootloader among others. There are quite a few benefits to come out of this. For example, in earlier times, as and when at OTA update arrived, you had to leave your device in an idle state. As result, right from the time, the update is being downloaded, to its installation you could not perform any activity on your phone.

However, with the introduction of dual partitions, the update would get downloaded and installed in the background onto the inactive partition while you could still continue to use the device in the active partition. As and when the update was successfully installed, you just needed to reboot it once to switch slots and get onto the newly installed update.

This is just one of the many perks of the A/B partitions. On the flip side, it has also created some confusion among the users. The first one is the installation of TWRP Recovery. It is due to the absence of the recovery partition and the fact that everything is taken care of by the boot partition. [Recommended: TWRP: fastboot flash vs fastboot boot: Which command to use].

Along the same lines, the device going into the continuous bootloop seems to be a common issue. Fortunately, you could easily fix this issue and in this guide, we will show you how to do just that. So without further ado, let’s start off with the guide to fix this bootloop issue in dual partition A/B Android devices.

The Reason for Bootloop in A/B Partition Android Devices

So here is what really happens. For the sake of simplicity, let’s assume A to be your active partition and B as inactive. So as of now, you are currently on the A partition, and the update is installed to the B partition. Now when you reboot your device, a slot change will take place. Hence B becomes your active partition now (where the update was just installed) whereas A is the inactive one.

But if you end up switching slots, either via TWRP or while installing Magisk patched image, then you would end up on the slot that doesn’t have the system.img flashed. In other words, you are trying to boot to the slot that doesn’t have any operating system installed!

This is just not possible and but your device will keep on trying its best to boot to the OS each and every time. On doing so, it is stuck in a bootloop. With this, you might have got a decent idea as to the reason for this issue. Let’s now check out the steps to fix this bootloop issue in dual partition A/B Android devices.



How to Fix Bootloop issue in Dual Partition A/B Android devices

To begin with, you will have to boot your device to the Fastboot Mode. You wouldn’t be able to use the adb reboot bootloader command since it requires enabling USB Debugging and authorizing the connection via the PC. Both of which aren’t possible in a bootloop issue. So what else could be done? Well, you will have to use the hardware key combinations to boot it to Fastbooot Mode (there is no universal combination as it varies from device to device).

oneplus-fastboot-mode
Fastboot Mode in OnePlus

Anyways, once booted to Fastboot, connect your device to the PC via USB cable and proceed with the below steps to fix this bootloop issue in dual partition A/B Android devices. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.

Instruction Steps

  1. Download and install the Android SDK Platform Tools on your PC.
  2. Now extract it to a convenient location on your PC and you should get the platform-tools folder.
  3. Head over to this platform-tools folder, type in CMD in its address bar, and hit Enter. This will launch the Command Prompt window.
    command-prompt-adb
  4. Type in the below command in the CMD window to get the currently active slot (the slot to which your device is currently booted) [Recommended: How to Check and Change Current Active Slot on Android].
    fastboot getvar current-slot

    check-current-slot-android-fix-android-bootloop

  5. If your current slot comes out to be A, then you need to change it to B as follows:
    fastboot set_active b

    android-set-slot-b-as-active-fix-android-bootloop

  6. On the other hand, if it was B, then change it to A using the below command
    fastboot set_active a

    android-swtich-to-slot-a-fix-android-bootloop

  7. If you are unable to change the slot due to the device being in a locked state, then please refer to our guide to Fix FAILED (remote: Slot Change is not allowed in Lock State).
  8. Moving on, once the change of slot is successfully completed, you may reboot your device to the OS using the following command
    fastboot reboot

Your device will now boot up to the OS and the bootloop issue in the dual partition A/B Android device should now have been fixed. However, if you are still getting bugged with this issue, then you might have to flash the system.img to your device’s current active slot (that you got in STEP 4, before switching the slot).

But to be on the safer side, it is always recommended to flash the entire stock firmware file rather than just its system image file. Hence please refer to our guide on How to Flash Stock Firmware via Fastboot Commands. Do keep in mind that there would be a fastboot -w command in the linked guide for most of the devices. This command will wipe off all the data from your device.

So on the first try, you may skip this command and execute the rest. However, if it doesn’t fix the issue, then consider using the fastboot -w command as well. With this, we conclude the guide on how to fix the bootloop issue in dual partition A/B Android devices. If you have any queries concerning the aforementioned steps, do let us know in the comments section below. We will get back to you with a solution at the earliest.


Share:
  • Hello ,

    I surely press A slot with twrp and then try to reboot back to system. Unfotunately now i have black screen / no more recovery mode pressing power vol+ / no more fastboot mode pressing power vol- / and my pc with SDK PTOOL always wait for my device / ADB can’t find my device i guess because of bootloop….i m stuck with a black screen and poor new ideas to fix my mi11… thanks for helping and congrats for your admirable job

  • thanks ‘ :error: no devices/emulators found…FAILED (remote: Partition should be flashed in fastbootd)… +…stuck in fastboot mode.’ I was falshing lineageOS sargo in pixel 3a ,the last step I hit” start “instead of” reboot” , got ( error boot repare)..after flowing your steps to flash stock firmware, got the partition problem,tried both fixes ,adding – and fastboot fastboot, still got partition d FAILED (remote: Partition should be flashed in fastbootd)

    $ fastboot reboot fastboot
    fastboot: usage: unknown reboot target fastboot
    $ fastboot reboot-bootloader
    rebooting into bootloader…
    OKAY [ 0.053s]

    rebooting…

    error: no devices/emulators found
    bill@bill-OptiPlex-790:~/Desktop/ADB_Fastboot$ fastboot reboot fastboot
    fastboot: usage: unknown reboot target fastboot
    bill@bill-OptiPlex-790:~/Desktop/ADB_Fastboot$ fastboot reboot-bootloader
    rebooting into bootloader…
    OKAY [ 0.052s]

    $ fastboot getvar current-slot
    current-slot: b
    finished. total time: 0.060s
    $ fastboot set_active a
    Setting current slot to ‘a’…
    OKAY [ 0.139s]
    finished. total time: 0.139s
    $ fastboot reboot
    rebooting…

    nothing worked till I changed to partition a …went back to stock… sargo, FYI did all without twrp or Majik,only lineageos microg recovery img. +sdk fastboot and ur flash commands. from site.. wondering if at the start just changing part. a would have solved original mistake and still had lineage microg still installed… either way ,have your site bookmarked… thanks Best regards Bill

    • Sadique Hassan

      Hi Bill, I suppose then the system.img file was flashed to SLOT A in the first place. hence your device wasn’t able to boot via Slot B. Glad that you figured it out! And thanks a lot for the appreciation