Last updated: November 9, 2026. Anti-Rollback protection (ARB) stops a Xiaomi, Redmi or POCO phone from installing firmware older than a level stored on the device. If you are about to downgrade HyperOS, go back to MIUI or return to stock after a custom ROM, check two numbers first: the phone’s anti-rollback index and the index of the ROM you want to flash. It takes two minutes. Get it wrong and you can end up with a phone that only a service center can fix.
Need firmware for your phone? Find official HyperOS Recovery and Fastboot ROMs for Xiaomi, Redmi and POCO devices, for every region: Xiaomi firmware download.
What Anti-Rollback Is
Rollback protection is part of Android Verified Boot. Google’s Verified Boot documentation explains why: without it, an attacker could install an older, vulnerable Android build and use it to take over the device. The AVB README says every image carries a rollback index, and the device keeps the last index it accepted in tamper-evident storage. The device rejects any image whose index is lower than the stored one, and the stored value only goes up.
Xiaomi’s version is stricter. Under AVB, rollback checks are not required while the bootloader is unlocked. But XDA’s explainer points out that Xiaomi’s ARB stays active even after you unlock. Unlocking lets you flash, but it doesn’t lift the rule.
XDA describes three cases:
- ROM index higher than the phone’s: the flash is allowed, and the phone’s index rises to match. You can’t go back below the new value.
- Same index: the flash is allowed and nothing changes.
- ROM index lower: Fastboot and Mi Flash refuse it. Tools that skip the check, mainly TWRP and other custom recoveries, write it anyway, and that is where almost all ARB bricks came from.
Which Phones Are Affected?
ARB became a big problem in 2018. XDA reported that it was turned on for the Mi 8 from MIUI 10 China 8.9.6 and for the Redmi Note 5 Pro from MIUI 10 Global Beta 8.7.5. Many users bricked their phones by going back to MIUI 9 through TWRP. Igor Eisberg, lead developer of xiaomi.eu, wrote in December 2025 that, as far as the team knows, the only Xiaomi phones that actually used ARB were the Redmi Note 5, Redmi 6 Pro, Mi 6X and Mi Max 3. He also said other devices report index 1 by default and their ROMs carry the same value.
Long-time XDA helpers say the same about current phones, for example in this HyperOS 2 to HyperOS 1 thread for the Xiaomi 12 Pro. Still, the check is built into every official Fastboot ROM. XDA also warns that you can’t tell in advance when an update has raised the index. So “it’s probably fine on my model” is not a reason to skip the check. Always compare the numbers.
How to Check the Phone’s Anti-Rollback Index
- Install ADB & Fastboot (Platform Tools) on your PC.
- Turn the phone off, hold Power + Volume Down until the Fastboot screen appears, and connect it over USB. The bootloader can be locked or unlocked for this step.
- Run:
fastboot getvar anti
The output looks like this:
anti: 1
Finished. Total time: 0.000s
The number is the phone’s current index. Some phones, and some older bootloader builds, reply with nothing or with getvar:anti FAILED (remote: GetVar Variable Not found) (XDA example). Xiaomi’s flash script treats a blank reply as 0. Write the number down.
How to Check the ROM’s Index Before Flashing
The index you can rely on is in the Fastboot ROM (.tgz), not the Recovery ROM (.zip). Get the Fastboot ROM for your exact codename and region from our firmware hub, extract it with 7-Zip, and check:
- Current HyperOS and late MIUI ROMs: open
images\anti_version.txtin a text editor. It holds one number, the ROM’s index. xiaomi.eu’s lead developer confirms that this file holds the index, notflash_all.bat. - Older MIUI ROMs: open
flash_all.batand find the lineset CURRENT_ANTI_VER=. The number after the equals sign is the index (xiaomi.eu example).
In newer packages, CURRENT_ANTI_VER appears in flash_all.bat too. There the script only reads the real value from anti_version.txt, so a “0” you spot in the script doesn’t mean the ROM’s index is 0. The check in recent ROMs looks like this (quoted on XDA):
::check anti_version
if exist "%~dp0images\anti_version.txt" (for /f "usebackq" %%a in ("%~dp0images\anti_version.txt") do (set CURRENT_ANTI_VER=%%a))
if [%CURRENT_ANTI_VER%] EQU [] set CURRENT_ANTI_VER=0
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
if [%version%] EQU [] set version=0
set anticheck="antirollback check pass"
if %version% GTR %CURRENT_ANTI_VER% set anticheck="Current device antirollback version is greater than this pakcage"
echo %anticheck% | findstr /r /c:"pass" || @ECHO "Antirollback check error" && exit /B 1
The rule is simple. If the ROM’s index is equal to or higher than the phone’s, the flash can go ahead. If it is lower, don’t flash it with any tool.
If you only have a Recovery ROM, the community MIUI ARB Checker from Xiaomi Firmware Updater can guess the index from the xbl bootloader image. Its author warns this “can be inaccurate”, and xiaomi.eu developers have reported wrong results. Treat it as a rough hint and confirm with the Fastboot ROM of the same build.
“Current device antirollback version is greater than this package”
Mi Flash runs the ROM’s own flash_all*.bat script, and the error comes from the check above. In recent scripts, Xiaomi’s typo “pakcage” is part of the message, followed by Antirollback check error. It means the phone’s index is higher than the ROM’s. When this error appears, nothing has been flashed yet, so the phone is still fine.
How to fix it:
- Download a newer Fastboot ROM for the same device and region. Its index must be equal to or higher than the phone’s.
- Make sure you used the right package. A Fastboot ROM for another codename fails at the Missmatching image and device check before it reaches the ARB check.
- Don’t delete the anti-rollback lines from
flash_all.bat. Forum posts suggest it, but doing so only removes the warning, not the protection in the bootloader. If the check fails, the ROM really is lower than your phone allows.
How to Downgrade Safely (When It’s Possible)
Xiaomi’s own support FAQ says its phones “do not support rollback of the system”, so there is no official downgrade button. With an unlocked bootloader, you can still do a manual downgrade with a Fastboot ROM as long as the indexes allow it:
- Unlock the bootloader officially (see our HyperOS unlock guide). Fastboot flashing doesn’t work on a locked phone.
- Back up everything. A downgrade means a full wipe.
- Run
fastboot getvar antiand note the number. - Download the older Fastboot ROM for the same codename and region and read
images\anti_version.txt. - If the ROM’s number is lower, stop. That version is off-limits on this phone.
- If it is equal or higher, flash it with Mi Flash Tool using Clean all. Don’t use Save user data. Data from a newer version often causes bootloops on an older one.
- Don’t choose Clean all and lock for a downgrade. Let the phone boot once and confirm it works. A relocked phone that fails to boot can no longer be fixed through Fastboot.
Never downgrade stock firmware from TWRP or OrangeFox using an older Recovery ROM or firmware zip. Custom recoveries don’t check the index.
If the Phone Is Already ARB-Bricked
First, check what state the phone is in. If it still reaches the Fastboot screen, it isn’t an ARB hard brick. Flash a Fastboot ROM for your region whose index is equal to or higher than the phone’s, and it should recover.
A real ARB brick usually shows a black screen, with Windows only detecting the phone as Qualcomm HS-USB QDLoader 9008 (EDL mode). Flashing in EDL needs a programmer authorized by Xiaomi, which in practice means an authorized Mi account. XDA explains that Xiaomi locked down EDL, and the same applies to SP Flash Tool on MediaTek models. A normal Mi account gets “Unauthorized for this operation”.
The realistic options are:
- An authorized Xiaomi service center, which can reflash the phone in EDL. Expect to pay if you did the flashing yourself.
- Paid “authorized account” or “patched firehose” offers online. These work only for some models, and you’re handing your phone to strangers. Many offers are scams.
For driver setup and what to expect in 9008 mode, see our Qualcomm HS-USB QDLoader 9008 driver page.
FAQ
Does unlocking the bootloader disable anti-rollback?
No. On Xiaomi phones, ARB stays active after an official unlock. Unlocking only lets you flash images.
Does a factory reset lower the index?
No. Under AVB, the stored rollback index is kept in tamper-evident storage, not on the user data partition, so wiping data doesn’t change it.
My phone and the ROM both show 1. Is the downgrade safe?
The anti-rollback check will pass. You still need the correct codename and region, the Clean all mode, and an unlocked bootloader that you leave unlocked until the phone boots.
Can I check the index from a Recovery ROM (.zip)?
Not reliably. The ARB checker’s xbl method is only a guess. Download the Fastboot ROM of the same build and read anti_version.txt.
