Stuck in Fastboot - Xiaomi Mi A1 Questions & Answers

Hi! Seems like there are many different reasons why a Mi A1 can be stuck in Fastboot. I found others having the same symptom but the proposed solutions didn’t work for me.
Not matter what I do, my A1 won’t leave Fastboot:
- holding power button reboots to Fastboot
- holding power and volume up button reboots to Fastboot
- holding power and volume down button reboots to Fastboot
- `fastboot boot twrp.bin` does nothing (`sending`, `booting`, nothing)
- `fastboot flash recovery twrp.bin` complains `partition table doesn’t exist`
- `fastboot flash boot twrp.bin` complains `partition table doesn’t exist`
I basically followed the installation guide to install Lineage OS, used CosmicDan’s TWRP though. That didn’t work. Found out that I had to partition the storage for Treble. Flashed TWRP. Used “tissot manager” to partition. No I am stuck in Fastboot.
Any clues what is happening here?

There is a mistake in syntax for the flash command.
After the fastboot command you have to provide the slot for flashing boot.img
example: fastboot flash boot_a boot.img
In order to not screw up your device, download stock boot.img and write to both A and B slots then execute the reboot command.
This should do it

punktnet said:
There is a mistake in syntax for the flash command.
After the fastboot command you have to provide the slot for flashing boot.img
example: fastboot flash boot_a boot.img
In order to not screw up your device, download stock boot.img and write to both A and B slots then execute the reboot command.
This should do it
Click to expand...
Click to collapse
Thank you so much, this sounds promising. Where can I get the stock boot.img from?

punktnet said:
There is a mistake in syntax for the flash command.
After the fastboot command you have to provide the slot for flashing boot.img
example: fastboot flash boot_a boot.img
In order to not screw up your device, download stock boot.img and write to both A and B slots then execute the reboot command.
This should do it
Click to expand...
Click to collapse
tzyac said:
Thank you so much, this sounds promising. Where can I get the stock boot.img from?
Click to expand...
Click to collapse
I just flashed TWRP. And it is working. Thanks again!

My pleasure.
Just remember that this phone is almost impossible to brick

Related

[Q] problems with clockworkmod recovery (device almost dead)

ok, so i wanted to try Cyanogenmod 7.
i followed the steps:
1- rooted the device
2- downgraded to Froyo firmware
3- installed Cyanogenmod 7.20.
all worked fine for almost one week until i updated rom manager from the market.
since the the device led flickers in green and orange. I can get into clockworkmod recovery menu but it lasts for a few seconds and disappears. it appears again and so on.
adb devices returns:
List of devices attached
SH0BHRT09137 recovery
but because it's not stable the same command doesn't return any devices few seconds later.
what shall i do now ?
steps one and two i assume are switched around, try booting into fastboot
if your hboot is still stable you may have more luck here
fastboot works in similar ways as adb - so fastboot devices
if you see yours
then wipe and flash a new recovery via fastboot
fastboot -w
fastboot flash recovery recovery.img
fastboot reboot
(replace recovery.img with whatever name you give that recovery image)
demkantor said:
steps one and two i assume are switched around, try booting into fastboot
if your hboot is still stable you may have more luck here
fastboot works in similar ways as adb - so fastboot devices
if you see yours
then wipe and flash a new recovery via fastboot
fastboot -w
fastboot flash recovery recovery.img
fastboot reboot
(replace recovery.img with whatever name you give that recovery image)
Click to expand...
Click to collapse
Thanks for the info. after i installed fastboot and ran "fastboot devices" i don't get any devices.
are you in fastboot mode within hboot? does your phone say fastboot usb?
write down everything on your phone when you boot into bootloader
demkantor said:
are you in fastboot mode within hboot? does your phone say fastboot usb?
write down everything on your phone when you boot into bootloader
Click to expand...
Click to collapse
strange enough "adb reboot" go the device working ! not sure why it was stuck at ClockMod.
hope this thread help somebody later.

I need help with twrp ASAP please

I flashed 3.3.1-2 twrp and then installed a couple different roms to compare. Then I'm not quite sure what happened, I know I formatted and tried to install another, then I lost access to twrp. Even though it says I'm successful at flashing it, it won't boot into twrp or any recovery for that matter. What should I do? I've tried two different twrp's and neither will boot up. I've tried the .bat and volume+ and power, and I even tried with the fastboot boot twrp.img command.
willineedhelp said:
I flashed 3.3.1-2 twrp and then installed a couple different roms to compare. Then I'm not quite sure what happened, I know I formatted and tried to install another, then I lost access to twrp. Even though it says I'm successful at flashing it, it won't boot into twrp or any recovery for that matter. What should I do? I've tried two different twrp's and neither will boot up. I've tried the .bat and volume+ and power, and I even tried with the fastboot boot twrp.img command.
Click to expand...
Click to collapse
What do you see exactly when you try to enter recovery mode? Stock recovery? Or fastboot? Which recovery have you tried? (provide links)
willineedhelp said:
I flashed 3.3.1-2 twrp and then installed a couple different roms to compare. Then I'm not quite sure what happened, I know I formatted and tried to install another, then I lost access to twrp. Even though it says I'm successful at flashing it, it won't boot into twrp or any recovery for that matter. What should I do? I've tried two different twrp's and neither will boot up. I've tried the .bat and volume+ and power, and I even tried with the fastboot boot twrp.img command.
Click to expand...
Click to collapse
Hello, download fastboot rom and flash this files
fastboot flash dtbo dtbo.img
fastboot flash logo logo.img
fastboot flash vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot flash misc misc.img (u can get on fastboot rom not .zip)
fastboot flash recovery recovery.img (recommend used twrp-3.3.1-2-davinci-fix)
For twrp use bat file to install for u don't do it manually..
SomethingWentWrong said:
What do you see exactly when you try to enter recovery mode? Stock recovery? Or fastboot? Which recovery have you tried? (provide links)
Click to expand...
Click to collapse
Fastboot mode
farhan20 said:
Hello, download fastboot rom and flash this files
fastboot flash dtbo dtbo.img
fastboot flash logo logo.img
fastboot flash vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot flash misc misc.img (u can get on fastboot rom not .zip)
fastboot flash recovery recovery.img (recommend used twrp-3.3.1-2-davinci-fix)
For twrp use bat file to install for u don't do it manually..
Click to expand...
Click to collapse
I'll give that a shot, thanks!
farhan20 said:
Hello, download fastboot rom and flash this files
fastboot flash dtbo dtbo.img
fastboot flash logo logo.img
fastboot flash vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot flash misc misc.img (u can get on fastboot rom not .zip)
fastboot flash recovery recovery.img (recommend used twrp-3.3.1-2-davinci-fix)
For twrp use bat file to install for u don't do it manually..
Click to expand...
Click to collapse
Oh man you're a life saver! Worked perfectly! Thanks so much!
willineedhelp said:
Oh man you're a life saver! Worked perfectly! Thanks so much!
Click to expand...
Click to collapse
Glad to know I was able to help, it happens with me and this is how I fixed ?
Hello! Had the same problem and the procedure let me access recovery, yet everytime I reboot to system, the phone opens recovery instead.
I tried restoring a backup but rom is unstable and stuff keeps crashing. Any ideas?
EDIT: did a fastboot flash of .9 ROM and at got it back to work.
farhan20 said:
Hello, download fastboot rom and flash this files
fastboot flash dtbo dtbo.img
fastboot flash logo logo.img
fastboot flash vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot flash misc misc.img (u can get on fastboot rom not .zip)
fastboot flash recovery recovery.img (recommend used twrp-3.3.1-2-davinci-fix)
For twrp use bat file to install for u don't do it manually..
Click to expand...
Click to collapse
So I tried to go back to MIUI and it did it again, I did the default wipe and tried to install it. It got stuck in a bootloop and wouldn't go into TWRP again. Tried what you prescribed again, but that didn't work. I tried using the command (fastboot boot recovery.img) and it just shut off. It's clearly not flashing TWRP, but I have no idea why. I tried both 3.3.1-2 and 3.3.1-3, neither worked. I tried flashing more of the fastboot ROM images, but that did nothing either. Any suggestions? I'm having to use my old moto g5 until I get this fixed, so help ASAP would be amazing. Thanks in advance!
willineedhelp said:
So I tried to go back to MIUI and it did it again, I did the default wipe and tried to install it. It got stuck in a bootloop and wouldn't go into TWRP again. Tried what you prescribed again, but that didn't work. I tried using the command (fastboot boot recovery.img) and it just shut off. It's clearly not flashing TWRP, but I have no idea why. I tried both 3.3.1-2 and 3.3.1-3, neither worked. I tried flashing more of the fastboot ROM images, but that did nothing either. Any suggestions? I'm having to use my old moto g5 until I get this fixed, so help ASAP would be amazing. Thanks in advance!
Click to expand...
Click to collapse
Nvm, I just had a junk TWRP version.
willineedhelp said:
So I tried to go back to MIUI and it did it again, I did the default wipe and tried to install it. It got stuck in a bootloop and wouldn't go into TWRP again. Tried what you prescribed again, but that didn't work. I tried using the command (fastboot boot recovery.img) and it just shut off. It's clearly not flashing TWRP, but I have no idea why. I tried both 3.3.1-2 and 3.3.1-3, neither worked. I tried flashing more of the fastboot ROM images, but that did nothing either. Any suggestions? I'm having to use my old moto g5 until I get this fixed, so help ASAP would be amazing. Thanks in advance!
Click to expand...
Click to collapse
What MIUI version you have tried to go back?

How to fix and clean your Pixel 2's partitions (should work for other devices too)

I wanted to make this post about my adventure with my old Pixel 2. I was getting non-stop red lines out of the log in TWRP. Many times I would have problems mounting system and vendor partitions as well as vendor partitions needing "to be cleaned".
This led me to believe that I may have a corrupted partition, so I did some research into how the partitions are organized, and what happens when you flash a lot of ROMs. Perhaps you want to go back to the stock firmware? Perhaps - like in my case - you want to install a ROM such as GrapheneOS that's meant to lock the bootloader afterwards, and act more like the stock ROM.
What I didn't understand up until recently is how exactly the A and B slots of phones like the Pixel 2 work. They work because the firmware allows updating OTA to the opposite slot of what's active. That way - in the worst case scenario - you can actually boot into the opposite slot and regain access to your phone. I'm not an expert on this, but that's my basic understanding.
So now that that's covered, another important aspect is flashing ROMs. If you are like me and like testing many different ROMs, you may end up running into issues such as the one I stated above with TWRP.
The only way I was able to avoid these types of issues is to run some commands through fastboot.
One such command is
Code:
fastboot format system
This command will format the system partition and make it easier to install ROMs without running into issues.
Another command is
Code:
fastboot format vendor
This command was very important in my case, because the vendor partition was actually unusable for my slot A. Doing this command finally fixed that issue.
Another thing to note is ROMs can be installed in both slots. A lot of people don't do this, because they leave their bootloader unlocked and probably just run the ROM for half a day, and flash another. In my case, I needed to flash both slots in order to lock the bootloader in GrapheneOS, and allow the OS to update OTA. If you don't flash both slots, that won't work.
Just to clarify further, these are the commands (at the bootloader) I ran (from a command prompt in Windows) in order from start to finish when I was flashing a ROM I wanted to keep:
Code:
fastboot --set-active=a
fastboot format system
fastboot format vendor
fastboot reboot bootloader
fastboot --set-active=b
fastboot format system
fastboot format vendor
fastboot reboot bootloader
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update rom.zip
// Let the phone reboot into the new ROM, let it sit for a minute,
// then reboot into bootloader manually and then continue with fastboot:
fastboot --set-active=a
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update rom.zip
Once I've done this, and can confirm it successfully loads into the ROM I've installed, I can now say that I have a clean, fresh install in BOTH slots A and B.
I'll update this thread if I can think of anything else that can help newbies like me.
Cheers!
HCFL said:
I wanted to make this post about my adventure with my old Pixel 2. I was getting non-stop red lines out of the log in TWRP. Many times I would have problems mounting system and vendor partitions as well as vendor partitions needing "to be cleaned".
This led me to believe that I may have a corrupted partition, so I did some research into how the partitions are organized, and what happens when you flash a lot of ROMs. Perhaps you want to go back to the stock firmware? Perhaps - like in my case - you want to install a ROM such as GrapheneOS that's meant to lock the bootloader afterwards, and act more like the stock ROM.
What I didn't understand up until recently is how exactly the A and B slots of phones like the Pixel 2 work. They work because the firmware allows updating OTA to the opposite slot of what's active. That way - in the worst case scenario - you can actually boot into the opposite slot and regain access to your phone. I'm not an expert on this, but that's my basic understanding.
So now that that's covered, another important aspect is flashing ROMs. If you are like me and like testing many different ROMs, you may end up running into issues such as the one I stated above with TWRP.
The only way I was able to avoid these types of issues is to run some commands through fastboot.
One such command is
Code:
fastboot format system
This command will format the system partition and make it easier to install ROMs without running into issues.
Another command is
Code:
fastboot format vendor
This command was very important in my case, because the vendor partition was actually unusable for my slot A. Doing this command finally fixed that issue.
Another thing to note is ROMs can be installed in both slots. A lot of people don't do this, because they leave their bootloader unlocked and probably just run the ROM for half a day, and flash another. In my case, I needed to flash both slots in order to lock the bootloader in GrapheneOS, and allow the OS to update OTA. If you don't flash both slots, that won't work.
Just to clarify further, these are the commands (at the bootloader) I ran (from a command prompt in Windows) in order from start to finish when I was flashing a ROM I wanted to keep:
Code:
fastboot --set-active=a
fastboot format system
fastboot format vendor
fastboot reboot bootloader
fastboot --set-active=b
fastboot format system
fastboot format vendor
fastboot reboot bootloader
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update rom.zip
// Let the phone reboot into the new ROM, let it sit for a minute,
// then reboot into bootloader manually and then continue with fastboot:
fastboot --set-active=a
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot update rom.zip
Once I've done this, and can confirm it successfully loads into the ROM I've installed, I can now say that I have a clean, fresh install in BOTH slots A and B.
I'll update this thread if I can think of anything else that can help newbies like me.
Cheers!
Click to expand...
Click to collapse
Would this help in bootloop as well? I have a pixel 1st gen that does. I have flashed and or tried to anyways factory images...OTA and even was able to boot twrp and get lineage to flash, only to get a random reboot and bootloop. I would need to flash the factory image in order to get this phone operable. Should I flash a factory image and then do your steps or should I do the steps first and then flash the factory image?
Nope. Did not work. Seems as if the stock recovery is fubar

2019 pro stuck in boot loop

Got this working with Lineage ok but decided to go back to stock. I downloaded the stock recovery rom from NV and set everything up. Inside the recovery bundle is a bat file. Usually I would flash all files manually but this time I used the bat file. It manged the first 3 or 4 commands then came up with error. The box is now stuck in a boot loop and I am unable to access over adb.
Can anyone please suggest a way around this.
Thanks
Here is the bat file
fastboot flash staging blob
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash dtb mdarcy.dtb.img
fastboot flash vbmeta vbmeta.img
fastboot oem lock (optional step: required for certain functionality)
fastboot reboot
EDIT:
Eventually managed to flash lineage zip again. Used USB keyboard to access recovery
may i ask, what kind of keyboard did u use?
thanks in advance

Cannot flash anything < waiting for device > but found in fastboot devices

Hello, I am trying to flash TWRP to my zenfone, I managed to do it once by some miracle with the exact same setup as I have now.
by typing fastboot devices I get K6AXB7616289*** fastboot
but if I try to flash anything with the phone connected I get no output at all.
If I try to flash with the phone disconnected I get <waiting for any device> and no change when I connect it.
In both of these cases when I disconnect the phone I get:
Sending 'recovery' (31332 KB) FAILED (Write to device failed (No such device))
fastboot: error: Command failed
It is overall wonky and seems to change depending on nothing. Sometimes while writing sudo fastboot reboot bootloader I get to the bootloader as expected, but sometimes I get an error but still manage to get to the bootloader and other times it boots up normally.
I am running ParrotOS from a USB
I also posted in here as my problem is very similar but I hope this post resurrects this particular topic: https://forum.xda-developers.com/t/...but-fastboot-devices-is-working-fine.4295449/
What commands are you using?
Fastboot flash boot boot.img?
The boot.img could be the twrp.img renamed to boot. Img but it should be to recovery I believe.
Fastboot flash recovery twrp.img
Yeah im writing fastboot flash recovery and then the path to my twrp.img. I managed to flash it once after a lot of struggle but now I can't do it again.
After posting I saw that I'm using a USB 3 port and my laptop doesn't have a usb 2 one so I think that might be the issue.
Considering I can get three different outputs from the same command in the span of a couple seconds I think that the problem might be hardware related. I can update once I get my hands on a USB 2 port.
Kaynejulian said:
What commands are you using?
Fastboot flash boot boot.img?
The boot.img could be the twrp.img renamed to boot. Img but it should be to recovery I believe.
Fastboot flash recovery twrp.img
Click to expand...
Click to collapse
I have now tried with a USB 2 port and there is no change.
I have had issue when the phones in fastboot and I'm able to flash via his method. Using platform tools I copy all my IMg's into the folder then open a command prompt window in that folder and fastboot reboot bootloader or fastboot reboot fastboot. Which I learned the hardway is fastbootd mode and then and only then did it actually flash. I also learned the hardway that you boot directly from in fastboot mode or it all just cycles back.
Fastboot reboot.
What version zenfone model and what is system is it running?
If your device is running android 10 or newer then is a different process as you'll need to flash the super.img rather than individual imgs like system vendor product ect
Tue shore image also means it matters where you flash the img
Get a fastboot getvar all printout to me and I'll do what I can to help u get it running again

Categories

Resources