Home > Xiaomi

How to Check Xiaomi Anti Rollback Index and Prevent Brick

In this guide, we will show you the steps to check the Anti Rollback [ARB] Index on your Xiaomi device and prevent it from getting bricked. A few years back, the Chinese OEM rolled out the MIUI 10 Global Beta 8.7.5, and with that, all hell broke loose for tech enthusiasts. Alongside that update, the company had also silently implemented the ARB mechanism without informing the end users. 

Since we were unaware of this, many of us ended up performing a downgrade for carrying out a specific tweak, resulting in a hard-bricked device. Yes, it’s not a soft brick, you cannot recover it by flashing the Recovery ROM via TWRP/OrangeFox or Fastboot ROM via Mi Flash Tool. The device will go into an Emergency Download Mode and only the users with an authorized Mi account were in a position to unbrick their device.

for the unaware, Gooogle had first introduced ARB with Android 8 and had made it compulsory for all Android devices with Android 9, however, this ARB will be removed once you unlock the device’s bootloader. But unfortunately, that isn’t the case with Xiaomi. even after unlocking the bootloader via Mi Unlock Tool, the ARB Protection stays intact and there’s ongoing back.

So while we cannot escape rollback, we could definitely be on the right side of the fence by checking the Anti Rollback Index of our Xiaomi device and then flashing accordingly to prevent brick. Here’s how all of this could be carried out.

How Does Xiaomi’s Anti Rollback Index Work

First off, it is extremely important to understand exactly how Xiaomi’s Anti Rollback works. In this regard, you should keep in mind that Verified Boot has a rollback index which is compared with the rollback index of the ROM that you are about to flash.

  • If the current rollback index on your device is less than the rollback index in the ROM to be flashed, then the ROM will be flashed without any issues and the current rollback index will be increased to match the new rollback index [of the just flashed ROM].
  • If the current rollback index on your device is equal to the rollback index in the ROM to be flashed, then the ROM will be flashed and there will be no change in the rollback index.
  • If the current rollback index is greater than the rollback index in the ROM to be flashed, then the ROM will be rejected. But this will only happen if you’re flashing via fastboot or Mi Flash. However, if you are flashing the ROM via TWRP, then it will straightaway start the flashing process [as most TWRP builds don’t come with ARB check] and ultimately brick your device.

Now that you are aware of the three cases, let’s show you the steps to check the Anti Rollback [ARB] Index on your Xiaomi device. Likewise, we will also be sharing a few examples so that it becomes easier to understand each of the three aforementioned cases.

How to Check Xiaomi Anti Rollback Index

STEP 1: Install Android SDK Platform Tools

mi flash tool fastboot rom

First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform tools folder, which will be used throughout this guide.

STEP 2: Download Mi Flash Tool

Next up, grab hold of the Mi Flash Tool from here. We will be using this tool to go back to Stock MIUI from the current custom ROM. Once you have downloaded the tool, extract it to any convenient location on your PC.

Xiaomi Anti Rollback Index

STEP 3: Download and Extract Fastboot ROM

You may now download the Fastboot ROM corresponding to your device from the official site or third-party site of your choice [such as Xiaomi Firmware Updater]. The firmware will be downloaded in TGZ format, so you will have to extract like using an archive utility app like 7ZIP. Here’s how it could be done:

  1. To begin with, download and install the 7ZIP software on your PC.
  2. Then right-click on the Fastboot ROM TGZ file and select Open With> 7-ZIP File Manager.Xiaomi Anti Rollback Index
  3. Once the extraction is complete, you will get another file in TAR format.Xiaomi Anti Rollback Index
  4. So right-click on the TAR file and select 7ZIP > Extract Here.Xiaomi Anti Rollback Index
  5. You will now get all the extracted firmware files, with the partition files present in the Images folder.Xiaomi Anti Rollback Index

STEP 4: Boot the Device to Fastboot Mode

Generally, you could boot your device to Fastboot Mode via the adb reboot bootloader command. But since your device is currently bricked, you wouldn’t be able to execute this command [as you can not enable USB Debugging]. Therefore, you will have to take the help of hardware key combinations to get this job done. So power off your device. Then press and hold the Power and Volume down keys for a few seconds and your device will subsequently boot to the Fastboot Mode.

Xiaomi Anti Rollback Index

STEP 5: Verify Fastboot Mode

Now that your device is now booted to the Fastboot Mode, let’s verify if your PC is able to identify the device in this mode or not.

  1. Type in the below command in the CMD window which is opened in the platform-tools folder.
    fastboot devices

    Xiaomi Anti Rollback Index

  2. If you are getting a device ID [see above image], then you are good to go ahead.
  3. However, if you are not getting any serial ID, then install the Fastboot Drivers on your PC.

STEP 6: Find Anti Rollback Index of your Xiaomi Device

  1. To begin with, execute the below command in CMD to get your current Anti Rollback Index:
    fastboot getvar anti

    Xiaomi Anti Rollback Index

  2. If you don’t get any value [nil], then Anti Rollback is not implemented on your Xiaomi device.
  3. On the other hand, if you get a numerical value, then that is your device’s Anti Rollback Index.
  4. As you could see from the above screenshot, the Anti Rollback Index is 1 for my device.

STEP 7: Find Anti Rollback Index of Xiaomi Fastboot ROM

  1. To begin with, download and install a text editor app like Notepad++.
  2. Then go to the extracted Fastboot ROM’s Images folder.
  3. Now right-click on the flash_all.bat file and select Open with > Notepad++.
  4. Then use Ctrl+F and search for a similar line in the file [where X will be a number]
    set CURRENT_ANTI_VER=X

    Xiaomi Anti Rollback Index

  5. Now refer to the numerical value next to the “equals to” sign.
  6. That will be the Anti Rollback Index for your Fastboot ROM.

How to Prevent Brick via Anti Rollback Index

Now that you are aware of your device’s current Anti Rollback index [STEP 6 above] and the Fastboot ROM’s Anti Rollback Index [STEP 7 above] as well as three rules regarding how ARB index works [under the How Does Xiaomi’s Anti Rollback Index Work section], let’s now put all these three theories to the test and show you the steps to prevent bricking your device due to ARB.

  • If the Rollback Index of the Fastboot ROM that you are about to flash is equal to or greater than the current rollback index of your device, then you could flash that ROM via Mi Flash, Fastboot, or TWRP.
  • If the Rollback Index of the Fastboot ROM is less than your current rollback index, then you should not flash that ROM via any method [Mi Flash or Fastboot might not even let you flash in the first place!].

How to Bypass Xiaomi Anti RollBack and Perform Downgrade

Bypassing the Anti Rollback Check is a possibility but it’s quite a risk one and there are high chances that your device could end up in a hard-bricked state. Still, if you wish to try it out, then do refer to our below linked guide:

How to Bypass Xiaomi Anti Rollback and Perform a Downgrade

My Scenario

I performed this test on my Poco F4 running the latest Android 13 [MIUI 14]. For testing purposes, I downloaded the Android 12 Fastboot ROM [MIUI 13].  As is evident from the above screenshots, my device has Anti Rollback Index version 1 whereas the Fastboot ROM that I’m using has Anti Rollback Index 0. Since the Anti Rollback Index of my ROM [0] is less than the current rollback index of my device [1], I cannot flash the Fastboot ROM. Hence I cannot downgrade from Android 13 to Android 12 🙁


So on that note, were round off this guide on how you could check the Anti Rollback [ARB] Index on your Xiaomi device and prevent it from getting bricked. 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.


Share:
  • What do the values of ARI 1 and 2 mean? What do ARI values 0 and 3 mean?
    Does 3 mean arb is NOT activated for all releases of MIUI/Xiaomi phones? I’ve installed a custom ROM and the ARI is 1. The MIUI stock ROM has an ARI of 0. Technically, that custom ROM cannot install stock MIUI because it is a lower ARI. Is this accurate? If the issue is only with a ROM version of MIUI that is LOWER than the latest, does this issue not matter if you select the very-latest ROM numbered version of MIUI to reinstall at any time?