Xiaomi anti-rollback (ARB) is a protection that stops your phone from accepting firmware older than a stored index. Flash below that index and you can turn a working phone into one that will not boot. The check takes two minutes and needs only a PC and a USB cable. This guide shows how to read your device index, how to read the index inside a ROM, and how to decide whether a flash is safe.
What anti-rollback does
Android has a general idea called rollback protection: a phone refuses to boot software older than the newest version it has recorded, so an attacker cannot reinstall an old, vulnerable build. Google describes this in its Verified Boot documentation, with versions tracked per partition in tamper-evident storage.
Xiaomi’s ARB is a stricter layer on bootloader firmware. Your phone stores a number. Each ROM carries a number too. When you install firmware with a higher number, the stored value moves up. It does not move back down.
Three facts catch people out:
- The index only goes up. Once raised, it stays raised, including after a factory reset.
- Unlocking does not switch it off. An unlocked bootloader gives you the freedom to flash, not protection from ARB. Read our guide to bootloader unlock safety before you assume unlocking removes this risk.
- It is not tied to the Android version. A build with the same or a newer Android version number can still carry a different index, so you cannot judge safety from the version name alone.
When you need to check
You do not need to worry about ARB for normal over-the-air updates. Check it any time you plan to flash by hand, especially in these cases:
- Going back to an older HyperOS or MIUI build because you dislike an update.
- Moving between China ROM and Global ROM. A Global build can be older than the China build you are on, so its index can be lower. See how to tell China ROM from Global ROM first.
- Flashing a custom ROM or a firmware package from a third-party site.
- Restoring a used phone to the ROM it shipped with. The last owner may have updated past that point.
How to check your device index
You need Android platform-tools on a PC. The bootloader does not need to be unlocked for this check.
- Power off the phone, then hold Power and Volume Down until the Fastboot screen appears. Or run
adb reboot bootloaderif USB debugging is on. - Connect the phone to your PC with a data cable.
- Run
fastboot devicesand confirm the phone is listed. - Run
fastboot getvar anti.
The output looks like anti: 4, which means your device index is 4. If the anti line is empty, older guides say ARB is not enabled on that phone. The stock flash script also treats a blank value as 0.
Be careful with low numbers. Forum reports disagree on whether small values such as 1 count as active. Treat any number as active unless you have confirmed otherwise for your exact model. Most public guides date from the MIUI era, so a blank result on a new HyperOS device is a reason to check further, not proof that you are safe.
While you are in Fastboot, you can also confirm lock state. Our Xiaomi bootloader status guide covers the commands.
How to check the ROM index
The number you need sits inside the fastboot ROM package, the .tgz file you extract on your PC. Recovery ROMs in .zip format do not show it the same way, so download the fastboot version of the same build to read it.
- Extract the fastboot ROM.
- Open
flash_all.batin a text editor. - Find
CURRENT_ANTI_VER. Older packages show it asset CURRENT_ANTI_VER=4. Newer ones may read it fromimages\anti_version.txt, so open that file if it exists.
The stock script compares the two values before it writes anything. In a real Xiaomi script, such as this flash_all.bat for the Xiaomi Pad 5, the device value is read with fastboot getvar anti. If it is greater than the package value, the script prints “Antirollback check error” and stops.
Reading the result
| Device index vs ROM index | What it means | What to do |
|---|---|---|
| ROM higher | Allowed. Your stored index will go up after the flash. | Fine if the ROM matches your model. You cannot return to the old index afterwards. |
| Equal | Allowed. | Fine if the ROM matches your model. |
| ROM lower | Blocked or dangerous. | Do not flash. Pick a newer build. |
| Device blank, ROM has a number | Treated as allowed by the stock script. | The flash may activate ARB. Expect no way back to older builds. |
How phones actually get bricked
The stock fastboot script is the safety net. Most ARB bricks happen when something skips it:
- Custom recovery. Appuals reports that TWRP does not check the index, and that many bricks came from TWRP downgrades.
- Edited scripts. Guides online tell you to delete the anti-rollback lines from
flash_all.bat. This removes the warning, not the rule. We do not recommend it. - Mixed firmware. Flashing only some partitions from an older package can leave the phone unbootable, even when the rest of the system is newer.
- Repacked ROMs. Packages from unknown sites may have the check removed, and you cannot tell by looking at the file name.
The result is usually a phone that will not boot, often stuck on a black screen or dropped into Fastboot or EDL. If you are not sure what state yours is in, our soft brick vs hard brick guide helps you identify it. Unplug and stop flashing while you work it out, because repeated attempts rarely help.
Can an ARB brick be fixed?
Sources disagree, so be cautious with any promise. Older guides say it cannot be fixed at home by Mi Flash, TWRP or a new ROM, and that recovery needs EDL flashing with an authorized Xiaomi account or an authorized service center. Others call it a rollback enforcement failure rather than physical damage, which is why some phones do come back with correct firmware.
What decides the outcome is the exact model, the index, and which partitions were written. Do not pay for “ARB bypass” tools. If your phone is stuck, our remote Xiaomi unbrick services list supported models. Send us the model and what you flashed so we can tell you whether it is workable before you order.
A safe routine before any flash
- Run
fastboot getvar antiand write the number down. - Read the index from the fastboot ROM you plan to use.
- Confirm the ROM is for your exact codename and region.
- Back up your data. A flash usually wipes the phone.
- Use the stock
flash_allflow, and leave the checks in place. - If the ROM index is lower, stop and look for a newer build.
If you want Global software on a China phone without doing this yourself, see our Global ROM Xiaomi services. For unlocking first, the Xiaomi HyperOS bootloader unlock guide explains the current process, and the Xiaomi bootloader unlock services page lists supported phones.
FAQ
Does unlocking the bootloader disable Xiaomi anti-rollback?
No. ARB still applies on an unlocked Xiaomi phone. Unlocking only lets you flash images; the index rule stays.
Does a factory reset lower the ARB index?
No. The index is not stored with your user data, so wiping the phone does not change it.
Can I check ARB without a PC?
Not reliably. The standard method uses fastboot getvar anti, which needs a PC and platform-tools.
Does an OTA update raise the index?
It can. An update with a higher index raises the stored value, and you may not be told. That is why a phone can pass the check one month and fail it the next.
Is the check the same on OnePlus?
The idea is similar, but the tools differ. Android Authority reported in January 2026 that OnePlus had started adding ARB on some builds, so do not reuse Xiaomi steps on other brands.
Not sure whether a ROM is safe for your phone? Contact NCUnlock with your model, codename and the output of fastboot getvar anti, and we will check it with you before you flash.
Comments
0 comments