Flashing Stock MIUI to return device, it's under warranty


Moonx3

Members
1 Jun 2022
4
15
Hello,

To not waste time I'll get right to it, I unlocked bootloader, and use weekly Xiaomi.eu ROM, specifically 22.5.18 as of now, haven't upgraded to 22.5.25 as I want to go back to MIUI Global, then lock my bootloader, so I can return the phone and get refunded.

I talked with mi 11 AOSP development telegram group (bless them so far for the guidance), and they directed me to a ROM which I believe will be correct for me

Code:
(venus_eea_global_images_V13.0.4.0.SKBEUXM_20220217.0000.00_12.0_eea)

Now when I try to flash, I get the error "Antirollback error", which supposedly prevents rollback cause else it can brick my device, and this I do NOT want, really don't wanna contact an EDL service and pay 25$ :c so been really careful of what I do and want to make sure it's done properly.

Googling this issue and browsing this forum, by deleting these lines in the bat file

Code:
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *venus" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *venus" || exit /B 1

::check anti_version
if exist %~dp0images\anti_version.txt (for /f "delims==" %%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

Will remove the "check", but the thing is, some people bricked their device doing this, but some also not. Can any of you help me, will it be safe? My mi 11 came with global miui, then flashed to xiaomi eu weekly release. Maybe I am flashing the wrong version of ROM?

Model: M2011K2G
1654035074276.png
1654035102142.png
 
Last edited:
Uncheck first "clean all and lock" choose only "Clean all"

After it flashed try again to lock
 
Normally Xiaomi allows to root and modify ur device without loosing warranty
 
Uncheck first "clean all and lock" choose only "Clean all"

After it flashed try again to lock
I should first flash with "clean all", after successfully flashing, go back to the same step and flash again but then with lock option too this time? Double flashing?
 
Rename rom folder to a shorter name.
Make sure to avoid spaces in folder names
Example "C:/rom"

Then try flashing again
 
Rename rom folder to a shorter name.
Make sure to avoid spaces in folder names
Example "C:/rom"

Then try flashing again
I deleted the check lines, stuck at crc: 1
1654037795544.png

I will restore the bat file to its original content with the check and everything, rename folder and no spaces in the folder and try again!

By the way, is it safe to stop it at crc: 1?
 
I deleted the check lines, stuck at crc: 1

I will restore the bat file to its original content with the check and everything, rename folder and no spaces in the folder and try again!

By the way, is it safe to stop it at crc: 1?
Do not edit the flashing script.
Try to be patient a few more minutes
 
An update everyone, my MiFlash version was outdated, so the antirollback error & no such file or directory error was fixed by using an updated version! :3

The one I use right now: MiFlash 2021.8.13.0
The old one I used: MiFlash 2020.3.14.0
 
Last edited:
  • Like
Reactions: Coloeus and geoorg