• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Question (SOLVED) Please help! Device Locked After testing Android 12 even though MiFlash says its Unlocked.

Search This thread

rageyoudown

Senior Member
Dec 14, 2013
76
26
Xiaomi Poco F3
Hello all,

Hoping for some help or insight. I flashed a Android 12 build and quickly reverted back to stock before trying to flash a ROM. I'm having trouble flashing anything because it says my device is locked. I tried to lock then unlock the device using MiFlash but ROMs still say my device is locked. I also tried toggling the "OEM Unlocking" in developer options also.

When attempting to install a fastboot rom it says "Command is not allowed on locked devices"

MiFlash shows bootloader unlocked
Xiaomi ADB/Fastboot tools shows unlocked but when I click unlock on the fastboot tab it says token invalid

Any recommendations would be appreciated!
 
Last edited:

Animesh Singh

Senior Member
Mar 17, 2014
237
67
29
kathmandu
www.facebook.com
Xiaomi Poco F3
Hello all,

Hoping for some help or insight. I flashed a Android 12 build and quickly reverted back to stock before trying to flash a ROM. I'm having trouble flashing anything because it says my device is locked. I tried to lock then unlock the device using MiFlash but ROMs still say my device is locked. I also tried toggling the "OEM Unlocking" in developer options also.

When attempting to install a fastboot rom it says "Command is not allowed on locked devices"

MiFlash shows bootloader unlocked
Xiaomi ADB/Fastboot tools shows unlocked but when I click unlock on the fastboot tab it says token invalid

Any recommendations would be appreciated!
Did you choose Clean all And Lock while flashing on MiFlash tool?
 

rageyoudown

Senior Member
Dec 14, 2013
76
26
Xiaomi Poco F3
Did you choose Clean all And Lock while flashing on MiFlash tool?
When I try to select the ROM folder it does not find any ROM... Are you talking about XiaomiADBFastbootTools?

Also on the MiFlash Tool what am I supposed to select? It asked for a flash script.


*EDIT* Found the stock firmware, will try to clean all and lock with MiFlashTool
 
Last edited:

Animesh Singh

Senior Member
Mar 17, 2014
237
67
29
kathmandu
www.facebook.com
Xiaomi Poco F3
When I try to select the ROM folder it does not find any ROM... Are you talking about XiaomiADBFastbootTools?

Also on the MiFlash Tool what am I supposed to select? It asked for a flash script.


*EDIT* Found the stock firmware, will try to clean all and lock with MiFlashTool
Copy the full path of the Stock ROM like i did and paste it to your miflash directory and choose Clean All on lower right of MiFlash.
Also, If you lock your device and HardBrick it, You wont be able to flash anything. So i suggest you to Only use FLASH ALL option on MiFlash
unknown_2021.08.02-00.38.png
this way.PNG
 
Last edited:

rageyoudown

Senior Member
Dec 14, 2013
76
26
Xiaomi Poco F3
Copy the full path of the Stock ROM like i did and paste it to your miflash directory and choose Clean All on lower right of MiFlash.
Also, If you lock your device and HardBrick it, You wont be able to flash anything. So i suggest you to Only use FLASH ALL option on MiFlash
View attachment 5375687View attachment 5375689
I figured out the script before seeing your post and I'm in the process of doing a clean all and lock since I thought you implied to do that in your initial post.. Hope it doesn't brick
 

Animesh Singh

Senior Member
Mar 17, 2014
237
67
29
kathmandu
www.facebook.com
Xiaomi Poco F3
I figured out the script before seeing your post and I'm in the process of doing a clean all and lock since I thought you implied to do that in your initial post.. Hope it doesn't brick
oh. Now you'll be stuck to Stock ROM for quite some time now :D Just remember to not use Clean All And Lock if you plan to Use Custom ROMs often.
 

rageyoudown

Senior Member
Dec 14, 2013
76
26
Xiaomi Poco F3
So when I'm attempting to run the script it doesn't finish all the way.. It gets to sending spare 'super' 7/9 then fails with the error "failed to check sparse crc"

*EDIT* solved this by changing two lines in the install script

REM fastboot %* flash crclist %~dp0images\crclist.txt || @ECHO "Flash crclist error" && exit /B 1
REM fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @ECHO "Flash sparsecrclist error" && exit /B 1

Needed to add REM in the front of both lines.

*EDIT 2*

Script Finished but resulted in the device bootlooping over and over... (n):cautious:

*EDIT 3*

Still able to get to fastboot and flash stock image, which doesn't make since because even the stock global 12.5.2 probably needs unlocked bootloader. (tested locking the device and flashing 12.5.2 and it does indeed need an unlocked bootloader).

Tried doing flash all and lock script which also puts the device in a bootloop. Re-unlocked the bootloader. Able to flash global 12.5.2

Still doesn't make sense why I can't flash custom roms and I can flash stock global 12.5.2
 
Last edited:

rageyoudown

Senior Member
Dec 14, 2013
76
26
Xiaomi Poco F3
I am able to flash certain ROMS like MiuiMix assumingly because its MIUI based... but still not able to flash Custom ROMS. I'm guessing the Pixel Android 12 build I tried out flashed over some of the vendor images but even returning to OEM firmware they aren't being re-flashed
 

rageyoudown

Senior Member
Dec 14, 2013
76
26
Xiaomi Poco F3
The following helped me when reverting to A11 from A12

Instructions on reverting to Android 11:
Download:
(1) MiFlash20210226
(2) alioth_global_images_V12.5.2.0.RKHMIXM_20210625.0000.00_11.0_global_10b1725c87
(3) Flash_all1.bat (attached to post change to .bat file extension.

Instructions:
Extract all - Place ROM folder into MiFlash directory - Place Flash_all1.bat into ROM directory

Reboot device to fastboot - Open MiFlash and select the ROM path inside the MiFlash folder - Refresh to see device listed - On bottom right corner change blank field to Flash_all1.bat script - Lastly initiate flash

*This wipes all data and returns phone to 12.5.2 global*
 

Attachments

  • flash_all1.txt
    3.5 KB · Views: 16

Animesh Singh

Senior Member
Mar 17, 2014
237
67
29
kathmandu
www.facebook.com
Xiaomi Poco F3
The following helped me when reverting to A11 from A12

Instructions on reverting to Android 11:
Download:
(1) MiFlash20210226
(2) alioth_global_images_V12.5.2.0.RKHMIXM_20210625.0000.00_11.0_global_10b1725c87
(3) Flash_all1.bat (attached to post change to .bat file extension.

Instructions:
Extract all - Place ROM folder into MiFlash directory - Place Flash_all1.bat into ROM directory

Reboot device to fastboot - Open MiFlash and select the ROM path inside the MiFlash folder - Refresh to see device listed - On bottom right corner change blank field to Flash_all1.bat script - Lastly initiate flash

*This wipes all data and returns phone to 12.5.2 global*
Good to see you did it.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    The following helped me when reverting to A11 from A12

    Instructions on reverting to Android 11:
    Download:
    (1) MiFlash20210226
    (2) alioth_global_images_V12.5.2.0.RKHMIXM_20210625.0000.00_11.0_global_10b1725c87
    (3) Flash_all1.bat (attached to post change to .bat file extension.

    Instructions:
    Extract all - Place ROM folder into MiFlash directory - Place Flash_all1.bat into ROM directory

    Reboot device to fastboot - Open MiFlash and select the ROM path inside the MiFlash folder - Refresh to see device listed - On bottom right corner change blank field to Flash_all1.bat script - Lastly initiate flash

    *This wipes all data and returns phone to 12.5.2 global*