I'd like to get to the bottom of this fastboot/bootloader issue, that I'm having, others are having; on here, and on our Discord channel.
So how many of us are experiencing error flashing to any partition (manually, or using a script), in the past or currently?
An example, in my case, usually when I get the errors (which can be "partition flash failure" but has been other errors in the past.) I just change the usb cable, port, reset computer, etc, and it usually works. But lately the issue seems to be getting worse. Other times it took almost 10 minutes to flash one partition.
This morning I tried to flash a treble image and it failed on flashing 1/3 .... didn't even give itself time to try to flash it. It kept failing no matter what I tried. So a problem perhaps when mounting the partition.
Others might claim the partition is fried/failed/dead ... I don't think that's the case. This is why.
Sometimes calling `fastboot set_slot other` will fail. same goes for calling `fastboot getvar current-slot`
The other reason is this .... I was lucky and still had twrp installed on slot b, I was able to boot into the recovery on slot b and from there I could flash fine, could even flash a system image.
(as a note, if you get system mounting errors, your going to have to wipe system on the effected slot, and reboot back into recovery and start over)
So I'm asking this right now to all of you having issues:
1) What firmware are you on? I was on the prior oreo firmware (166)
2) what brand of type-c cables have you tried (i.e. essential, anker, etc)
3) what operating system have you tried? (windows 10, xp, ubuntu linux)
4) what is your computer's southbridge chip? (amd, intel)
5) are you stuck in edl mode? (on windows, go to your computer management/devices, and see what your phone is coming up as)
6) what is your fastboot version? `fastboot --version` (mine is 0.0.1-4500957 from google's android sdk)
Related
There's a painful brick story behind this, and I'll share those details if needed, but let me start with my current situation.
I've got a D800 (AT&T). I can boot to Android (almost stock D80030f, rooted), but I can't get to recovery. I've tried AutoRec to install TWRP, but when I reboot to recovery, it takes me to fastboot mode instead. I would try to flash recovery from fastboot, but the only fastboot command that ever returns is getvar, and it comes back empty for most variables. Anything else I've tried just hangs (erase, flash, reboot). I see the command printed on the phone's screen, but nothing happens after that. This is the same as it was while I was bricked and stuck in fastboot mode. I've tried from Linux, from Windows in a VM, and from a Windows host.
I can get to download mode, but I can't flash anything there, either. The drivers are installed and everything is set up correctly according to all the guides, but when I try to flash, I get an error that the version doesn't match (or something, I can get the exact error message if needed). I suspect this is related to the fastboot problem, because it shows version strings that are either empty or null, I don't remember which. I get the same behavior from both my Windows VM and my Windows host. Both are Windows 7 64-bit.
It would be nice to get fastboot and download mode working, but what I really care about is TWRP, of course. Is there anything I can do to get this working while booted to Android?
I've already short circuited this thing once, and that's how I got this far. I dd'ed every partition (from http://downloads.codefi.re/autoprime/LG/LG_G2/D800/Stock_Firmware/30f_partitions) except for modem and dbi, and a TWRP image for the recovery partition. So if I have to short circuit again, I'm not afraid to.
Edit:
I'm not sure if this is in any way indicative of the problem, but I just noticed that my GPS isn't working. Honestly, I'd be happy to start with a fresh TOT if I could just get it to flash.
So I screwed up. When wiping my system for lineageos, I accidentally wiped everything, including the system, internal storage, and data. I am in TWRP right now. Trying to send files over at MTP just makes the progress bar not move. I cannot move it over with my phone mounted as a usb storage device. When using adb push to send over a ROM, the command completes, but it does not appear in the sdcard folder as I specified. Adb sideload just stops at 50%, with the phone displaying step 2/2 and not continuing after that- I have the option to reboot or wipe dalvik / cache. I have no OS. I know that rebooting into TWRP again will make MTP work, however as I have no OS installed I know that I will not be able to access fastboot. Any ideas on how to get a rom onto my phone's storage?
You might need to format your internal storage as it may still be encrypted which may be why files aren't copying across. This is just a guess though. If all else fails (I have been in a similar situation before), you should be able to boot into fastboot (bootloader) mode from TWRP and flash OOS back through that. You would need to find the fastboot version of the ROM. I believe there is a thread in this forum somewhere. A last resort would be using the MSMTool to get back to stock. I've never had to do this myself though. The phone will be in a like brand new state though, so you would need to unlock the bootloader again if you are going to flash a custom ROM or do any modding after.
You can use OTG storage, encryption has no effect on it and you can flash files too. I used it to bypass the encryption issue in TWRP. If that doesn't work then post #2 is your best option. Also you can still boot in fastboot even if your ROM is broken. You can find the fastboot ROMs in the guide section.
Pixel 3a. Bootloader unlocked. Stock. Previously have used Magisk although I didn't have it installed or setup at the moment. I was neglectful and hadn't updated OTA or factory images since updating to Android 10. My current boot slot is b. I've tried updating via Magisk OTA or system OTA but they both fail, so I use factory images manually to keep my data partition.
Today I downloaded the sargo November 2019 image. The process I've been using across a few Pixel phones the past few years has been to manually unpack the Factory image ZIP and the update ZIP, then manually fastboot flash bootloader, reboot, radio, reboot, then boot_a and boot_b, system, system_b, vendor, and modem.
It should have been a hint to me that I got an error when I went to flash system. My console told me I need to use fastbootd. So I switched there, flashed the system partitions. Went to reboot and got "Your device is corrupt. It can't be trusted and may not work properly.", which I've never encountered before. Press Power - ignore the device-is-unlocked message, and get to the Google boot screen. And then the device appears to be frozen.
Right now I'm thinking to go back to my first Android 10 factory image and see if I can reverse whatever I did... but figured I should check here to see if I had missed something important. Low and behold this forum says to only flash one slot at a time, to switch and boot into the other slot, etc. Okay, so I messed up. Any good ideas on how to fix what I did?
UPDATE: I don't normally sideload updates, but I got into recovery mode, sideloaded the OTA for November, and I'm back in business. I'll do a few reboots to be sure I'm good but the phone did boot up, my user data is intact. The phone still starts out with a "your phone is corrupt" message, which is then followed by the "you have an unlocked bootloader" message. That second screen has some messed up characters on it.
If anyone has advice on the "right" way to maintain slots A vs. B and how to be careful, how to combine this with Magisk etc and can point me to posts in threads, that'd be helpful for the future. Thanks!
I don't understand why so many people even mess with A/B partition commands. If you follow the normal flashing instructions, you don't specify a boot partition. Entering specific boot partition commands will greatly increase the odds that you mess something up.
ohioDroid said:
Pixel 3a. Bootloader unlocked. Stock. Previously have used Magisk although I didn't have it installed or setup at the moment. I was neglectful and hadn't updated OTA or factory images since updating to Android 10. My current boot slot is b. I've tried updating via Magisk OTA or system OTA but they both fail, so I use factory images manually to keep my data partition.
Today I downloaded the sargo November 2019 image. The process I've been using across a few Pixel phones the past few years has been to manually unpack the Factory image ZIP and the update ZIP, then manually fastboot flash bootloader, reboot, radio, reboot, then boot_a and boot_b, system, system_b, vendor, and modem.
It should have been a hint to me that I got an error when I went to flash system. My console told me I need to use fastbootd. So I switched there, flashed the system partitions. Went to reboot and got "Your device is corrupt. It can't be trusted and may not work properly.", which I've never encountered before. Press Power - ignore the device-is-unlocked message, and get to the Google boot screen. And then the device appears to be frozen.
Right now I'm thinking to go back to my first Android 10 factory image and see if I can reverse whatever I did... but figured I should check here to see if I had missed something important. Low and behold this forum says to only flash one slot at a time, to switch and boot into the other slot, etc. Okay, so I messed up. Any good ideas on how to fix what I did?
UPDATE: I don't normally sideload updates, but I got into recovery mode, sideloaded the OTA for November, and I'm back in business. I'll do a few reboots to be sure I'm good but the phone did boot up, my user data is intact. The phone still starts out with a "your phone is corrupt" message, which is then followed by the "you have an unlocked bootloader" message. That second screen has some messed up characters on it.
If anyone has advice on the "right" way to maintain slots A vs. B and how to be careful, how to combine this with Magisk etc and can point me to posts in threads, that'd be helpful for the future. Thanks!
Click to expand...
Click to collapse
Just unpack the factory images and remove the -w. Then either do flash-all or open the flash-all and follow the steps inside to see what you need to flash. The portion that says update will fail if you have not followed the initial steps. Don't specify boot partitions the factory images should flash to both slots. That should take care of your corrupted message.
Sent from my Pixel 3a using Tapatalk
sic0048 said:
I don't understand why so many people even mess with A/B partition commands. If you follow the normal flashing instructions, you don't specify a boot partition. Entering specific boot partition commands will greatly increase the odds that you mess something up.
Click to expand...
Click to collapse
Probably because there are references around saying to do so. And the threads have so many posts it can be difficult to read it all and learn something is right or wrong.
3-ish years ago I had come across this post that specifically says to flash A/B both:
https://forum.xda-developers.com/pixel-xl/how-to/guide-update-fastboot-t3498187
I've been following it on Pixel phones every since then. I never gave a second thought to the A/B partitions up until this happened. The main thing that was different now from my perspective was having to use fastbootd to flash the system, which I've never done before.
By manually flashing the bootloader and radio, and then using Recovery to install an OTA update (instead of using the Factory image) I was able to get the phone to boot properly. It still starts up by saying it is corrupt and requiring me to hit the power button to proceed, and then showing the 'phone is unlocked' message with some garbled characters, but then starts up and works fine (as far as I can tell). Maybe I can OTA the future December update and that will fix things? Or is there something I can do now?
Just want to try to provide some sound advice, next time maybe look to use the flash-all.sh script. There is absolutely zero reason not to, and going outside of that just means you're just tinkering around way more than necessary.
I think you're over complicating things. Just download latest factory image, unzip it, connect the phone to PC and double click the run me bat file. I always clean flash, but if you want to keep data, as others have said, delete the - w .
Just an update on the status...
I decided to not try to install magisk or anything during November. With the December update I ran it OTA the standard format. The "Corrupt" message is gone. I assume (haven't yet checked) that I've switched over to boot_a.
Okay so going forward if I want to install Factory Images while keeping data just use the flash_all.bat but remove the -w switch. Got it.
Now I just need to get Magisk back on there and figure out the current way to enable WiFi Tether/hotspot.
My Pixel 4 is stuck on "Pixel is starting". This happened after installing Magisk and a custom kernel. I attached the logcat file, if someone could help me identify why it's getting stuck, and a possible solution. I want to grab the internal storage before wiping the device.
Fixes attempted:
Flash the OTA
Flash factory rom without -w option
Downgrade to Android 10
Boot into safemode
Boot stock boot.img
Boot magisk modded boot.img
Tried to access /system partition (By boot twrp -fastboot boot twrp.img and using adb shell while at "Pixel is starting" screen), but been unable to mount it.
I've also created an .img file of the SDB partition, so failed fixes can be reverted.
adb pull /dev/block/sda sda.img
Is there a way to grant su access through adb shell without needing to allow through the user prompt?
Since it would not let me attach the file, I have uploaded it to Google Drive:
logcat.txt
drive.google.com
Why would you remove the fastboot -w ? The very first thing I do usually when I have an issue on my device is format data. Sudo fastboot -w then reboot. That wipes everything clean. Depending on what it is i have happen that's usually one of the things I do right off the bat. And it usually fixes it as crazy as that may sound. When you flashed the factory image in fastboot did it all flash properly? Strange. I would wipe it for sure if I were you and see what happens. Since the Nexus S days, many years ago that's usually what I've always done to my phone's and tablets when something isn't right.
I would do the ./flash-all.sh on wherever factory image you were on when this happened or whatever. I see you say you tried rolling back to A10. I'd throw latest A11 factory image in PC and delete all other stuff far as factory images go so that none of it gets confused with a part from another... Unzip latest and let it do the flash-all and don't remove the -w this time and see what happens. I didn't look at your log yet but sounds like something maybe got corrupted, idk...But that's what I would definitely do. And make sure you use a good USB cable. I have quite a few good cables and mine sometimes stops at "extracting super partition" when phone boots to fastbootd and I have to giggle cord where it plugs in to my USB port on my laptop and it immediately finishes the flash...
(Edit)
i wanted to install a custom rom onto my phone. to make a long story short, i was foolish and because it'd been a while, i ended up bricking my phone.
it boots to fastboot, but nothing else.
so far, i have tried:
- flashing TWRP recovery (succeeds in flashing but goes back to fastboot after rebooting)
-booting directly into TWRP (fails with the error "Failed to load/authenticate boot image: Load Error")
-using the Mi Flash Tool to flash an MIUI install (frankly im not sure how to use it, it just asks me for a "flash_all_lock.bat" file which wasnt included, and that i dont have)
-switching USB cables and doing all of the above (same results)
-switching to a USB 2.0 port and using both cables to do all of the above (same results...)
if anyone has had this issue, or has any clue how to resolve it, or maybe just to shine some light on how to use the Mi Flash Tool to flash a room without a flash all bat, that'd be swell
nemii said:
i wanted to install a custom rom onto my phone. to make a long story short, i was foolish and because it'd been a while, i ended up bricking my phone.
it boots to fastboot, but nothing else.
so far, i have tried:
- flashing TWRP recovery (succeeds in flashing but goes back to fastboot after rebooting)
-booting directly into TWRP (fails with the error "Failed to load/authenticate boot image: Load Error")
-using the Mi Flash Tool to flash an MIUI install (frankly im not sure how to use it, it just asks me for a "flash_all_lock.bat" file which wasnt included, and that i dont have)
-switching USB cables and doing all of the above (same results)
-switching to a USB 2.0 port and using both cables to do all of the above (same results...)
if anyone has had this issue, or has any clue how to resolve it, or maybe just to shine some light on how to use the Mi Flash Tool to flash a room without a flash all bat, that'd be swell
Click to expand...
Click to collapse
I had a few troubles when I wiped all the data off my phone and the only way to get the phone working again was to manually flash the files our phone needs.
Check this out here -> https://forum.xda-developers.com/t/...-mix-3-5g-stable.3941867/page-5#post-82937133
You have to use the official miui tools (miflash) (https://androidmtk.com/download-xiaomi-mi-flash-tool) as well as appropriate fastboot miui rom (the file you want ends in .tgz)(https://xiaomifirmwareupdater.com/archive/miui/andromeda/).
After downloading your files, put miflash in the root directory of your C:\ drive. Then keep on extracting the rom archive untill you end up with a folder and also put it in the root directory of your C:\ drive.
Reboot the phone into fastboot mode and connect it to your computer.
Then use miflash, select the rom folder, and completely wipe and reflash your phone (remembering to select the option to not relock the bootloader). If the flash fails, try changing your cable.
You then allow for a couple of minutes for miui to start and format the internal storage.