Accidentally formatted sdcard prior to flashing - Nexus 7 General

Hey guys, I need some help here
I accidentally formatted the sdcard when preparing a clean flash. I also formatted system ect. so now all I can do is boot into recovery but no files to flash.
Is there some way I can transfer files to the sdcard og another way to get the device working again?
Thanks in advance.

You are softbricked. Restore factory image using wugfresh
http://www.wugfresh.com/nrt/

Download the factory images, boot into bootloader (not recovery) by holding power+down, then flash the factory images.

I'm in exactly the same boat here, but every time I try to use fastboot commands, I get a write failed. I'm fairly certain the drivers are installed properly, as fastboot devices shows me the device. What else could be done?

codemonkey85 said:
I'm in exactly the same boat here, but every time I try to use fastboot commands, I get a write failed. I'm fairly certain the drivers are installed properly, as fastboot devices shows me the device. What else could be done?
Click to expand...
Click to collapse
Give the exact steps and exact messages, cut and paste is best, otherwise there is not enough info to go on.

I installed the drivers using Nexus Root Toolkit 1.5.5. (I used option #2, which is to install the signed drivers.)
I copied the extracted contents of the Nexus 7 4.2 factory image into my adb folder. I ran a command prompt in that folder.
I type: fastboot devices
I get: 015d25687443fe0f fastboot
I type: fastboot flash bootloader bootloader-grouper-4.13.img
I get: FAILED (command write failed (Unknown error))
I type: fastboot -w update image-nakasi-jop40c.zip
I get: FAILED (command write failed (Unknown error))

Well, I don't know how or why, but I just tried the same thing again using the Nexus Toolkit and it worked this time. I'm booting into a stock ROM right now.

Im unable to turn on USB debugging, cause i have no ROM. What to do?

codemonkey85 said:
I installed the drivers using Nexus Root Toolkit 1.5.5. (I used option #2, which is to install the signed drivers.)
I copied the extracted contents of the Nexus 7 4.2 factory image into my adb folder. I ran a command prompt in that folder.
I type: fastboot devices
I get: 015d25687443fe0f fastboot
I type: fastboot flash bootloader bootloader-grouper-4.13.img
I get: FAILED (command write failed (Unknown error))
I type: fastboot -w update image-nakasi-jop40c.zip
I get: FAILED (command write failed (Unknown error))
Click to expand...
Click to collapse
exactly the same error im getting.. how did you solve it?

Tried again on another USB port and now it worked.
Thanks for the help guys.

codemonkey85 said:
Well, I don't know how or why, but I just tried the same thing again using the Nexus Toolkit and it worked this time. I'm booting into a stock ROM right now.
Click to expand...
Click to collapse
Out of interest why didn't you just run the small script that comes with the factory image to wipe and reflash everything.
It's what I did to make sure I had a nice clean install.
Or were you trying to keep some data from /data for example.

Related

[Q] [TOOL] Help BhunDven

Hey guys I'm mostly a lurker not too much of a poster I would respond to "BHUNDVEN"'s thread ([TOOL] Moto X FXZ Flashing Script (100% back to stock) [10/03/2013]) over on the OG Android development sections but alas my "Post count" is too low.
I keep getting this when trying to run the final command "moto-x-flash [insert .xml file]"
Any help? Thanks!
Last login: Thu Nov 7 00:31:17 on ttys001
jeffreys-mbp:~ jeffreymarshall$ cd desktop/moto-x-tools-0.2.0
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$ sudo python setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
changing mode of /usr/local/bin/moto-x-flash to 755
running install_egg_info
Removing /Library/Python/2.7/site-packages/moto_x_tools-0.2.0-py2.7.egg-info
Writing /Library/Python/2.7/site-packages/moto_x_tools-0.2.0-py2.7.egg-info
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$ moto-x-flash VZW_XT1060_4.2.2-13.9.0Q2.X-116-MX-17-53_CFC_1FF.xml
Traceback (most recent call last):
File "/usr/local/bin/moto-x-flash", line 24, in <module>
tree = ET.parse(firmware_xml)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
parser.feed(data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 2
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$
I'm not to sure I have the python pkg installed correctly. Had to use the "sudo" command to get it to take.
AceBoonKoon said:
I'm not to sure I have the python pkg installed correctly. Had to use the "sudo" command to get it to take.
Click to expand...
Click to collapse
i cant help you with that toolkit as i don't use it. But if you are merely trying to flash your phone to stock then find the rsd back to 100% stock thread and do that. Just as simple as any other tool you can find.
But honestly, if you spent say 4 hours reading and installing things for adb/fastboot stuff, you won't ever need one of those tools and you won't ever again spend countless hours trying to figure out how to get some tool someone created to work correctly for your phone. The simple sometimes becomes the most time consuming.
Once you figure out a few commands and realize whats going on, you will understand how simple all of that stuff is, and then will be confused as to why anyone ever created a tool for that simple task. Not bashing on the people that created the toolkit, that helps hundreds of people out I'm sure that dont feel like reading a little bit.
memapp can
I would but this [TOOL] is for mac.
No windows machine ala no rsdlite. I did however see that I needed to rename the .xml file to a .zip file ... Then extract the contents and move them over to the moto-x-tools folder and tried flashing it that way but got a "Command not found" error.
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$ moto-x-flash VZW_XT1060_4.2.2-13.9.0Q2.X-116-MX-17-53_CFC_1FF.xml
Running: fastboot oem fb_mode_set
/bin/sh: fastboot: command not found
Running: fastboot flash partition gpt.bin
/bin/sh: fastboot: command not found
Running: fastboot flash motoboot motoboot.img
/bin/sh: fastboot: command not found
Running: fastboot flash logo logo.bin
/bin/sh: fastboot: command not found
Running: fastboot flash boot boot.img
/bin/sh: fastboot: command not found
Running: fastboot flash recovery recovery.img
/bin/sh: fastboot: command not found
Running: fastboot flash system system.img
/bin/sh: fastboot: command not found
Running: fastboot flash modem NON-HLOS.bin
/bin/sh: fastboot: command not found
Running: fastboot erase modemst1
/bin/sh: fastboot: command not found
Running: fastboot erase modemst2
/bin/sh: fastboot: command not found
Running: fastboot flash fsg fsg.mbn
/bin/sh: fastboot: command not found
Running: fastboot erase cache
/bin/sh: fastboot: command not found
Running: fastboot erase userdata
/bin/sh: fastboot: command not found
Running: fastboot erase customize
/bin/sh: fastboot: command not found
Running: fastboot erase clogo
/bin/sh: fastboot: command not found
Running: fastboot oem config carrier vzw
/bin/sh: fastboot: command not found
Running: fastboot oem fb_mode_clear
/bin/sh: fastboot: command not found
Flashing was successful!
Running: fastboot reboot
/bin/sh: fastboot: command not found
jeffreys-mbp:moto-x-tools-0.2.0 jeffreymarshall$
jayboyyyy said:
i cant help you with that toolkit as i don't use it. But if you are merely trying to flash your phone to stock then find the rsd back to 100% stock thread and do that. Just as simple as any other tool you can find.
But honestly, if you spent say 4 hours reading and installing things for adb/fastboot stuff, you won't ever need one of those tools and you won't ever again spend countless hours trying to figure out how to get some tool someone created to work correctly for your phone. The simple sometimes becomes the most time consuming.
Once you figure out a few commands and realize whats going on, you will understand how simple all of that stuff is, and then will be confused as to why anyone ever created a tool for that simple task. Not bashing on the people that created the toolkit, that helps hundreds of people out I'm sure that dont feel like reading a little bit.
Click to expand...
Click to collapse
In response to the fastboot commands suggestion - I have already tried using the adb/fastboot methods didn't work. Did a search for people with similar issues and found that it has something about it being on a mac or some other nonsense. That's the reason for the [TOOL] I think. It's a workaround.
AceBoonKoon said:
In response to the fastboot commands suggestion - I have already tried using the adb/fastboot methods didn't work. Did a search for people with similar issues and found that it has something about it being on a mac or some other nonsense. That's the reason for the [TOOL] I think. It's a workaround.
Click to expand...
Click to collapse
don't know where you fastboot is but i believe its trying to call it and its not in the directory that the cmd is pointed to.
Ok I've went down the list and manually flashed each command.
When I get to ./fastboot flash system system.img
I keep getting this error
"Mismatched PIV partition name for system
Invalid PIV image: system"
I can successfully flash all other commands except this one. I went into the .xml file and deleted the "getvar" portion already. Any help?
AceBoonKoon said:
Ok I've went down the list and manually flashed each command.
When I get to ./fastboot flash system system.img
I keep getting this error
"Mismatched PIV partition name for system
Invalid PIV image: system"
I can successfully flash all other commands except this one. I went into the .xml file and deleted the "getvar" portion already. Any help?
Click to expand...
Click to collapse
not sure about the error sorry. also you might want to click on the reply button so it appears as a notification for me or i might not ever look at the thread again if i forget, jsut fyi.
are you sure you are using the right fxz for your phone? also when you run manual commands in fastboot, the xml file doesn't matter. that file is just there for rsd and other programs to use (it is basically just a script of commands that gets called on by programs to run). i don't know if you are typing "./fastboot" instead of just "fastboot" in cmd prompt but you only need to type "fastboot flash system system.img"
jayboyyyy said:
not sure about the error sorry. also you might want to click on the reply button so it appears as a notification for me or i might not ever look at the thread again if i forget, jsut fyi.
are you sure you are using the right fxz for your phone? also when you run manual commands in fastboot, the xml file doesn't matter. that file is just there for rsd and other programs to use (it is basically just a script of commands that gets called on by programs to run). i don't know if you are typing "./fastboot" instead of just "fastboot" in cmd prompt but you only need to type "fastboot flash system system.img"
Click to expand...
Click to collapse
Thanks for the fyi didn't know. I've tried flashing both fxz's for my phone and nothing both keep saying the same error Mismatched PIV. Thanks for the schooling on the xml file didn't know that. Going to keep searching.
AceBoonKoon said:
Thanks for the fyi didn't know. I've tried flashing both fxz's for my phone and nothing both keep saying the same error Mismatched PIV. Thanks for the schooling on the xml file didn't know that. Going to keep searching.
Click to expand...
Click to collapse
both? you can't just flash both like that. are you sure you are doing all of this right? one for your phone is a different FW version than the other one. This could be why you are getting this mismatch. Also, you would need to unzip and move all of the files to the directory that your fastboot is in. Then if you were trying to flash a different fxz, you would need to remove the old files from that directory and replace them with the new fxz files.
Finally, the commands to run manually will be found at this link. http://forum.xda-developers.com/showthread.php?p=46712761&highlight=flash+stock#post46712761
jayboyyyy said:
both? you can't just flash both like that. are you sure you are doing all of this right? one for your phone is a different FW version than the other one. This could be why you are getting this mismatch. Also, you would need to unzip and move all of the files to the directory that your fastboot is in. Then if you were trying to flash a different fxz, you would need to remove the old files from that directory and replace them with the new fxz files.
Finally, the commands to run manually will be found at this link. http://forum.xda-developers.com/showthread.php?p=46712761&highlight=flash+stock#post46712761
Click to expand...
Click to collapse
Now it's saying that can't downgrade when trying to flash the bootloader and it still won't flash the system.img same error.
I think I messed up when I tried to flash the "newer" FXZ. To see if I could get it to go through.
AceBoonKoon said:
I think I messed up when I tried to flash the "newer" FXZ. To see if I could get it to go through.
Click to expand...
Click to collapse
ya you can't flash the old one anymore. it will fail. you should be able to flash the new system img though. just make sure you are using the right one for your device. couldn't find anything on the internet for that particular error. So not many people run into it. It has to be something you are doing. try redownloading the fxz (the correct new fxz for your phone) and then start over from the beginning of the code and flash all the new stuff.
jayboyyyy said:
ya you can't flash the old one anymore. it will fail. you should be able to flash the new system img though. just make sure you are using the right one for your device. couldn't find anything on the internet for that particular error. So not many people run into it. It has to be something you are doing. try redownloading the fxz (the correct new fxz for your phone) and then start over from the beginning of the code and flash all the new stuff.
Click to expand...
Click to collapse
The fastboot flashes through every command flawlessly all EXCEPT the system.img. Keeps saying the bootloader preauthorization failed. I've flashed it every which way, straight through, at random, only the recovery, bootloader, and system.img. Can't get it to play nice.
I did read somewhere that mac fastboot had an issue with how large the system file was for VZW's moto x and couldn't flash it. Someone said that rsd lite breaks it up into smaller pieces in order to get it to flash. I wonder if there is a manual way to do this?
AceBoonKoon said:
The fastboot flashes through every command flawlessly all EXCEPT the system.img. Keeps saying the bootloader preauthorization failed. I've flashed it every which way, straight through, at random, only the recovery, bootloader, and system.img. Can't get it to play nice.
I did read somewhere that mac fastboot had an issue with how large the system file was for VZW's moto x and couldn't flash it. Someone said that rsd lite breaks it up into smaller pieces in order to get it to flash. I wonder if there is a manual way to do this?
Click to expand...
Click to collapse
forgot you were using a mac. just throw that thing away and get a big boy computer. lol. jk. don't need to start hearing a bunch of people chime in but here is a link to a fastboot file that splits it up for you. don't know if it will help or not.
http://forum.xda-developers.com/showthread.php?t=2489249
jayboyyyy said:
forgot you were using a mac. just throw that thing away and get a big boy computer. lol. jk. don't need to start hearing a bunch of people chime in but here is a link to a fastboot file that splits it up for you. don't know if it will help or not.
http://forum.xda-developers.com/showthread.php?t=2489249
Click to expand...
Click to collapse
I went and downloaded the "motofastboot-olympus" file and extracted the Linux fastboot file and placed in my folder replacing the current fastboot and now when I try to run a fastboot command I get "./fastboot: cannot execute binary file" I've tried the "Darwin" fastboot as well same thing.
AceBoonKoon said:
I went and downloaded the "motofastboot-olympus" file and extracted the Linux fastboot file and placed in my folder replacing the current fastboot and now when I try to run a fastboot command I get "./fastboot: cannot execute binary file" I've tried the "Darwin" fastboot as well same thing.
Click to expand...
Click to collapse
i see that you actually searched for this answer because i went to that mac thread i remembered seeing to see if there was a solution there. so you can just factory reset the device right? you don't need the system.img there to factory reset i don't think. just try a factory reset.
just found this. try downloading the nexus for stuff. pull the fastboot-mac file or whatever it is out of it. run all your commands with the "./fastboot-mac" and see if it works now.
jayboyyyy said:
i see that you actually searched for this answer because i went to that mac thread i remembered seeing to see if there was a solution there. so you can just factory reset the device right? you don't need the system.img there to factory reset i don't think. just try a factory reset.
Click to expand...
Click to collapse
I've been searching all day for all of these answers. Just thought it would help to ask as well.
I found the solution to my problem. For any of those who are having trouble flashing back to stock ON A MAC It will not flash because the system.img file is TOO BIG you need the CORRECT version of Moto-Fastboot. Here's the link that you can download and place it in your "Fastboot" folder. http://forum.xda-developers.com/showthread.php?t=1138092
I suggest you hold on to that fastboot for future flashes/return to stock. Thank you for your help jayboyyyy!
AceBoonKoon said:
I've been searching all day for all of these answers. Just thought it would help to ask as well.
I found the solution to my problem. For any of those who are having trouble flashing back to stock ON A MAC It will not flash because the system.img file is TOO BIG you need the CORRECT version of Moto-Fastboot. Here's the link that you can download and place it in your "Fastboot" folder. http://forum.xda-developers.com/showthread.php?t=1138092
I suggest you hold on to that fastboot for future flashes/return to stock. Thank you for your help jayboyyyy!
Click to expand...
Click to collapse
nice find. im going to update that thread i made with this link instead of the link i had because it seems to have fastboot for everyone.

Nexus 6 Upgrade to 6.0 FAIL

So 6.0 comes out today but not only is my phone rooted it's also an ATT variant, so I am screwed from my update.
I find this thread (http://forum.xda-developers.com/nexus-6/general/using-image-to-update-nexus-6-data-loss-t3053158) to try and update it using the factory image. I thought everything went well. Couple hicciups the factory image was in .08 and mine was .15 and the radio was WAY outdated so after fixing those everything goes according to plan. For over an hour I get a Google logo, wait and wait nothing changes. I can't bootload into recovery or anything. Then I try it again this time I add teamwin recovery but prevail, no.
So for the hell of it I try VERY carefully and slowly to type in the commands double checking every line the last command system.img gives me this warning "(bootloader) Data size exceeds download buffer FAILED (remote failure)"
Odd. I go through the tutorial again and again getting the same, So I decided to start from scratch. Again
I then completely wipe everything with the exception of locking the bootloader. Still no 6.0 just some minor updates.
I go back and try getting rid of the Android SDK, the factory image file and .zip file as well as the simple ADB and fastboot.sh for Mac and run the uninstall for ADB and fastboot. Restart the computer. Not fastboot commands won't work. Reinstall the ADB and fastboot.sh, system says A-okay. Now I get a "-bash -bash: fastboot: command not found"
What is going on. My mac and my nexus hate me please please help.
UPDATE.
Reinstalled Android SDK installed the SDK tools and platform tools by clicking the excitable file "Android" placed the ADB and FASTBOOT files from the tools into my factory image files and then used "./" before the every fastboot command and it worked.

Error when trying to flash Android M to stock Nexus 6

Hey guys. So I've been trying to manually update with no success so far. I was going to sideload, but I got the November security update ota and there is no ota file for LMY48X to Marshmallow (as far as I know). So I bit the bullet and unlocked the bootloader yesterday, and got the adb and fastboot set up and tried to run the ./flash-all.sh command. (I'm on a Mac) Everything was going fine until I came across an error. So I basically gave up and restored all my user data.
Today I figured I'd try again since I have already unlocked my bootloader and have nothing to lose. mra58k didn't work, so I figured I'd try the mra58n image and removed the -w command from the flash-all.sh and tried again. This is what I got:
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
fastboot(69137) malloc: *** mmap(size=2094391296) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
failed to allocate 2092296104 bytes
error: update package missing system.img
Can anyone help me out? I have a feeling I won't be getting the ota through my phone anytime soon.
I may be wrong as this is a pure guess, but did you check the download to confirm it met the checksum? You might just try deleting your download and redownloading the latest version.
haibane said:
I may be wrong as this is a pure guess, but did you check the download to confirm it met the checksum? You might just try deleting your download and redownloading the latest version.
Click to expand...
Click to collapse
No it is Google. Same here. Flashall.bat stops after flashing m-bootloader and m-radio.
After that it is needed to extract all the images and fastboot flash every image.
Don't use the flash-all.sh file to flash, flash the files manually. Plenty of guides outline the commands to use. Plus, make sure that you're Android SDK Tools is updated to the latest version.
RMarkwald said:
Don't use the flash-all.sh file to flash, flash the files manually. Plenty of guides outline the commands to use. Plus, make sure that you're Android SDK Tools is updated to the latest version.
Click to expand...
Click to collapse
Thanks for the reply. So I went ahead and followed your advice and tried to do it manually. I checked everything was up to date. I flashed the bootloader, radio, recovery and boot images and rebooted the bootloader between every flash with no incident. Then I tried to flash the system.img and it first everything seemed to be ok but the terminal is stuck at "sending sparse 'system' " and hasn't done anything in 20 minutes. I'm afraid to do anything right now. Is it ok to close terminal, reopen it and try flashing the system.img again?
ICStevenC. said:
Thanks for the reply. So I went ahead and followed your advice and tried to do it manually. I checked everything was up to date. I flashed the bootloader, radio, recovery and boot images and rebooted the bootloader between every flash with no incident. Then I tried to flash the system.img and it first everything seemed to be ok but the terminal is stuck at "sending sparse 'system' " and hasn't done anything in 20 minutes. I'm afraid to do anything right now. Is it ok to close terminal, reopen it and try flashing the system.img again?
Click to expand...
Click to collapse
Hmmm...the system.img does take time but shouldn't take 20 minutes. Did you flash all the .img files separately, or did you use the command:
Code:
fastboot -w update image-shamu-mra58n.zip
?
I've never done any of this from a Mac, only Linux and Windows, but here's what I do when flashing manually. I extract the contents of the factory image zip, AND the image-shamu-mra58n.zip into my SDK directory (see image attached).
Once everything is extracted, after backing up things I wanna save on my device, I boot to the bootloader and go to town:
Code:
fastboot erase boot
Code:
fastboot erase cache
Code:
fastboot erase recovery
Code:
fastboot erase system
Code:
fastboot erase userdata
Code:
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.15.img
Code:
fastboot reboot-bootloader
Code:
fastboot flash radio radio-shamu-d4.01-9625-05.27+fsg-9625-02.104.img
Code:
fastboot reboot-bootloader
Code:
fastboot flash system system.img
Code:
fastboot flash boot boot.img
Code:
fastboot flash recovery recovery.img
Code:
fastboot flash cache cache.img
Code:
fastboot flash userdata userdata.img
Code:
fastboot reboot
RMarkwald said:
Hmmm...the system.img does take time but shouldn't take 20 minutes. Did you flash all the .img files separately, or did you use the command:
Code:
fastboot -w update image-shamu-mra58n.zip
?
Click to expand...
Click to collapse
No, I decompressed that zip and flashed them all separately using the
Code:
./fastboot flash
command and dragging the files directly to the terminal and then using
Code:
./fastboot reboot-bootloader
in between every flash.
ICStevenC. said:
No, I decompressed that zip and flashed them all separately using the
Code:
./fastboot flash
command and dragging the files directly to the terminal and then using
Code:
./fastboot reboot-bootloader
in between every flash.
Click to expand...
Click to collapse
Okay, seems like you're on the right path. See my post above. You'll erase everything first, then flash everything back one by one, kinda like what you are already doing. I've never had issues doing it this way ever, it may be overkill and it will wipe your phone completely, but if you've backed things up (pictures, docs, music, etc) beforehand, no biggie. The only times I reload the bootloader is after flashing the bootloader, and then the radio.
The system.img will take the longest, and userdata will take a little time too, but the others should be almost instant.
RMarkwald said:
Okay, seems like you're on the right path. See my post above. You'll erase everything first, then flash everything back one by one, kinda like what you are already doing. I've never had issues doing it this way ever, it may be overkill and it will wipe your phone completely, but if you've backed things up (pictures, docs, music, etc) beforehand, no biggie. The only times I reload the bootloader is after flashing the bootloader, and then the radio.
The system.img will take the longest, and userdata will take a little time too, but the others should be almost instant.
Click to expand...
Click to collapse
The terminal doesn't appear to be responding to any command now. I tried erasing boot and after pressing enter, nothing happened. Closing it and reopening it doesn't help. Should I try restarting my computer?
ICStevenC. said:
The terminal doesn't appear to be responding to any command now. I tried erasing boot and after pressing enter, nothing happened. Closing it and reopening it doesn't help. Should I try restarting my computer?
Click to expand...
Click to collapse
Yeah, give that a shot. As long as you have bootloader access you will be okay.
RMarkwald said:
Yeah, give that a shot. As long as you have bootloader access you will be okay.
Click to expand...
Click to collapse
I am now on 6.0 and everything appears to be functional. Thank you so much for all your help! I really appreciate it.
Awesome man! Glad I could help.

Mi A2 Can't flash anything via fastboot (bootloader unlocked, oem critical too)

When I flash TWRP
It shows me this
Code:
PS C:\adb> fastboot devices
******** fastboot
PS C:\adb> fastboot boot recovery.img
downloading 'boot.img'...
FAILED (command write failed (Invalid argument))
finished. total time: -0.000s
PS C:\adb>
and my mi a2 turned in to black screen and shows "press anything to shutdown" on the upper left corner
if I didn't use fastboot device first it shows me this
Code:
PS C:\adb> fastboot boot recovery.img
downloading 'boot.img'...
FAILED (command write failed (Too many links))
finished. total time: 0.003s
PS C:\adb>
I try to use another way
Code:
PS C:\adb> fastboot devices
******** fastboot
PS C:\adb> fastboot getvar current-slot
getvar:current-slot FAILED (command write failed (No such file or directory))
finished. total time: 0.000s
PS C:\adb>
But without fastboot devices
Code:
PS C:\adb> fastboot getvar current-slot
current-slot: a
finished. total time: -0.000s
PS C:\adb> fastboot flash boot_b recovery.img
sending 'boot_b' (41314 KB)...
FAILED (remote: unknown command)
finished. total time: 0.000s
already changed 3 different cable and try 8 usb port on my computer
tried adb installer 1.3 and 1.4.3
updated my Mi Usb Driver
I have never flash any a/b slot device before I have no idea what's going on
any my mi a2 still can boot into system and stock recovery
any solution please
sorry for my bad English.
-------------------------------------------------------------
UPDATE!!
I just use a USB2.0 Port (USB HUB)
and I got the problem solved!!!!
You are using the wrong recovery....check if developer op is on & usb debugging is enabled....also try to unlock you bootloader again......
bladehunter said:
You are using the wrong recovery....check if developer op is on & usb debugging is enabled....also try to unlock you bootloader again......
Click to expand...
Click to collapse
I'm using the TWRP For jasmine from this thread
also tried this too
I have my usb debugging on already and I also tried to lock my bootloader then unlock it again
the problem still there
(
same problem here , please help anyone
cs853120 said:
I'm using the TWRP For jasmine from this thread
also tried this too
I have my usb debugging on already and I also tried to lock my bootloader then unlock it again
the problem still there
(
Click to expand...
Click to collapse
reset your phone once then try........also try to unlock your boot loader & see if you can flash the stock rom from the official website......make sure that the entire rom file is in a folder on your desktop.......for some reason MI flash does not like long system paths.....
cs853120 said:
When I flash TWRP
It shows me this
and my mi a2 turned in to black screen and shows "press anything to shutdown" on the upper left corner
if I didn't use fastboot device first it shows me this
I try to use another way
But without fastboot devices
already changed 3 different cable and try 8 usb port on my computer
tried adb installer 1.3 and 1.4.3
updated my Mi Usb Driver
I have never flash any a/b slot device before I have no idea what's going on
any my mi a2 still can boot into system and stock recovery
any solution please
sorry for my bad English.
Click to expand...
Click to collapse
Hi there.
I have the same problem. Can't do anything with my phone on any USB 3.0/3.1-Port on my Ryzen desktop (works neither on Win10 nor Linux Mint). I have to use my old Win8.1 Intel laptop and there everything works flawlessly but only on the USB 2.0 port. I used the same tools/commands/Mi-drivers but it only works on the laptop. Tried different drivers for MB/USB-host controller and different cables but to no avail... Connecting the phone and mtp works but no adb/fastboot.
I read on different threads that other people have the same problem with other hardware setups but most of them were able to fix it with MB drivers from the manufacturer instead of the Windows ones. Maybe that could work for you.
For now I keep the laptop around for flashing my A2....
whenever you get "press any key to shutdown" on fastboot it's because of the usb port, use usb 2.0
I have the same problem , and change to 2.0 USB Ports works! Thanks!
Did you found a solution?
Please help. Facing exact same issue. Tried all USB ports on my PC. Switched between Ubuntu and Win10. All to no avail.
It's a USB 3 problem. I had it too in my laptop. You gotta find a USB 2 port, maybe in another PC. Good luck.
Sent from my Mi A2 using XDA Labs
i was also fasing same problem so what is did is
fastboot flashing unlock_critical
then
fastboot oem edl
and flashed stock
Mi A2 Boot loop
The first thing you'll want to do here is extract the factory images archive that you downloaded from your manufacturer's website. For that part, I'd recommend using 7-Zip, as it's free and works with most archive formats , move all of the contents of the archive to the platform-tools folder inside of your ADB installation directory, then open an ADB Shell window in this folder.
Flash the system images individually. This method takes some extra work, but it can be used to un-root, update, or un-brick your device without losing existing data.
Start by extracting any additional archives from the factory images package. Sometimes, factory images packages can contain a series of three or four nested archives, so make sure to unzip all of them. From there, copy all of the image files to the main platform-tools folder—in other words, don't leave them in any sub-folders.
there are two images that you can get rid of: cache.img and userdata.img. These are the images that will overwrite your data and cache with blank space, so if you don't flash them, your existing data will remain intact.
Of the remaining images, six make up the core elements of Android: boot, bootloader, radio, recovery, system, and vendor.
The boot image contains the kernel, so if you just want to get rid of a custom kernel that's causing issues with your device, you only have to flash this one. To do that, type the following command into the ADB shell window:
//
fastboot flash boot <boot image file name>.img
//
Next is the bootloader image—this is the the interface that you're using to flash images with Fastboot commands. So to update your bootloader, type:
fastboot flash bootloader <bootloader image file name>.img
//
Once you've done that, you should reload the bootloader so that you can continue flashing images on the newer version. To do that, type:
fastboot reboot-bootloader
//
After that, we have the radio image. This one controls connectivity on your device, so if you're having problems with Wi-Fi or mobile data, or if you just want to update your radio, type:
fastboot flash radio <radio image file name>.img
//
Then there's recovery. This is something you may or may not want to flash, depending on the modifications you've made. For example, if you've installed TWRP custom recovery, flashing this image will overwrite your modification and replace it with the stock recovery interface. So if you're just updating your modded device, you should skip this one. Otherwise, if you plan to keep your phone stock and want the newer version of stock recovery, type:
fastboot flash recovery <recovery file name>.img
//
Next up is the big one: The system image. This one contains all of the files that make up the actual Android OS. As such, it's the most essential part of any update.
However you may not be updating your phone. You may just be re-flashing the stock firmware to recover from a soft brick. If this is the case, the system image is often the only image you need to flash in order to fix everything, because it contains the entirety of Android. In other words, if you flash this image and nothing else, it will undo any changes you made with root access and put everything back the way it was.
So as a cure-all in most soft brick situations, or as a method for getting the core part of an Android update, type:
fastboot flash system <system file name>.img
//
Finally, there's the vendor image. This is only present on newer phones, so don't worry if it's not in your factory images package. But if it's there, it contains a few important files, so type the following line to get this partition updated:
fastboot flash vendor <vendor file name>.img
//
After you've sent any or all of the above commands, you'll be ready to restart your device and boot into Android. To do that, type:
fastboot reboot
/
Thanks to Android gadget hacks .
P.S : Including today , it was 22nd time that i rooted , enabled camera2api .. but i think till know its useless .
After dealing with this issue for a long time I found that using a USB hub solved it for me.
This is the one I'm using: https://es.aliexpress.com/item/USB-...342.html?spm=a2g0s.9042311.0.0.1d6e63c04tJJe6
Hope this helped!
the same problem
have tried all USB port, unfortunately, no success
Hi everyone,
Today I have a big problem
I install jasmine__V10.0.8.0.PDIMIXM and after I set "fastboot oem lock" but Now my MI A2 Can't enter in OS.
I have this message on screen
"Your device has loaded a different operation system"
and another page says
"Your device software can'tbe checked for corruption. Plese lock the bootlader.
But when I check in fastboot I have bootloader locked.
Any suggestion to unlock ? I can't enter in OS.
Thanks
HELP
bladehunter said:
You are using the wrong recovery....check if developer op is on & usb debugging is enabled....also try to unlock you bootloader again......
Click to expand...
Click to collapse
Can you help me with my thread?? Thank you!
Same error.
Download TWRP and TWRP installer
DONT CONNECT YOUR PHONE!!
Put your phone in Fastboot
in cmd type
fastboot boot twrp.img (twrp name instead of twrp.img)
Then when you see <Waiting for Device> connect your phone !
Check if it's working.
This was fix for me, when I was unable to even boot into recovery.
Once you boot into recovery, wipe everything, flash twrp zip, and error should be gone
Hey guys,
same issue here but i don't have any usb2.0 port on my laptop now. Any workaround? Totally sure that i used fastboot + usb3.0 on Sony, LG, Samsung ROMs with no hassles whatsoever. Is this only happening with Xiaomi?
Cheers

Help me recover my motorola g5s plus Android phone

Hi All,
I need help from you experts to recover my phone moto g5s plus
Type : M271C Model : XT1806
The phone was working without any issues but suddenly got restarted and now i's stuck in the "Fast Boot Flash" Mode.
It cannot boot and the "Boot Loader Log" screen says below.
"Start Up Failed:
Your Device did not startup successfully.
Use the software repair assistant on computer to repair your device.
Connect your device to your computer to get the software repair assistant.
AP Fastboot Flash Mode (Secure)
failed to validate boot image
ERROR: Failed to pass validation, backup to fastboot
Fastboot reason : Fall Through from normal boot mode
USB Connected"
1. I installed the "Rescue and Smart Assistant" software and tried to recover from there but unfortunately it does not recognize my phone model.
2. Tried to install Install TWRP Custom Recovery tool. But I cannot do it because the "USB debugging " is not enabled on the phone.
3. 'USB debugging"and "OEM Unlock" on my Android device is not enabled so I cannot Unlock Bootloader
Is there any way that I can boot into recovery or install a custom ROM without having the "USB Debugging" and "OEM Unlock" Enabled in my phone?
Thanks
Are you using adb for recovery?
andres_vacal said:
Are you using adb for recovery?
Click to expand...
Click to collapse
No. ADB cannot be used since my device is not enabled "USB Debugging"
USB debugging should not be required to unlock the bootloader as you are using fastboot commands to unlock the bootloader rather than ADB commands.
Try "fastboot reboot recovery"
andres_vacal said:
USB debugging should not be required to unlock the bootloader as you are using fastboot commands to unlock the bootloader rather than ADB commands.
Try "fastboot reboot recovery"
Click to expand...
Click to collapse
I get following error when I run that command.
Rebooting into recovery FAILED (remote: 'Unknown command')
fastboot: error: Command failed
dharshana1 said:
I get following error when I run that command.
Rebooting into recovery FAILED (remote: 'Unknown command')
fastboot: error: Command failed
Click to expand...
Click to collapse
Okay, I think I untherstand whats happening. Its probable that any way or another you deleted your recovery or directly your ROM.
So i´ll recommend you to download and run TWRP(You can look out on the internet for your specific device)
If it runs correctly, go to reboot and check out if in the top part says "No OS installed", if it says that, then you will have to lock out for a compatible ROM and instal it.
If you have any thoughts let me know how it goes..
andres_vacal said:
Okay, I think I untherstand whats happening. Its probable that any way or another you deleted your recovery or directly your ROM.
So i´ll recommend you to download and run TWRP(You can look out on the internet for your specific device)
If it runs correctly, go to reboot and check out if in the top part says "No OS installed", if it says that, then you will have to lock out for a compatible ROM and instal it.
If you have any thoughts let me know how it goes..
Click to expand...
Click to collapse
Hello,
Thanks for the reply, I tried to install the TWRP tool that is for my specific device, but it won't allow me to install since "USB debugging" is not enabled in my device.
Is there any other way to install that without USB debugging enabled?
Thanks
Okay, so i´ll try to explain in detail how to install TWRP via Fastboot commands (No usb debugging needed since you are using fastboot)
1. Make sure you have all the specific drivers for using fastboot.
2. Type "fastboot devices" and make sure your device appears on the command prompt
(it should apper something like "5f684fe2").
3. Type "fastboot erase recovery" to make sure the old recovery is no longer avaiable in your device.
4. Send the TWRP.img file that you already have to the adb folder you are using on the command prompt
5. Type "fastboot flash recovery TWRP.img" ("TWRP" is the recovery´s name you have saved)
6. Tyoe "fastboot reboot recovery" and see if TWRP is now installed.
Important note: Make sure you have saved all the important files from your phone.
If this doesn´t fuction, after you make step 2 succesfully:
Type these 3 commands:
"fastboot erase system"
"fastboot erase data"
"fastboot erase cache"
and "fastboot reboot"
Then repeat the instalation process.
andres_vacal said:
Okay, so i´ll try to explain in detail how to install TWRP via Fastboot commands (No usb debugging needed since you are using fastboot)
1. Make sure you have all the specific drivers for using fastboot.
2. Type "fastboot devices" and make sure your device appears on the command prompt
(it should apper something like "5f684fe2").
3. Type "fastboot erase recovery" to make sure the old recovery is no longer avaiable in your device.
4. Send the TWRP.img file that you already have to the adb folder you are using on the command prompt
5. Type "fastboot flash recovery TWRP.img" ("TWRP" is the recovery´s name you have saved)
6. Tyoe "fastboot reboot recovery" and see if TWRP is now installed.
Important note: Make sure you have saved all the important files from your phone.
If this doesn´t fuction, after you make step 2 succesfully:
Type these 3 commands:
"fastboot erase system"
"fastboot erase data"
"fastboot erase cache"
and "fastboot reboot"
Then repeat the instalation process.
Click to expand...
Click to collapse
Hi,
Thank you so much for the reply. I can see a device when I run the "fastboot devices" command. But when I tried above other commands (fastboot erase ...) they failed with below error.
Erasing 'recovery' (bootloader) Permission denied
FAILED (remote: '')
fastboot: error: Command failed
Erasing 'system' (bootloader) Permission denied
FAILED (remote: '')
fastboot: error: Command failed
Erasing 'data' (bootloader) Permission denied
FAILED (remote: '')
fastboot: error: Command failed
when I run the fastboot erase cache command below error throws
Erasing 'cache' (bootloader) Failed to erase partition
FAILED (remote: '')
fastboot: error: Command failed
Thank you for your time helping me resolve this issue, anything else that I can try out?
Okay so I think your phone´s bootloader is locked.
So try this out: https://forum.xda-developers.com/t/...der-root-and-recovery-for-the-moto-g.3418432/ (Unloock bootloader section)
Hopefully it will get your bootloader unlocked and then you will be ready to do the process I posted before.
This is going harder than I thought.
dharshana1 said:
Hi All,
I need help from you experts to recover my phone moto g5s plus
Type : M271C Model : XT1806
The phone was working without any issues but suddenly got restarted and now i's stuck in the "Fast Boot Flash" Mode.
It cannot boot and the "Boot Loader Log" screen says below.
"Start Up Failed:
Your Device did not startup successfully.
Use the software repair assistant on computer to repair your device.
Connect your device to your computer to get the software repair assistant.
AP Fastboot Flash Mode (Secure)
failed to validate boot image
ERROR: Failed to pass validation, backup to fastboot
Fastboot reason : Fall Through from normal boot mode
USB Connected"
1. I installed the "Rescue and Smart Assistant" software and tried to recover from there but unfortunately it does not recognize my phone model.
2. Tried to install Install TWRP Custom Recovery tool. But I cannot do it because the "USB debugging " is not enabled on the phone.
3. 'USB debugging"and "OEM Unlock" on my Android device is not enabled so I cannot Unlock Bootloader
Is there any way that I can boot into recovery or install a custom ROM without having the "USB Debugging" and "OEM Unlock" Enabled in my phone?
Thanks
Click to expand...
Click to collapse
Just got the same issue..
Did you get it resolved?
andres_vacal said:
Okay so I think your phone´s bootloader is locked.
So try this out: https://forum.xda-developers.com/t/...der-root-and-recovery-for-the-moto-g.3418432/ (Unloock bootloader section)
Hopefully it will get your bootloader unlocked and then you will be ready to do the process I posted before.
This is going harder than I thought.
Click to expand...
Click to collapse
Well this guy has given same steps , but while unlocking bootloader
fastboot oem get_unlock_data
is not working at all, its giving same error which @dharshana1 has mentioned before.
I'm using this cell last three years, it started acting slow all of a sudden and then this thing has happened.
smandar said:
Well this guy has given same steps , but while unlocking bootloader
fastboot oem get_unlock_data
is not working at all, its giving same error which @dharshana1 has mentioned before.
I'm using this cell last three years, it started acting slow all of a sudden and then this thing has happened.
Click to expand...
Click to collapse
I worked with this model 3 weeks ago, and the thing is that in order to unlock bootloader you will need to go to motorola´s web page for getting a password. in this thread you will find how it goes. I untherstand that amazon's versions are unable to unlock bootloader so if you are into that version, bad luck.

Categories

Resources