Bootloop, flash locked. What can I do? - Xiaomi Mi A2 / 6X Questions & Answers

Short story: my phone bootloops (shows the Android One screen for 3 seconds, then reboots), and I cannot unlock the flash in fastboot. fastboot oem unlock fails, fastboot flashing unlock fails, fastboot flashing critical_unlock fails.
What can I do, is my phone definitely bricked?
Long story: I installed september OTA and then rooted with Magisk using the image patch method. Now I wanted to get October OTA, so uninstalled Magisk to recover the unpatched bootloader, but the OTA refused to install. So I tried the flash_all method, but it failed because I did not do the critical unlock. So I tried the fastboot flash critical_unlock, but it continuously refused to work.
So I decided to agan lock flash, and do the oem lock, to restart the unlock procedure from the beginning. But after locking, the phone does not boot anymore (and it was booting fine before!). On top of that, I cannot oem unlock anymore, fastboot oem unlock always fails.
Is there any way to recover the phone?

Try fastboot oem edl
then use mi flash

Thanks for help.
Unfortunately fastboot oem edl fails:
Code:
# fastboot oem edl
FAILED (remote: Device is already locked!)
Finished. Total time: 0.001s
And as fastboot oem unlock also fails, I cannot unlock the bootloader.

doragasu said:
Thanks for help.
Unfortunately fastboot oem edl fails:
And as fastboot oem unlock also fails, I cannot unlock the bootloader.
Click to expand...
Click to collapse
I'll need more info than that
what's the error you get when using oem unlock or unlock_critical?
are you using minimal adb? If so, don't, use this instead https://developer.android.com/studio/releases/platform-tools
Are you using a usb 3.0 port? Switch to a usb 2.0 if you are

I am working from Linux, and I have the full Android Studio installed. I cannot use adb, since I cannot boot the phone (and as far as I know, adb does not work on fastboot, but I might be wrong).
I will try with the one you linked and come back with the results.

doragasu said:
I am working from Linux, and I have the full Android Studio installed. I cannot use adb, since I cannot boot the phone (and as far as I know, adb does not work on fastboot, but I might be wrong).
I will try with the one you linked and come back with the results.
Click to expand...
Click to collapse
Minimal adb includes fastboot, if you have minimal adb or you installed it from the repo then it's outdated, use the one I linked

Nothing was working for me, so finally I recovered the phone by opening it and using the deep flash method.

Related

Stuck in bootloop. No custom recovery or unlocked bootloader.

So this morning I was lazy and tried rooting with the kingroot app, because I didn't want to factory reset. It went okay and I had root but I wanted to use SuperSU as my root manager. Well the binary wouldn't update so I figured i'd unroot from the kingroot app and remove kingroot from my phone, and root the proper way later. I pressed the unroot button and my phone rebooted, but now it's stuck in a bootloop.
I don't have an unlocked bootloader or a custom recovery, and I never checked the enable oem unlock in developer options so flashing stock isn't an option.
I tried sideloading the OTA for the build I was on, but I guess kingroot didn't actually unroot me, because it told me I needed to reflash.
I tried factory reset and wiping the cache in the stock recovery, and tried 'fastboot format userdata' and 'fastboot format cache' but that didn't work either.
The only thing I could find that might help is this post http://forum.xda-developers.com/nexus-6/help/info-nexus-6-nexus-9-enable-oem-unlock-t3113539
but since I don't think you can run adb commands in stock recovery or bootloader this won't work.
So is there any way to fix this or am I boned?
As far as I know the only fix is the one in that link but it does require custom recovery. I'm assuming the fastboot boot command doesn't work when locked but I've never tried, if it does then you could temp boot into twrp. Worth a shot I guess.
Hindsight's 20/20 but NEVER touch anything other than your data or cache partition with a locked bootloader. Google's security jump with lollipop has caused nothing but havoc for us.
ChaosDr0id said:
So this morning I was lazy and tried rooting with the kingroot app, because I didn't want to factory reset. It went okay and I had root but I wanted to use SuperSU as my root manager. Well the binary wouldn't update so I figured i'd unroot from the kingroot app and remove kingroot from my phone, and root the proper way later. I pressed the unroot button and my phone rebooted, but now it's stuck in a bootloop.
I don't have an unlocked bootloader or a custom recovery, and I never checked the enable oem unlock in developer options so flashing stock isn't an option.
I tried sideloading the OTA for the build I was on, but I guess kingroot didn't actually unroot me, because it told me I needed to reflash.
I tried factory reset and wiping the cache in the stock recovery, and tried 'fastboot format userdata' and 'fastboot format cache' but that didn't work either.
The only thing I could find that might help is this post http://forum.xda-developers.com/nexus-6/help/info-nexus-6-nexus-9-enable-oem-unlock-t3113539
but since I don't think you can run adb commands in stock recovery or bootloader this won't work.
So is there any way to fix this or am I boned?
Click to expand...
Click to collapse
If you already installed the drivers and know how to run fastboot commands skip to step 4. Otherwise, start at the beginning
1.) Install the Wugfresh Toolkit from here: http://forum.xda-developers.com/nexus-6/development/toolkit-wugs-nexus-root-toolkit-v1-9-8-t2947452 so that the drivers you need get installed along with fastboot and adb commands.
2.) Open Nexus Root Toolkit after it has finished installing. Under advanced utilities click "Launch" then choose launch command prompt for manual mode.
3.) Put your device in bootloader mode (pwr+vol down) and connect it to the computer. Type: "adb devices" into the command prompt and it should list a device serial number. If it does, go to step 4. If it doesn't, unplug the phone and plug it back in and re-run command.
4.) Then run the command "fastboot oem device-info" and tell us what the output is.
Hopefully when you rooted it, it unlocked your bootloader automatically. If you successfully rooted and rebooted it should technically be unlocked. We won't know until you run fastboot oem device-info
or, you can grab the factory image of whatever version of android that you were on, "unzip" it, grab the system.img, and flash it via fastboot. its the same thing as if was a "custom recovery", youre just reflashing the rom, and wont lose your data
first thing id do is flash a custom recovery and unlock my bootloader, and make a backup in recovery.
AlkaliV2 said:
If you already installed the drivers and know how to run fastboot commands skip to step 4. Otherwise, start at the beginning
1.) Install the Wugfresh Toolkit from here: http://forum.xda-developers.com/nexus-6/development/toolkit-wugs-nexus-root-toolkit-v1-9-8-t2947452 so that the drivers you need get installed along with fastboot and adb commands.
2.) Open Nexus Root Toolkit after it has finished installing. Under advanced utilities click "Launch" then choose launch command prompt for manual mode.
3.) Put your device in bootloader mode (pwr+vol down) and connect it to the computer. Type: "adb devices" into the command prompt and it should list a device serial number. If it does, go to step 4. If it doesn't, unplug the phone and plug it back in and re-run command.
4.) Then run the command "fastboot oem device-info" and tell us what the output is.
Hopefully when you rooted it, it unlocked your bootloader automatically. If you successfully rooted and rebooted it should technically be unlocked. We won't know until you run fastboot oem device-info
Click to expand...
Click to collapse
Hi, thanks for the reply.
It says
'device info' is not a supported oem command. See fastboot oem help.
FAILED <remote failure>
However I'm fairly certain the bootloader is still locked as I was unable to flash TWRP, or a stock image of android, as it tells me to unlock before doing those things.
AFAIK when you have this problem together with a stock recovery and a locked bootloader means bricked. >repair
Your bootloader is lock and you can't boot android to enable OEM unlock to unlock it. You have ruined your phone and there is no known fix.
RMA time for you.
Literally no solution unless you can invent one on your own.
Is it necessary to have your bootloader unlocked to boot into a custom recovery from your pc? Say you download twrp on your pc, would fastboot boot twrp.img be a work around for that?
CapitalParallax said:
Is it necessary to have your bootloader unlocked to boot into a custom recovery from your pc? Say you download twrp on your pc, would fastboot boot twrp.img be a work around for that?
Click to expand...
Click to collapse
yes
CapitalParallax said:
Is it necessary to have your bootloader unlocked to boot into a custom recovery from your pc?
Click to expand...
Click to collapse
Absolutely. Otherwise anybody with a notebook could swipe your phone, download everything you've got on it, then return it without you knowing, and that would mean more nekkid selfies on reddit.
CapitalParallax said:
Is it necessary to have your bootloader unlocked to boot into a custom recovery from your pc? Say you download twrp on your pc, would fastboot boot twrp.img be a work around for that?
Click to expand...
Click to collapse
The entire concept of a locked bootloader is that you can't flash images through it.

Unable to unlock N6 bootloader (Android 6.0.1 Build MMB29X) [resolved]

Hi,
I am unable to unlock the bootloader on my Nexus 6, which was purchased new from Amazon.com. Or more accurately, I can issue the fastboot flashing unlock command without error, but my phone still says LOCKED and screen is frozen for 60 seconds.
I have followed the various HOWTOs on this website to the best of my ability:
1. Installed latest Android SDK tools(25.1.4.rc1), Platform-tools (24rc2) & Java8. I originally installed with the 23.1 platform-tools but then moved to the preview channel release when I had no luck.
2. USB debugging and OEM unlocking are both ON
3. Both "adb device" and "fastboot device" show my phone's serial number when in their respective modes, so I know communication is good between my laptop and phone.
How to replicate problem:
a. With my phone connected, I first issued "adb reboot bootloader". My phone then sucessfully changes to the AP Fastboot Flash Mode (Secure) screen. Beneath the green BATTERY OK (Charging) are the lines
Device is LOCKED. Status Code: 2
Transfer Mode: USB Connected
b. I then type "fastboot flashing unlock" and the output is
...
OKAY [ 0.016s]
finished. total time: 0.016s
However my phone does not ask me if I want to unlock. In fact, the screen then appears to be frozen -- pressing the volume up and down buttons does not change the power button selection menu. If I try to issue any other fastboot command, it says FAILED (command write failed (Unknown error)) finished. total time: 5.017s
The screen is frozen for 60 seconds. After that, the bootloader screen is once again functional (I can change menu options again) and I can issue new fastboot commands, such as 'fastboot reboot'
However, the device still says LOCKED and will refreeze for 60 seconds if I type 'fastboot flashing unlock'
Any suggestions would be appreciated!
Thank you.
type fastboot oem unlock to unlock your bootloader, then follow instruction. But beware, this will wipe your device
TMG1961 said:
type fastboot oem unlock to unlock your bootloader, then follow instruction. But beware, this will wipe your device
Click to expand...
Click to collapse
In newer versions of fastboot, the command is fastboot flashing unlock, not OEM unlock.
Code:
$ ./fastboot
usage: fastboot [ <option> ] <command>
commands:
update <filename> Reflash device from update.zip.
flashall Flash boot, system, vendor, and --
if found -- recovery.
flash <partition> [ <filename> ] Write a file to a flash partition.
flashing lock Locks the device. Prevents flashing.
flashing unlock Unlocks the device. Allows flashing
any partition except
bootloader-related partitions.
@webtrader,
@TMG1961 was trying to help you. Have you tried his recommendation before replying?
cam30era said:
@webtrader,
@TMG1961 was trying to help you. Have you tried his recommendation before replying?
Click to expand...
Click to collapse
No, I had not. I tried using fastboot oem unlock on an older version of the SDK toolkit and that had failed, but I had not tried using oem unlock again on the latest version, having noticed that "oem unlock" was no longer listed as an option.
I just tried it now on the latest SDK toolkit and it does indeed work for me. :good:
Thank you to the both of you for helping me out!
webtrader said:
No, I had not. I tried using fastboot oem unlock on an older version of the SDK toolkit and that had failed, but I had not tried using oem unlock again on the latest version, having noticed that "oem unlock" was no longer listed as an option.
I just tried it now on the latest SDK toolkit and it does indeed work for me. :good:
Thank you to the both of you for helping me out!
Click to expand...
Click to collapse
Welcome
i do believe the "fastboot flashing unlock" is for when a manufacture issues a binary token kinda of like how HTC does it. If the Nexus or any phone that is not carrier branded, "fastboot oem unlock" will be the command to pass.

Messed up via oem lock command - can't access recovery - any help appreciated!

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.

Huawei P9 stuck In bootloop

what I have done is this:
Rooted phone
Installed TWRP
than I updated (stupid)
Lost root than I wanted to install Custom frimware what didnt work
Factory resetted phone, phone doesnt boot anymore now.
I can only access fastboot but I can not get fastboot to work on pc installed many different drivers just dont work.
lucmaas99 said:
what I have done is this:
Rooted phone
Installed TWRP
than I updated (stupid)
Lost root than I wanted to install Custom frimware what didnt work
Factory resetted phone, phone doesnt boot anymore now.
I can only access fastboot but I can not get fastboot to work on pc installed many different drivers just dont work.
Click to expand...
Click to collapse
Every two or three days people report here they bricked phones by forcing update or Factory reset (or relocking Bootloader) from custom or rooted phones (or by having TWRP) - one must first go back to the original stock firmware he had, before upgrading/resetting/relocking...
And this thread will also not help to somebody else -
since 'somebody' will not read (before bricking the phone) ;(
---
Do you still have TWRP - use HWOTA to flash stock
https://forum.xda-developers.com/showpost.php?p=75787156&postcount=3
If you have no TWRP but Fastboot is showing Bootloader unlocked, you should be able to flash TWRP.
If Fastboot is showing Bootloader locked but FRP unlocked, you should be able to unlock Bootloader.
But if there is no more TWRP and Fastboot is showing FRP and Bootloader locked - maybe DC Phoenix can help you
https://www.dc-unlocker.com/DC-Phoenix-flash-repair-tutorial
I used this command in fastboot: fastboot oem device-info
But I get this error: FAILED (remote: Command not allowed)
On my phone it says: Phone: unlocked and FRP: Lock
lucmaas99 said:
I used this command in fastboot: fastboot oem device-info
But I get this error: FAILED (remote: Command not allowed)
On my phone it says: Phone: unlocked and FRP: Lock
Click to expand...
Click to collapse
Yeah, this is not adb/fastboot drivers problem but a fact that you either did not keep OEM Unlocking or it locked due to your procedures. But you have no system to boot in and to unlock.
Is TWRP still on? Press and keep pressing Power until phone shuts down (from Fastboot).
Try to boot to recovery by keeping pressed Vol + and Power -- if it boots to TWRP proceed by HWOTA as above.
If it boots to eRecovery instead, maybe you can try Factory reset (although, I don't believe it will work)
If you don't have recovery anymore (and you have no system and FRP is locked) then you really bricked the phone, you should pay for DC Phoenix and try to unbrick
zgfg said:
Yeah, this is not adb/fastboot drivers problem but a fact that you either did not keep OEM Unlocking or it locked due to your procedures. But you have no system to boot in and to unlock.
Is TWRP still on? Press and keep pressing Power until phone shuts down (from Fastboot).
Try to boot to recovery by keeping pressed Vol + and Power -- if it boots to TWRP proceed by HWOTA as above.
If it boots to eRecovery instead, maybe you can try Factory reset (although, I don't believe it will work)
If you don't have recovery anymore (and you have no system and FRP is locked) then you really bricked the phone, you should pay for DC Phoenix and try to unbrick
Click to expand...
Click to collapse
I cannot get into to recovery but when I let the phone die and than it starts normally,
but everytime it turns off its get back stuck in bootloop I got my oem key when it booted back but now I tried unlocking it agian but it says this:
C:\adb>fastboot oem unlock <code>
...
FAILED (remote: Command not allowed)
finished. total time: 0.016s
C:\adb>fastboot reboot bootloader
rebooting into bootloader...
OKAY [ 0.023s]
finished. total time: 0.024s
lucmaas99 said:
I cannot get into to recovery but when I let the phone die and than it starts normally,
but everytime it turns off its get back stuck in bootloop I got my oem key when it booted back but now I tried unlocking it agian but it says this:
C:\adb>fastboot oem unlock <code>
...
FAILED (remote: Command not allowed)
finished. total time: 0.016s
C:\adb>fastboot reboot bootloader
rebooting into bootloader...
OKAY [ 0.023s]
finished. total time: 0.024s
Click to expand...
Click to collapse
I cannot flash anything because I cannnot enable USB debugging in developers options
zgfg said:
Yeah, this is not adb/fastboot drivers problem but a fact that you either did not keep OEM Unlocking or it locked due to your procedures. But you have no system to boot in and to unlock.
Is TWRP still on? Press and keep pressing Power until phone shuts down (from Fastboot).
Try to boot to recovery by keeping pressed Vol + and Power -- if it boots to TWRP proceed by HWOTA as above.
If it boots to eRecovery instead, maybe you can try Factory reset (although, I don't believe it will work)
If you don't have recovery anymore (and you have no system and FRP is locked) then you really bricked the phone, you should pay for DC Phoenix and try to unbrick
Click to expand...
Click to collapse
What can I do I can access phone but cannot unlock bootloader because cannot use remote commands and I can not get into any recovery menu I am out of idea's
lucmaas99 said:
I cannot flash anything because I cannnot enable USB debugging in developers options
Click to expand...
Click to collapse
You can boot to system?
Which (full name) build it shows in About?
Can you enable Developer options - then why cannot you enable USB debugging?!
You must first enable Allow ADB debugging in charge... and only then USB debugging -otherwise USB debugging switches off
zgfg said:
You can boot to system?
Which (full name) build it shows in About?
Can you enable Developer options - then why cannot you enable USB debugging?!
You must first enable Allow ADB debugging in charge... and only then USB debugging -otherwise USB debugging switches off
Click to expand...
Click to collapse
Modelnumber: EVA-L19
Build: NRD90M test-keys
I think I should not supposed to have test-keys doesnt seem correct?
So I got my phone to boot but everytime I want to do something in recovery or something else It wont boot anymore and than I need to make the battery run out of juice. are there anyfix without needing root recovery or fastboot.
ADB wont work because usb debugging wont turn on (tried many things), Fastboot kinda works but gives the error (remote command not allowed)
Cannot get into any Recovery I can boot to OS

Question Unlock bootloader after relocking it

Hey!
I got a Zenfone 8 from a friend, and he told me that he tried to flash Lineage OS once, for some reason he got some errors and ended up going back to the stock ROM and relocking the bootloader.
Now I'm trying to unlock the bootloader again through the ASUS app, but it doesn't work. He tried to help me with some commands through fastboot mode and it also didn't work. There is any way to unlock it again after relocking it once?
He said he used the command 'fastboot oem asus-csc_lk' to relock it, don't know if it is hepful.
edit: We tried 'fastboot oem unlock' 'fastboot flashing unlock' (failed with permission error) and 'fastboot oem asus-unlock' (which resulted in FAILED (remote: 'Verify unlock token fail.')
Also AsusUnlock apk installs succesfully through ADB but fails to unlock with error 24802. Trying to install it through the phone doesn't work and gives me an error.
give more information please, from what build did your friend flash the lineageos? to what build did he go back to? did you install latest working ADB? are the drivers for the fastboot installed correctly? are you connected to the internet when trying to run the app on the phone?
AJ205 said:
give more information please, from what build did your friend flash the lineageos? to what build did he go back to? did you install latest working ADB? are the drivers for the fastboot installed correctly? are you connected to the internet when trying to run the app on the phone?
Click to expand...
Click to collapse
He said he followed what was on the guide he found, first updated to Android 12, the latest on on asus website (WW-31.1004.0404.107), and then tried to flash LineageOS ROM, then he got some errors and went back to Android 12 and relocked the bootloader. He said he never tried anything again. When I got the phone it was on Android 12, I tried unlocking it as I said and it didn't work. Then I downgraded it to 11 using the firmware from asus website (Version Android 12 to Android 11), and tried to unlock it again using Android 11. Also didn't work.
About ADB and Fastboot drivers, they are correctly installed, tried some "standalone" versions and also the one that come with android SDK Platform Tools. Tested it on other devices and it worked well. And the phone was connected to the internet when I tried using the app, I'm sure because I downloaded it on the phone aswell, using the browser.
edit: Actually I'm not sure about the fastboot drivers, I've just downloaded the sdk tools from google website.
what lineageos did he flasah? if its 18.1 thats android 11... propably why he got the errors.
AJ205 said:
what lineageos did he flasah? if its 18.1 thats android 11... propably why he got the errors.
Click to expand...
Click to collapse
That's probably it. But there's any way to unlock the bootloader again so I can give it another try?
Aodh said:
That's probably it. But there's any way to unlock the bootloader again so I can give it another try?
Click to expand...
Click to collapse
are you sure you are locked? do you get the warning screen when you boot up?
AJ205 said:
are you sure you are locked? do you get the warning screen when you boot up?
Click to expand...
Click to collapse
I do get the warning screen, but also when checking with fastboot oem device-info it returns this:
C:\Users\delci\Desktop\platform-tools>fastboot oem device-info
(bootloader) Device unlocked: false
Aodh said:
I do get the warning screen, but also when checking with fastboot oem device-info it returns this:
C:\Users\delci\Desktop\platform-tools>fastboot oem device-info
(bootloader) Device unlocked: false
Click to expand...
Click to collapse
let me get this straight, your device is unlocked and you want to lock it? because:
Aodh said:
That's probably it. But there's any way to unlock the bootloader again so I can give it another try?
Click to expand...
Click to collapse
what are you trying to do? your device is unlocked. you cant unlock it again.... you can try to lock with : fastboot oem asus-csc_lk
AJ205 said:
let me get this straight, your device is unlocked and you want to lock it? because:
what are you trying to do? your device is unlocked. you cant unlock it again.... you can try to lock with : fastboot oem asus-csc_lk
Click to expand...
Click to collapse
The warning appears, but it is not unlocked. Every command fails, device-info says that my device is not unlocked., it is locked.
What I'm trying to do is unlock it.
Let me try to explain what happened again.
The phone has been unlocked to install LineageOS. It didn't work. The past owner then installed the stock rom and locked it using this command: 'fastboot oem asus-csc_lk'.
Then I bought the phone from him, and now I'm trying to unlock it again, but it doesn't work.
The question then is: Is it possible to unlock a phone that has previously been unlocked and then relocked?
Hey, did you got it to work ?

Categories

Resources