[FAQ][Anti-Rollback] All your questions are answered here.

Search This thread

Saabu

Senior Member
Aug 28, 2016
100
430
Rohtak, Haryana
Hi all.
So, as we know with recent MIUI update Xiaomi screwed our whyred. And this gave birth to many questions which is like a struggle for many users to find all those answers. So, I tried to answer all your questions. If you think your question isn't included please feel free to ask.



Q1: What is this "Anti-Rollback" thing?
A: Its a security measure that Google brought with the release of Android Oreo. It makes sure that your data is secure even when phone is stolen or if any attacker tries to downgrade the software and wants to gain control over your data.



Q2: How is this harmful to my device?
A: Well, as a security measure it should never give you a hard-brick. When someone tries to downgrade, it should display a warning and get turned off but there's difference between how things should work and how Xiaomi does. As Google has stated, "Anti-Rollback" should get automatically turn off when the user unlocks the bootloader but in case of MIUI even unlocked users are getting hard-bricks. Hopefully the developers of MIUI should push an update soon and if they don't, our beloved devs will find a way for sure :)



Q4: So, what now? Will Xiaomi solve this issue?
A: We do not know. But our beloved developers in the XDA-Forum will find a way for sure :)



Q5: How to know if my device is affected by it?
A: Run fastboot command :
Code:
fastboot getvar anti
The displayed output : 3 shall mean you're fine while 4 shall mean you're in the Anti-Rollback squad.



Q6: I'm in the Anti-Rollback squad what now?
A: Don't worry you can still flash custom recovery and roam around custom ROMs but avoid flashing any firmware or any MIUI ROM which is older than what you're using now otherwise you'll brick your device.



Q7: Which MIUI builds include "Anti-Rollback"?
A: All the MIUI builds which are released after Stable MIUI V9.5.17.0 and Beta MIUI V8.7.5 include "Anti-Rollback". And yes the Chinese versions are affected as well.



Q8: Do MIUI Stable V9.5.17.0 and Beta V8.7.5 have "Anti-Rollback" enabled?
A: NO. If you're on either of these builds you are safe to downgrade and use any older version.



Q9: How to flash custom recovery and custom ROMs on "Anti-Rollback" enabled devices?
A: On "Anti-Rollback" enabled ROMs you cann't flash custom recovery permanently. You'll have to boot into recovery first by running fastboot command:
Code:
 fastboot boot xyz.img
(where xyz is name of your recovery file). Once you're booted into the custom recovery, copy the recovery image file in the internal storage and flash that recovery from recovery itself. Now you've successfully flashed custom recovery and you're good to go with custom ROMs. WARNING: Avoid flashing any firmware.



Q10: Can I migrate from Stable to Beta and vice-versa?
A: You can install Beta from Stable, make sure you flash latest Beta build same is the case with Stable. If you're on anti-4 firmware, whether its Beta or Stable you can switch to any anti-4 MIUI ROM Beta or Stable but remember you must flash latest version available while switching. (anti-4 means "Anti-Rollback" enabled firmware)



Q11: Can I unlock bootloader and flash custom ROMs on an "Anti-Rollback" enabled device?
A: Yes. Again to flash custom ROMs and recovery refer to Q9.




Q12Can I flash "Anti-Rollback" enabled ROM via TWRP?
AWell, in some cases it did work, just flash lazy flasher zip file after flashing MIUI ROM via TWRP. But while switching to MIUI from AOSP based ROMs on an "Anti-Rollback " enabled device I recommend you to go with fastboot method to avoid chances of brick.





For active discussion join whyred telegram group: https://t.me/redminote5proofficial
Hit thanks if helped.
 
Last edited:

napes22

Senior Member
May 16, 2008
529
99

Q9: How to flash custom recovery and custom ROMs on "Anti-Rollback" enabled devices?
A: On "Anti-Rollback" enabled ROMs you cann't flash custom recovery permanently. You'll have to boot into recovery first
by running fastboot command:
Code:
 fastboot boot xyz.img
(where xyz is name of your recovery file). Once
you're booted into the custom recovery, copy the recovery image file in the internal storage and flash that recovery
from recovery itself. Now you've successfully flashed custom recovery and you're good to go with custom ROMs.
WARNING: Avoid flashing any firmware.


Thanks for the above, but I believe that #9 is true. All MIUI roms regardless of version and anti roll back protection willl reflash the default MIUI recovery when you boot the OS. The only way to get it to stay is by flashing a custom ROM after TWRP, or by obtaining root and removing the "/system/bin/install-recovery.sh" file. If you're on anti-rollback you won't even be able to flash the recovery - you'll get an anti-rollback protection error.
 

ThePatry

New member
Jul 14, 2018
1
0
For the Fastboot Command : fastboot getvar anti , I have : Anti:1 .. What does means ?

When you says "avoid flashing any firmware or any MIUI ROM which is older than what you're using now." , So Imagine if I have MIUI 10 Official with Android 8.1 and I Would like to flash like Xiaomi.eu or Lineage OS with Android 8.0 , The phone will brick ?

If I want to Flash Mod with TWRP Flashable Zip , the phone will brick or not ?

Thanks for your FAQ !
 
Last edited:

kunal bro

Senior Member
Apr 27, 2016
57
4
For me when i type fastboot devices it shows my device number but when i type this command fastboot getvar anti it shows nothing please help and im using Redmi note 5 vince version and miui version is 9.6.2.0 global stable.
 

BiosCZ

Member
Feb 22, 2016
11
1
20
Vrchlabí
For me when i type fastboot devices it shows my device number but when i type this command fastboot getvar anti it shows nothing please help and im using Redmi note 5 vince version and miui version is 9.6.2.0 global stable.

You answered yourself... It is ONLY for Redmi Note 5 (Pro) aka whyred! You are even in wrong device forum!
 

Saabu

Senior Member
Aug 28, 2016
100
430
Rohtak, Haryana
One doubt..... I am on AOSP right now. If I flash global beta 8.7.12 in twrp and then flash lazyflasher, will my twrp be removed !! Will I be able to go back to AOSP ?? @Saabu


After you flash a ROM that has Anti-Rollback enabled, you can still switch to AOSP anytime as I discussed in Q9. And yes, flashing lazy flasher simultaneously after MIUI will keep your TWRP.
Happy flashing :)
 
  • Like
Reactions: DEBASISH

Jorge Moreira

Senior Member
Dec 24, 2010
308
123
Porto


Q5: How to know if my device is affected by it?
A: Run fastboot command :
Code:
fastboot getvar anti
The displayed output : 3 shall mean you're fine while 4 shall mean you're in the Anti-Rollback squad.

Hi, @Saabu,

Many thanks for the clarification.

However to enter the code through the fastboot, it has to be with the equipment turned off in fastboot mode, right?

Best regards,
Jorge
 
Jun 20, 2018
6
0
I am a little concern about all this anti rollback matter...

well, the point is i am in xiaomi.eu rom, 8.6.28 (miui 10). I have checked the "anti" variable via the "fastboot getvar anti", and return 3.
Now, I would like to downgrade to miui 9 via twrp, and since I have "the 3 value" I understand that I can downgrade without any trouble, rigth?

However, I have found this https://xiaomi.eu/community/threads/antiroll-back.44975/
Here a guy have tried somehing similar and...briked phone.

What do I do now? Flash? i stay in a rom version that i dont like?

Thanks for your answers
 

Saabu

Senior Member
Aug 28, 2016
100
430
Rohtak, Haryana
I am a little concern about all this anti rollback matter...

well, the point is i am in xiaomi.eu rom, 8.6.28 (miui 10). I have checked the "anti" variable via the "fastboot getvar anti", and return 3.
Now, I would like to downgrade to miui 9 via twrp, and since I have "the 3 value" I understand that I can downgrade without any trouble, rigth?

However, I have found this https://xiaomi.eu/community/threads/antiroll-back.44975/
Here a guy have tried somehing similar and...briked phone.

What do I do now? Flash? i stay in a rom version that i dont like?

Thanks for your answers



You can flash any MIUI 9 with anti 3 via TWRP. Dont flash the ROMs with anti 4 via TWRP. Last MIUI ROMs with anti-3 were: Stable MIUI V9.5.17.0 and Beta MIUI V8.7.5.
 
  • Like
Reactions: Dr.NHTT

kiran G.

Senior Member
Jul 23, 2016
879
83
Redmi K20 Pro
Hi all.
So, as we know with recent MIUI update Xiaomi screwed our whyred. And this gave birth to many questions which is like a struggle for many users to find all those answers. So, I tried to answer all your questions. If you think your question isn't included please feel free to ask.


Q1: What is this "Anti-Rollback" thing?
A: Its a security measure that Google brought with the release of Android Oreo. It makes sure that your data is secure even when phone is stolen or if any attacker tries to downgrade the software and wants to gain control over your data.



Q2: How is this harmful to my device?
A: Well, as a security measure it should never give you a hard-brick. When someone tries to downgrade, it should display a warning and get turned off but there's difference between how things should work and how Xiaomi does. As Google has stated, "Anti-Rollback" should automatically turn off when the user unlocks the bootloader but in case of MIUI even unlocked users are getting hard-bricks. Hopefully the developers of MIUI should push an update soon and if they don't, our beloved devs will find a way for sure :)



Q4: So, what now? Will Xiaomi solve this issue?
A: We do not know. But our beloved developers in the XDA-Forum will find a way for sure :)



Q5: How to know if my device is affected by it?
A: Run fastboot command : The displayed output : 3 shall mean you're fine while 4 shall mean you're in the Anti-Rollback squad.



Q6: I'm in the Anti-Rollback squad what now?
A: Don't worry you can still flash custom recovery and roam around custom ROMs but avoid flashing any firmware or any MIUI ROM which is older than what you're using now. Remember you cann't flash MIUI Stable over Beta otherwise you'll brick your device.



Q7: Which MIUI builds include "Anti-Rollback"?
A: All the MIUI builds which are released after Stable MIUI V9.5.17.0 and Beta MIUI V8.7.5 include "Anti-Rollback". And yes the Chinese versions are affected as well.



Q8: Do MIUI Stable V9.5.17.0 and Beta V8.7.5 have "Anti-Rollback" enabled?
A: NO. If you're on either of these builds you are safe to downgrade and use any older version.



Q9: How to flash custom recovery and custom ROMs on "Anti-Rollback" enabled devices?
A: On "Anti-Rollback" enabled ROMs you cann't flash custom recovery permanently. You'll have to boot into recovery first by running fastboot command: (where xyz is name of your recovery file). Once you're booted into the custom recovery, copy the recovery image file in the internal storage and flash that recovery from recovery itself. Now you've successfully flashed custom recovery and you're good to go with custom ROMs. WARNING: Avoid flashing any firmware.



Q10: Can I migrate from Stable to Beta and vice-versa?
A: You can install Beta from Stable and make sure you flash latest Beta build but installing Stable over Beta isn't possible yet.



Q11: Can I unlock bootloader and flash custom ROMs on an "Anti-Rollback" enabled device?
A: Yes. Again to flash custom ROMs and recovery refer to Q9.




For active discussion join whyred telegram group: https://t.me/redminote5proofficial
Hit thanks if helped.
Deleted
 
Last edited:

TM147

Member
Jul 21, 2018
10
1
When updating to LOS/AOSP based rom, its installer does not include firmware update. So you gonna have the same anti value after flashing it. Btw, check their official thread, they have clear installation instructions now.

Thanks. but now i have some more question. Sorry this ARB Think is :mad:
Which official thread did you mean ? I found the official installation guide but i can't read anythink about devices with ARB4
... sorry can't post the link to LOS

Another thing that makes me thoughtful is Q2 in the beginning. "As Google has stated, "Anti-Rollback" should automatically turn off when the user unlocks the bootloader but in case of MIUI even unlocked users are getting hard-bricks."
So unlocking the bootloader is essential for flashing a custom recovery. What can/ must i do if i have a ARB4 Device to install TWRP ? On the TWRP side i can't read anything about this problem
.. sory can't post the link to TWRP

So please help me because i don't want to brick my device :eek:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    Hi all.
    So, as we know with recent MIUI update Xiaomi screwed our whyred. And this gave birth to many questions which is like a struggle for many users to find all those answers. So, I tried to answer all your questions. If you think your question isn't included please feel free to ask.



    Q1: What is this "Anti-Rollback" thing?
    A: Its a security measure that Google brought with the release of Android Oreo. It makes sure that your data is secure even when phone is stolen or if any attacker tries to downgrade the software and wants to gain control over your data.



    Q2: How is this harmful to my device?
    A: Well, as a security measure it should never give you a hard-brick. When someone tries to downgrade, it should display a warning and get turned off but there's difference between how things should work and how Xiaomi does. As Google has stated, "Anti-Rollback" should get automatically turn off when the user unlocks the bootloader but in case of MIUI even unlocked users are getting hard-bricks. Hopefully the developers of MIUI should push an update soon and if they don't, our beloved devs will find a way for sure :)



    Q4: So, what now? Will Xiaomi solve this issue?
    A: We do not know. But our beloved developers in the XDA-Forum will find a way for sure :)



    Q5: How to know if my device is affected by it?
    A: Run fastboot command :
    Code:
    fastboot getvar anti
    The displayed output : 3 shall mean you're fine while 4 shall mean you're in the Anti-Rollback squad.



    Q6: I'm in the Anti-Rollback squad what now?
    A: Don't worry you can still flash custom recovery and roam around custom ROMs but avoid flashing any firmware or any MIUI ROM which is older than what you're using now otherwise you'll brick your device.



    Q7: Which MIUI builds include "Anti-Rollback"?
    A: All the MIUI builds which are released after Stable MIUI V9.5.17.0 and Beta MIUI V8.7.5 include "Anti-Rollback". And yes the Chinese versions are affected as well.



    Q8: Do MIUI Stable V9.5.17.0 and Beta V8.7.5 have "Anti-Rollback" enabled?
    A: NO. If you're on either of these builds you are safe to downgrade and use any older version.



    Q9: How to flash custom recovery and custom ROMs on "Anti-Rollback" enabled devices?
    A: On "Anti-Rollback" enabled ROMs you cann't flash custom recovery permanently. You'll have to boot into recovery first by running fastboot command:
    Code:
     fastboot boot xyz.img
    (where xyz is name of your recovery file). Once you're booted into the custom recovery, copy the recovery image file in the internal storage and flash that recovery from recovery itself. Now you've successfully flashed custom recovery and you're good to go with custom ROMs. WARNING: Avoid flashing any firmware.



    Q10: Can I migrate from Stable to Beta and vice-versa?
    A: You can install Beta from Stable, make sure you flash latest Beta build same is the case with Stable. If you're on anti-4 firmware, whether its Beta or Stable you can switch to any anti-4 MIUI ROM Beta or Stable but remember you must flash latest version available while switching. (anti-4 means "Anti-Rollback" enabled firmware)



    Q11: Can I unlock bootloader and flash custom ROMs on an "Anti-Rollback" enabled device?
    A: Yes. Again to flash custom ROMs and recovery refer to Q9.




    Q12Can I flash "Anti-Rollback" enabled ROM via TWRP?
    AWell, in some cases it did work, just flash lazy flasher zip file after flashing MIUI ROM via TWRP. But while switching to MIUI from AOSP based ROMs on an "Anti-Rollback " enabled device I recommend you to go with fastboot method to avoid chances of brick.





    For active discussion join whyred telegram group: https://t.me/redminote5proofficial
    Hit thanks if helped.
    2
    Currently I am on Miui 10.2.1 in Redmi Note 5 Pro India
    So Can I Install Any Miui 9 Rom with Updater App?
    :)

    No, only 9.5 and above.

    Example ... I was at MIUI 10 and now I have the AospExtended ROM. Can I flash MIUI 10? Can I only flash 10+, never shorter than that (9.5 for example)? If I have made a backup before (MIUI 10) can I downgrade via TWRP to return from AOSP to MIUI 10?
    1- yes
    2-yes
    3-yes but be careful with that.



    Guys, read before posting, most of the recent questions are already answered or obvious.
    2
    i have a question for my understanding. for example i want to install LOS 15.1. Where do i know if LOS uses ARB 3 or 4 ?

    When updating to LOS/AOSP based rom, its installer does not include firmware update. So you gonna have the same anti value after flashing it. Btw, check their official thread, they have clear installation instructions now.
    2
    Just got my n5 today. Am waiting the obligatory 360 hours now. I'm on 9.5.13 Can I update OTA to 9.5.19 or 10 beta without facing problems with custom to a later?
    Custom rom will never brick your phone, only dwngrading miui roms after you have upgraded to miui 9.5.19 and later (global stable) or miui roms greater than miui 8.7.5 (global developer) will..
    1
    One doubt..... I am on AOSP right now. If I flash global beta 8.7.12 in twrp and then flash lazyflasher, will my twrp be removed !! Will I be able to go back to AOSP ?? @Saabu


    After you flash a ROM that has Anti-Rollback enabled, you can still switch to AOSP anytime as I discussed in Q9. And yes, flashing lazy flasher simultaneously after MIUI will keep your TWRP.
    Happy flashing :)