Hi,
I desperately need help. I have a Xiaomi Mi5. My problem is the following. I have previously unlocked the bootloader using the code sent by Miui and have installed Lineage OS on my phone, which worked perfectly. The other day I had an idea that locking the bootloader would allow me to use Android Pay apps (currently not allowed with an unlocked bootloader) so I used the commands:
fastboot oem lock,
fastboot flashing lock,
fastboot oem relock,
As a result, my device is now locked but it won't start. I do realise that I need to reflash the ROM but I cannot unlock the phone. As I cannot start the phone I also cannot access the developer setttings in the phone and therefore I cannot put it in debugging mode.
The device is recognised when it's in fastboot mode and when I use adb command: fastboot oem unlock, I get the response "token verification failed". I have also tried to flahs the TWRP.img but I get the same message that the phone is locked. I have tried to use the Miflash unlock tool again but when I try to sign in I get "network error". I have seen somewhere in the forum that it's because the MI account no longer recognises my phone (as it now only has Lineage installed).
Can anyone help?
With miflash try to flash a china developer, then unlock bootloader, and finally flash twrp
Inviato dal mio MI 5 utilizzando Tapatalk
Laverick74 said:
With miflash try to flash a china developer, then unlock bootloader, and finally flash twrp
Inviato dal mio MI 5 utilizzando Tapatalk
Click to expand...
Click to collapse
Thanks, I tried this but I get the same response: FAILED (the device is locked)
Try updating via Mi Suit.
http://en.miui.com/thread-279195-1-1.html
Warning: Pls don't attempt to lock your bootloaders with TWRP or any custom recovery's installed. It might just result in an unrecovereable hard brick. Bootloaders should always be locked with stock recoveries.
SwedieK said:
Hi,
I desperately need help. I have a Xiaomi Mi5. My problem is the following. I have previously unlocked the bootloader using the code sent by Miui and have installed Lineage OS on my phone, which worked perfectly. The other day I had an idea that locking the bootloader would allow me to use Android Pay apps (currently not allowed with an unlocked bootloader) so I used the commands:
fastboot oem lock,
fastboot flashing lock,
fastboot oem relock,
As a result, my device is now locked but it won't start. I do realise that I need to reflash the ROM but I cannot unlock the phone. As I cannot start the phone I also cannot access the developer setttings in the phone and therefore I cannot put it in debugging mode.
The device is recognised when it's in fastboot mode and when I use adb command: fastboot oem unlock, I get the response "token verification failed". I have also tried to flahs the TWRP.img but I get the same message that the phone is locked. I have tried to use the Miflash unlock tool again but when I try to sign in I get "network error". I have seen somewhere in the forum that it's because the MI account no longer recognises my phone (as it now only has Lineage installed).
Can anyone help?
Click to expand...
Click to collapse
This might help you. http://en.miui.com/thread-299790-1-1.html
Good luck.
Related
Hi all,
A few days ago I installed a custom ROM, which broke my android pay. I tried to re-lock the bootloader to fix this via the fastboot oem lock command, and i'm now stuck in a bootloop.
I can get the phone to boot into fastboot mode, and it shows up as such when checking via command prompt. I also have a backup of the phone I made a few days ago. I've tried to unlock the phone using the fastboot oem unlock command, but get the following error:
FAILED (remote: Token verification failed, reboot the device)
finished. total time: 0.008s
I bought the phone second hand with an unlocked bootloader, if that makes a difference? I've set up a new Mi account and applied for an unlock code.
Does anyone have any tips on how to proceed? Thanks in advance!
Stupid thing to think relocking your bootloader would fix android pay while still on that custom rom, whe have hacks for that you know >> magisk14/15.2
Do you still have twrp? also try to flash stock images from xiaomi themselves, here.
that should at least get you booting again.
Hi,
Thanks for replying, i'll download the global stable version. Is it a case of sideloading this once complete? I still have TWRP installed if it makes a difference, I just can't reach it :/
Yes I do feel pretty stupid, and thanks for the link to magisk - hadn't heard of it until now but i'll definitely be using when/if I get my Mi back up and running. Is there anyway to unlock the bootloader other than the Mi Unlock app?
Thanks!
EDIT: Okay, so i tried flashing via the MiFlash tool and got the following error:
FAILED: Remote device is locked. Cannot erase.
Any idea of where to go from here?
So, I fixed it! In the off chance anyone is as unlucky/stupid/trigger happy as me, and finds themselves in teh same situation, here's the solution:
If you can't get it into EDL mode because you can't switch it off (mine kept rebooting), follow this video:
https://www.youtube.com/watch?v=ED96PJ-qYMM
It's in a foreign language but is clear enough - take the back off, unscrew the cover and short the pins he shows you after disconnecting the battery, then plug into your computer.
Your phone will pop up as a Qualcommdevice under the ports section of Device Manager. You should then be able to flash via MiFlash as per usual.
Phew, hairy there but sorted in the end. I'll now wait for the unlock code from Xiaomi, and do a bit more reading in future!
A much easier way to solve this problem
You don't have to follow any long tutorial. Nor do you have to open your phone up. Just power it into fastboot mode, download the mi unlock tool that you used the first time to unlock your bootloader and unlock your device once again. Then you can use miflash to flash the fastboot rom on your device and it won't throw up any errors. Once that's done, just reflash the custom recovery. Install the custom rom, use magisk for root and you're good to go. Safety net won't be tripped and android pay will still work. No need to rip your phone apart to fix it.
Hello all!
I recently bought a second hand Xiaomi MI A2 online however I found a problem.
The previous owner did a factory reset on it but I'm stuck in the initial set up configuration because it asks me for the google account credentials attached to the phone. I texted the previous owner but had no answer.
So I tried to flash the official ROM to bypass the issue but I get an error message from Xiaomi Flash Tool saying "remote: Flash is not allowed in Lock State".
I think this is happening for one of the following reasons:
The previous owner didn't enable USB Debugging (thing I can't do because I'm stuck in the set up configuration)
The bootloader is locked (and I can't unlock it because I don't have the credentials of the attached account)
Does anyone knows how can I solve this problem?
Thank you for your attention
Joaosacramento said:
Hello all!
I recently bought a second hand Xiaomi MI A2 online however I found a problem.
The previous owner did a factory reset on it but I'm stuck in the initial set up configuration because it asks me for the google account credentials attached to the phone. I texted the previous owner but had no answer.
So I tried to flash the official ROM to bypass the issue but I get an error message from Xiaomi Flash Tool saying "remote: Flash is not allowed in Lock State".
I think this is happening for one of the following reasons:
The previous owner didn't enable USB Debugging (thing I can't do because I'm stuck in the set up configuration)
The bootloader is locked (and I can't unlock it because I don't have the credentials of the attached account)
Does anyone knows how can I solve this problem?
Thank you for your attention
Click to expand...
Click to collapse
Maybe you can see/ask in this thread for mia2 toolkit (I'm not sure but you can ask there )
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
daitalos said:
Maybe you can see/ask in this thread for mia2 toolkit (I'm not sure but you can ask there )
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
Click to expand...
Click to collapse
Thank you, will give it a try!
EDIT: Not working, every time I try to execute the unlock I got an error message "remote: Flashing Unlock is not allowed"
Joaosacramento said:
Thank you, will give it a try!
EDIT: Not working, every time I try to execute the unlock I got an error message "remote: Flashing Unlock is not allowed"
Click to expand...
Click to collapse
(yes...normally, first you must enable "OEM unlocking" from developer option
_ https://forum.xda-developers.com/mi-a2/how-to/guide-how-to-unlock-bootloader-xiaomi-t3831484
__but first for your problem with locked device, see here for FRP apk : https://www.google.gr/search?q=com.....69i57j0l5.14869j0j8&sourceid=chrome&ie=UTF-8
__and here frp mia2 : https://www.google.gr/search?q=frp+.....69i57j0l3.7035j0j8&sourceid=chrome&ie=UTF-8
first "unlock" your device & then you can unlock bootloader easy ....
sry for english
Just unlock bootloader(critical too) and use miflash
I also have a Mi A2 stuck in android logo screen can't can't boot into device developer options to unlock bootloader.
Fastboot oem unlock give me error flashing is not allowed.
Is there anyway around this?
You need to do an unlock of critical partitions - "fastboot flashing unlock_critical"
daitalos said:
(yes...normally, first you must enable "OEM unlocking" from developer option
_ https://forum.xda-developers.com/mi-a2/how-to/guide-how-to-unlock-bootloader-xiaomi-t3831484
__but first for your problem with locked device, see here for FRP apk : https://www.google.gr/search?q=com.....69i57j0l5.14869j0j8&sourceid=chrome&ie=UTF-8
__and here frp mia2 : https://www.google.gr/search?q=frp+.....69i57j0l3.7035j0j8&sourceid=chrome&ie=UTF-8
first "unlock" your device & then you can unlock bootloader easy ....
sry for english
Click to expand...
Click to collapse
Hey! It worked, thank you very much!
Face_11 said:
I also have a Mi A2 stuck in android logo screen can't can't boot into device developer options to unlock bootloader.
Fastboot oem unlock give me error flashing is not allowed.
Is there anyway around this?
Click to expand...
Click to collapse
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
(or flash stock rom via mi flash tool/ fastboot files) : http://en.miui.com/download-353.html
follow / read fastboot quide : http://en.miui.com/a-234.html
daitalos said:
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
(or flash stock rom via mi flash tool/ fastboot files) : http://en.miui.com/download-353.html
follow / read fastboot quide : http://en.miui.com/a-234.html
Click to expand...
Click to collapse
Thanks. I've tried the MIFlash Tool and I get Error Flashing Not allowed in Lock State. I've also tried the MI A2 ToolKit and get the same message. Basically anything I try and do states device is locked or unable to run in Lock State.
Boot Loader is currently locked and I cannot access developer mode to enable OEM unlocking. Question I have is :
- Can I use EDL Cable to work around this or do EDL cables not longer work with Newer Xiaomi phones?
- If EDL cable doesn't work, is the tespoint method my only option.
thanks in advance
Face_11 said:
Thanks. I've tried the MIFlash Tool and I get Error Flashing Not allowed in Lock State. I've also tried the MI A2 ToolKit and get the same message. Basically anything I try and do states device is locked or unable to run in Lock State.
Boot Loader is currently locked and I cannot access developer mode to enable OEM unlocking. Question I have is :
- Can I use EDL Cable to work around this or do EDL cables not longer work with Newer Xiaomi phones?
- If EDL cable doesn't work, is the tespoint method my only option.
thanks in advance
Click to expand...
Click to collapse
yes it's difficult .... I understand
edl maybe work, but I'm not sure...maybe if you go to a repair shop is a better solution
(see & here : https://forum.xda-developers.com/mi-a2/help/edl-deep-flash-cable-t3828732 )
https://youtu.be/n_7RVmW2Rvs
https://forum.xda-developers.com/showpost.php?p=77327325&postcount=2
Gl
Face_11 said:
Thanks. I've tried the MIFlash Tool and I get Error Flashing Not allowed in Lock State. I've also tried the MI A2 ToolKit and get the same message. Basically anything I try and do states device is locked or unable to run in Lock State.
Boot Loader is currently locked and I cannot access developer mode to enable OEM unlocking. Question I have is :
- Can I use EDL Cable to work around this or do EDL cables not longer work with Newer Xiaomi phones?
- If EDL cable doesn't work, is the tespoint method my only option.
thanks in advance
Click to expand...
Click to collapse
I would try a wipe from the recovery but if that doesnt work then just test point the phone. It isnt that hard, I had to do it myself today because of a soft brick. You just need a T3 screwdriver really. Take out the 2 bottom screws. Take a razor and slide it under the corner of the display and lift it enough the get a credit card in there. Then just work around and you should be able to get the screen off. Take the small metal plate off just above the battery and disconnect the battery and the connector on the right. There will be the test points, short them out, connect the phone to the pc(you can stop shorting out the points when it gets detected) and you have like 10-15secs to start flashing the phone in miflash(obviously you need to have the drivers already set up).
I have same problem with xiaomi mi a2 which had bootloop. Was not able to start device at all so no oem unloco no developer options and no usb debug. It was possible only adb sideload and fastboot. Adb sideload did nothing. I was trying to flash with adb sideload but it stops at 47% with message 1.00 x. Did try several roms with same results. Then i tried fastboot options. Falied to unlock not allowed. Itsl was impossible to get even into phone to activate developer options so i can activate oem unlock and the rest. I tried edl mode which did flash but then i got error message in bootloader it failed to mount system etc. Then i tried mi x6 rom to convert phone to another which doesnt have usual recovery mode but a stripped oem recovery mode. Now when u go back to mi a2 rom its bricked so there is no option of adb at all now. I tried to use mi x6 mi assistant option but app wont recognize usb connection it shows try normal mode then switch. When activating mi assistant on phone it does recognize rom version from recovefy flash in mi assistant app but when it downloads update rom version it cant continue. With pixel you can do anything with adb and it is so easy but xiaomi sucks big time. You cant do anything. Fastboot flashing unlock critical and fastboot oem unlock gets error failed. Flashing not allowed. U tried diferent cables but no luck. So now what? Thats why i hate adb. On samsung odin you can do impossible possible. Even with sp tools on mtk. Even boxes works flawlessly but xiaomi system is just thr worse. It doesnt matter if you get soemthing lost there is always a solution to other phones.
After having device sit as a paper weight for a few months, i broke down and ordered a phone repair kit. Opened device up and flashed via test point method. Worked Flawless. Time to enable OEM unlock so i don't have to open it up again. Thanks to community for all the help.
Use cmd
- go to fastboot then "fastboot oem unlock"
- go to fastboot again "fastboot flashing unlock_critical"
Flash with mi flash
Done
Just stumbled upon this and while may be 18 months too late, here's the step by step process to flash ROM on MI A2 that's giving error "Flash is not allowed in Lock State":
1) switch off device
2) enter fastbood mode (press hold power+vol down few seconds)
3) connect device with laptop
4) install and open adb folder on laptop (https://forum.xda-developers.com/showthread.php?t=2588979)
5) within adb folder -- shift + right click = open powershell here
6) fastboot flashing unlock_critical
7) step #6 may be pointless if phone is bricked but do it anyway
8) fastboot oem edl
9) find and download latest stock rom for your device (FASTBOOT version). It'll be .tgz file
10) extract the image folder from within (would be the same name as .tgz file)
11) open miflash (coudln't find link but look it up, it's easy)
12 select the image folder you extracted in step #10
13) click refresh. device name appear means it's recognized
14) from bottom of mi flash tool select whatever you want. I do "clean all"
15) flash (top right mi flash tool)
Face_11 said:
Thanks. I've tried the MIFlash Tool and I get Error Flashing Not allowed in Lock State. I've also tried the MI A2 ToolKit and get the same message. Basically anything I try and do states device is locked or unable to run in Lock State.
Boot Loader is currently locked and I cannot access developer mode to enable OEM unlocking. Question I have is :
- Can I use EDL Cable to work around this or do EDL cables not longer work with Newer Xiaomi phones?
- If EDL cable doesn't work, is the tespoint method my only option.
thanks in advance
Click to expand...
Click to collapse
Flashing is not allowed in lock state
i got a error recently in my mi a2 no software is installed but locked.
when i try to flash from mi flash tool it says flashing is not allowed in lock state
when i try to unlock in cmd flashing is not allowed in lock state
is there any one to fix this
IamUmesh said:
i got a error recently in my mi a2 no software is installed but locked.
when i try to flash from mi flash tool it says flashing is not allowed in lock state
when i try to unlock in cmd flashing is not allowed in lock state
is there any one to fix this
Click to expand...
Click to collapse
you need to open phone with screwdriver & do the test point ..search for video on YouTube...then EDL deepflash state you can use miflash to put back OFFICIAL only rom to device.
I was trying to install Camera2 on it. Unlocked it with developer options ->Unlock OEM
After try some things I reset factory the cellphone and decide to forget camera2 things...
So I went to developer options and LOCKED OEM.
After that I reboot in fastboot mode and did fastboot oem lock
Now the cellphone is locked in a bootloop saying that my deveice loaded a differente operational system and a screen to visit miui.com/unlock.
The unlock aplication doesn't work. Says that I can't unlock the device.
So that means I lost my crazy brand new phone? THere's any solution? The Test Point solution will work? Is that the only solution???
Thiank you for any response.
foxdanger said:
I was trying to install Camera2 on it. Unlocked it with developer options ->Unlock OEM
After try some things I reset factory the cellphone and decide to forget camera2 things...
So I went to developer options and LOCKED OEM.
After that I reboot in fastboot mode and did fastboot oem lock
Now the cellphone is locked in a bootloop saying that my deveice loaded a differente operational system and a screen to visit miui.com/unlock.
The unlock aplication doesn't work. Says that I can't unlock the device.
So that means I lost my crazy brand new phone? THere's any solution? The Test Point solution will work? Is that the only solution???
Thiank you for any response.
Click to expand...
Click to collapse
"So I went to developer option and LOCKED OEM" can you be a little more clear. Because unlocking the bootloader locks the OEM unlock option in the developer settings.
Possible cause of your bootloop is the change in your build.prop file.
I did a similar mistake as well. My phone was stuck in a bootloop. My mistake was that I installed Magisk and forgot to uninstall it through the Magisk manager before locking the bootloader and so the system were not in their stock state.
What I did was, I just booted my phone into fastboot.
Unlocked the bootloader again by using "fastboot OEM unlock". Went into fastboot again. Checked the current active slot by "fastboot getvar current-slot" and flashed the stock boot image from the stock pie rom found on Mi website.
Njaiker said:
"So I went to developer option and LOCKED OEM" can you be a little more clear. Because unlocking the bootloader locks the OEM unlock option in the developer settings.
Possible cause of your bootloop is the change in your build.prop file.
I did a similar mistake as well. My phone was stuck in a bootloop. My mistake was that I installed Magisk and forgot to uninstall it through the Magisk manager before locking the bootloader and so the system were not in their stock state.
What I did was, I just booted my phone into fastboot.
Unlocked the bootloader again by using "fastboot OEM unlock". Went into fastboot again. Checked the current active slot by "fastboot getvar current-slot" and flashed the stock boot image from the stock pie rom found on Mi website.
Click to expand...
Click to collapse
What I did was with the phone working I entered on configuration, developer, and turned of the oem lock option.
Than I reboot in fastboot and did fastboot oem lock.
This made the cellphone unbootable. Bootloop saying that I'm trying to start a different operational system.
And I can't make fastboot unlock because I turned off the option in the system, so I can't send fastboot commands like oem edl, unlock, unlock-critical and etc...
I can't do nothing :/
I don't know how the option was working, but was... I know it should be locked, but this time wasn't. Was after I factory reset the cellphone
Your fault that you locked bootloader on a modified system. Do a research next time
After successfully installing MIUI EU and using it just fine, I then attempted to lock the bootloader as the phone is going back tomorrow for a screen repair. Upon using the command fastboot oem lock in fastboot mode, the bootloader was locked, but I am now in a bootloop returning me to the fastboot screen no matter what I try. WIth my bootloader locked adb does nothing and same with most fastboot commands. Whenever I try to reboot my device regularly or while using any combination of volume buttons, it shows the MIUI boot screen then straight back to fastboot and repeat.
Any help appreciated, thanks.
10TICKTERROR said:
After successfully installing MIUI EU and using it just fine, I then attempted to lock the bootloader as the phone is going back tomorrow for a screen repair. Upon using the command fastboot oem lock in fastboot mode, the bootloader was locked, but I am now in a bootloop returning me to the fastboot screen no matter what I try. WIth my bootloader locked adb does nothing and same with most fastboot commands. Whenever I try to reboot my device regularly or while using any combination of volume buttons, it shows the MIUI boot screen then straight back to fastboot and repeat.
Any help appreciated, thanks.
Click to expand...
Click to collapse
Strange idea to want lock bootloader for repair a screen. Even if you must send to Xiaomi warrantly center / agreed shop, unlock bootloader do not cancel the warrantly. Only desimlock is forbidden.
You must lock your bootloader only from your native official/legit ROM (EEA or Global or CN, etc), but never from a custom MIUI or AOSP because these roms have need to have bootloader unlocked for working.
For now you must
1- using Mi Unlock and Unlock again your device, like the first time (from waiting unlock period) but you will lose all your data, data partition (internal) is wiped.
2- using MiFlash for flash the lastest MIUI fastboot legit rom from your device (EEA ? Global ? CN ?) and be careful , by default (on the bottom right) app install / erase and lock bootloader, choose install / no lock.
I managed to fix it by using Mi Unlock with my sim in another phone for verification, I was just worried I would be faced with the wait again. Thanks.
10TICKTERROR said:
I managed to fix it by using Mi Unlock with my sim in another phone for verification, I was just worried I would be faced with the wait again. Thanks.
Click to expand...
Click to collapse
No problem, as soon as you have unlock with success your bootloader the first time, you do not have period unlock anymore
Hi all,
I have a Xiaomi Mi 11 (Global) that is currently stuck on Fastboot screen. I have installed drivers and MiFlashPro on my PC and Xiaomi is recognised by MiFlash but when I try to flash a global fastboot rom, it comes back with
remote: Erase is not allowed in Lock State
I can even see the phone listed with fastboot devices command. It just refuses to boot into system or allow me to reset/wipe. Also, I am unable to boot into recovery.
Help would be appreciated.
Thanks in advance.
masteriori said:
Hi all,
I have a Xiaomi Mi 11 (Global) that is currently stuck on Fastboot screen. I have installed drivers and MiFlashPro on my PC and Xiaomi is recognised by MiFlash but when I try to flash a global fastboot rom, it comes back with
remote: Erase is not allowed in Lock State
I can even see the phone listed with fastboot devices command. It just refuses to boot into system or allow me to reset/wipe. Also, I am unable to boot into recovery.
Help would be appreciated.
Thanks in advance.
Click to expand...
Click to collapse
It is necessary unlock bootloader first.
crusaderrs said:
It is necessary unlock bootloader first.
Click to expand...
Click to collapse
I can't unlock the bootloader the normal way because I can't get into system and enable OEM unlocking/USB debugging in Settings.
masteriori said:
I can't unlock the bootloader the normal way because I can't get into system and enable OEM unlocking/USB debugging in Settings.
Click to expand...
Click to collapse
Follow this steps to unlock the bootloader
crusaderrs said:
Follow this steps to unlock the bootloader
Click to expand...
Click to collapse
Thank you for the link but I have already tried that and since I wasn't signed into the phone, it's not letting me unlock the bootloader.
The process fails at the second stage and tells me add account on the phone in Settings but I can't go into system to do that.
Thanks
Also, do I need to unlock the bootloader even if to install firmware from the same region as the phone? My phone's model is M2011K2G which I believe is for a Global version and I've tried flashing Global fastboot rom but no luck.