yashsingh1/xdaforums huggingface dataset:
[Nexus 5 General] Thisal:
Yes i have unlocked the bootloader

here is the full log

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot flash bootloader bootloader.img

target reported max download size of 1073741824 bytes

sending 'bootloader' (2579 KB)...

OKAY [ 0.295s]

writing 'bootloader'...

OKAY [ 0.459s]

finished. total time: 0.763s

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot reboot-bootloader

rebooting into bootloader...

OKAY [ 0.004s]

finished. total time: 0.005s

C:\Users\Thisal\Downloads\hammerhead-lmy47d>

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot flash radio radio.img

target reported max download size of 1073741824 bytes

sending 'radio' (45425 KB)...

OKAY [ 1.612s]

writing 'radio'...

OKAY [ 3.115s]

finished. total time: 4.733s

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot reboot-bootloader

rebooting into bootloader...

OKAY [ 0.004s]

finished. total time: 0.006s

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot flash system system.img

target reported max download size of 1073741824 bytes

error: cannot load 'system.img'

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot flash recovery recovery.img

target reported max download size of 1073741824 bytes

sending 'recovery' (9648 KB)...

OKAY [ 0.504s]

writing 'recovery'...

OKAY [ 0.801s]

finished. total time: 1.312s

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot flash boot boot.img

target reported max download size of 1073741824 bytes

sending 'boot' (8930 KB)...

OKAY [ 0.496s]

writing 'boot'...

OKAY [ 0.758s]

finished. total time: 1.259s

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot flash cache cache.img

target reported max download size of 1073741824 bytes

erasing 'cache'...

OKAY [ 0.448s]

sending 'cache' (13348 KB)...

OKAY [ 0.637s]

writing 'cache'...

OKAY [ 1.074s]

finished. total time: 2.170s

C:\Users\Thisal\Downloads\hammerhead-lmy47d>fastboot flash system system.img

target reported max download size of 1073741824 bytes

error: cannot load 'system.img'
[Nexus 5 General] efrant:
Try this:

fastboot -S 512M flash system C:\image-hammerhead-krt16m\system.img
[Nexus 5 General] Thisal:
yessssssssssssssssssssss... thnxxxxxx bro finnaly it worked for me
[Nexus 5 General] Tassadar81:
Guys i need help for my nexus 5

i've flashed lastest marshmallow official img and i got a 16gb nexus 5 instead of a 32 one. So i've followed the #2 steps to restore the correct size but it's more than half an hour that my nexus is showing the marshmallow boot animation and it seems stuck in this status. What i've to do? :( :confused:
[Nexus 5 General] Primokorn:
Did you try a wipe cache and factory reset?
[Nexus 5 General] mishra.sunny:
Unable to format Nexus 5 on factory settings.

MY phone was in hag mode after few crashes in google apps. I forcefully tried to reboot the phone but it stuck on Google logo for few mins then stayed forever on flying color leafs. Went into bootloader mode tried to wipe data but getting few error messages.

E: Failed to mount /cache (Invalid argument)

E : Can't mount /cache/recovery/logs

While trying Method 2 on Phone getting these error messages.

target reported max download size of 1073741824 bytes

sending 'bootloader' (3120 KB)...

OKAY [ 0.302s]

writing 'bootloader'...

FAILED (remote: flash write failure)

finished. total time: 0.506s

I cant post images for XDA policies. Please help.
[Nexus 5 General] Tassadar81:
I've tried to get into the recovery mode, when the droid with red triangle appeared i push power and up volume together but nothing happened.... so i've tried the second method but nothing!

---------- Post added at 10:27 AM ---------- Previous post was at 09:57 AM ----------

I've solved!

I've re-flashed the firmware, and then i could get access to the recovery, then do a wipe cache / factory reset and now i've a 32gb nexus
[Nexus 5 General] Primokorn:
Use /format cache in your recovery if the option is available. Do you have an unlocked bootloader?

Good news :)
[Nexus 5 General] pcphobic:
How to manually flash Android 6.0 Marshmallow to your Nexus 5

I wrote a guide for those who wanna manually flash Android 6.0 Marshmallow to their Nexus 5 if they cannot wait for the OTA

- https://app.box.com/s/503xightidtkcj8i0a4hht4t0k7zm0nk
[Nexus 5 General] mag01:
I've got a simple question that I couldn't find an answer for.

If I perform factory reset (normally from the recovery as described in the 1st post here), then boot and perform the initial necessary setup, then when I check "Usage statistics" in the Testing menu (that appears after dialing *#*#4636#*#*) I can still see the old data there - e.g. data that precede the factory reset which means there are some data that survive it. Has anyone figured out how to wipe this stuff as well?
[Nexus 5 General] Lordificated:
good one!

sometimes flash-all.bat wont due to adb issues. so it would be great if you could add step by step flashing for system userdata and all... i had to flash one by one!
[Nexus 5 General] helpplzz:
Ok so I followed a different guide to flashing my android 6.0 marshmallow and on that guide they left out the important part of enabling usb debugging. Now im on the twrp recovery and I can't do anything. I'm supposed to put the elementalX kernel and get root access with SuperSU but I have no idea how to do that, when I plug my phone onto my laptop, autoplay does not pick it up nor can i access it anywhere. Any help with fixing my problem would be much appreciated, i've been at this for 5 hours now. Thanks in advance.
[Nexus 5 General] efrant:
USB debugging is a setting in Android, and has nothing to do with TWRP. If you are booted into TWRP, that setting is not relevant. If your PC isn't connecting to your device in TWRP, it is a driver issue, and you need to reinstall the driver.
[Nexus 5 General] helpplzz:
Which driver? Also my phone is recognized in the sense that I have the eject android option on my taskbar but it is NOT recognized as a removable device so I can't send any files onto it.
[Nexus 5 General] efrant:
The Google USB driver...

http://developer.android.com/sdk/win-usb.html
[Nexus 5 General] Sandivisi:
now iam on stock android 6.0, if i want back to stock latest 5.1.1 it is safe? thx
[Nexus 5 General] Primokorn:
Of course. You can even downgrade to KK if you want.
[Nexus 5 General] rah94:
why mine is saying 'error: update package missing system.img' ? i am updating android from 5.0 to 6.0 ..
[Nexus 5 General] Primokorn:
Be sure to have the latest fastboot from the SDK. If the problem persists, flash them manually:

fastboot flash bootloader bootloader.img

fastboot flash radio radio.img

fastboot reboot-bootloader

fastboot flash recovery recovery.img

fastboot flash boot boot.img

fastboot flash system system.img

fastboot reboot
[Nexus 5 General] lost020282:
help desperate newbie

when i execute the flash all bat i get archive does not contain boot.sig and recovery.sic failed to allocate 1043723460bytes

error:update package missing
[Nexus 5 General] Primokorn:
Use method 2.
[Nexus 5 General] rah94:
hey,its okay .. i already did it .. thanks anyway
[Nexus 5 General] ByteFlinger:
I recently installed TWRP , ElementalX 6.0.4 and SuperSU to be able to recover some data and would like to go back to stock.

It seems simple enough to just run the flash-all.bat however I noticed there is no flash recovery command in that script. Is there any reason for it? Will TWRP be removed by running that script?

Also I have read in several place that one can remove the -w flag to keep the data, is that safe/recommended at all if one wants to simply unroot the phone and bring it back to stock?
[Nexus 5 General] SebLemery:
The moment everything is flashed and the CMD screen tells me PRESS ANY KEY TO EXIT, the phone reboot itself, and keeps booting and booting and booting.

What am i doing wrong? I need my phone for work tomorrow :(
[Nexus 5 General] jcsww:
Try going back to the bootloader and selecting factory reset. The initial boot can take a little bit. Give it about 5 minutes but it shouldn't take that long.
[Nexus 5 General] abaaaabbbb63:
Try going in recovery again and do a wipe.

Edit: Oh, didn't see [MENTION=3116388]jcsww[/MENTION] 's reply. Thanks!
[Nexus 5 General] SebLemery:
So this worked, finally. Now my phone is back to 6.0 but still without Root. Did you make a post on "how to root your phone without bricking it" for the Nexus5 on android 6.0 by any chances? :p

Thanks were given.

Edit: By the way, i do have tried with Nexus Root Toolkit, everything looks like it worked, Flashes, reboots, reading writing. But when it go to the point to do a normal boot. It got stuck in the boot animation for about 4 hours. till i had to hard-reset the poor thing and used a stock image from code.google.com (6.0)

I even tried ChainFire's one click root. (as i previously used it on my N4 without issues like 10 times) This bricked it too.

Should i just wait? There was an androidM OTA update pushed on the device yesterday too, does this makes anything different? Did it render the tools incompatible so they need an update/patch?
[Nexus 5 General] abaaaabbbb63:
You should try Chromium's guide to rooting your phone:

http://xdaforums.com/google-nexus-5/general/guide-nexus-5-how-to-unlock-bootloader-t2507905
[Nexus 5 General] Dogematique:
Hello, so I followed the second method because the one goes wrong (missing system.img), the second method was good I did all it was asked but I didn't saw the one command out of the box "fastboot flash cache C:\androidimage\cache.img", I mean, I did all the command in the 'Code' box but the one

'fastboot flash cache C:\androidimage\cache.img' was out and I miss it

. So next

I followed the step

, select "Recovery" using the volume buttons, press Power Button + Volume UP when the android is dead with triangle, it's okay, but now the phone just rebooted and there were no 'Select "Wipe data/factory data reset' as tutorial said there will be.

And

now

I'm stuck in the boot animation since around 15 minutes :confused: I tried to update to 6.0.0 and it's just stuck in the animation.

What must I do ? Because I don't have USB DEBUG activated because it's wiped so ? I just wait ? What can I do ?

Thanks for the answer !
[Nexus 5 General] Primokorn:
You don't need the USB debug option. Can you post the log when using the flash-all script?

If you want to flash manually, follow these steps:

fastboot flash bootloader bootloader.img

fastboot reboot-bootloader

fastboot flash radio radio.img

fastboot reboot-bootloader

fastboot flash boot boot.img

fastboot flash system system.img

fastboot format userdata

fastboot format cache

fastboot reboot
[Nexus 5 General] Dogematique:
Thinking about making you an offering :laugh: big thanks :) !

Wishing you a good day and thanks again for the help !
[Nexus 5 General] AliceInUnderland:
So I'm at a total loss here...I'm coming from Cyanogenmod Snapshot ROM with a custom recovery and root. I flashed the stock recovery via fastboot before I started. I went through all of the steps, multiple times, and everything went perfectly until I boot up. I'm in a constant bootloop now, I've reflashed everything, tried to go back to ANY other Rom and I can't seem to find a solution. All I want is for my phone to function, at this point I don't even care how! I've been working on this for 6 straight hours because I have work tomorrow and need it.

I tried the flash all method first, but fastboot.exe crashed, so I did it all manually.
[Nexus 5 General] Primokorn:
Did you try my above steps? post #2066
[Nexus 5 General] Baldilocks:
Got everything working except for recovery. When I enter recovery mode, I get the Red Triangle Android. I've tried flashing recovery.img but still same outcome. Any ideas?
[Nexus 5 General] Primokorn:
Do you have a N5X? This thread/forum is for N5.
[Nexus 5 General] Baldilocks:
I have both. But I'm referring to the N5.
[Nexus 5 General] Primokorn:
The red triangle with the Android robot is the stock recovery, which is absolutely normal since you have flashed the factory images.
[Nexus 5 General] 5zan:
Will this method work if I flash Marshmallow rom using a windows 10 Laptop?
[Nexus 5 General] abaaaabbbb63:
I don't see why not
[Nexus 5 General] rah94:
Is this '6.0.0 (MRA58N)' factory image the latest ? is it differ from this one '6.0.0 (MRA58K)' ?
[Nexus 5 General] Razvan:
Yes, MRA58N is the latest firmware.
[Nexus 5 General] fleece:
Always stock & unlocking bootloader first?

Noob question... (Thanks for your patience in my research/learning.)

If simply flashing an upgrade to a higher factory image (not custom), and the device's bootloader has never been unlocked, does one need to unlock the bootloader first as the guide indicates? This is a scenario where we are not returning to stock since it's always been stock.
[Nexus 5 General] jcsww:
The bootloader must be unlocked regardless of what you are flashing to. You can still stay completely stock, but if you want to flash a factory image, you must unlock the bootloader first.
[Nexus 5 General] 5zan:
Unlocking the bootloader is not that difficult. Hardly takes 5min
[Nexus 5 General] mathdisasterpiece:
Ok guys, I'm a bit of a rookie, but I made myself an informed rookie by reading and trying to fix my phone all day.

I have a Nexus (2013, LTE) with KitKat installed, and I decided to finally update it with Lollipop.

5.0.1 went fine, then I went into 5.1 and that's when I lost my phone. It installed and then rebooted, and got stuck indefinitely on the booting animation.

I tried wiping the cache and doing a factory reset, didn't do much. Now the problem is that my Bootloader/Fastboot is locked (when I press the Power+VolDown button, it prompts the fastboot mode, but it says LOCKSTATE - locked).

To do anything from there, I'd have to unlock that, but I can't because my USB Debugging is also LOCKED, and I can't unlock it because my phone won't boot.

SOOOOOOO, I'm confused and don't know what my options are now...

EDIT - I tried the CMD fastboot oem unlock, but I feel like my PC doesn't recognized or even try to recognize my phone at all. I plug the USB in while in Fastboot mode and nothing happens, at all. I type the CMD adb devices, and none shows. It's also nowhere to be found in the Device Manager. I feel like it could be a driver problem, but again, nothing even happened the first time I plugged the phone in the USB.

EDIT - Nevermind, was able to unlock. ****IN' USB CABLE WASN'T ACTUALLY FUNCTIONAL.
[Nexus 5 General] Omar97:
can anyone who's having build 'mra58n' upload me the recovery.img please ?|

Thanks
[Nexus 5 General] jd1639:
Download the factory image, Google nexus factory image. Extract it using. Inside is another zip file. Unzip that too. In there you'll find the recovery.img
[Nexus 5 General] pinstripebob:
So I just went back to 5.1.1 build LMY48B on my Nexus 5. If I want to go to 6.0.1, can I just download the 6.0.1 factory image and flash it over 5.1.1, or do I need to update incrementally (5.1.1 to 5.2 etc.)?
[Nexus 5 General] jball:
Just flash it
[Nexus 5 General] erazorvl:
Is there a way to do it with android sdk?

When i run flash-all bat it says the command is not recognized - i use platform tools folder in sdk and from there i am able to run the bat but it crashes in like a minute and i don't understand what's the problem.

How can i fix it?
[Nexus 5 General] 5zan:
i followed the method 1 for flashing Marshmallow 6.0

as soon as fashing finished the phone booted and is now stuck on booting screen for 10min
[Nexus 5 General] venky83:
I have downloaded the latest adb and Fastboot drivers. But I can't find the flash-all.bat script please help.
[Nexus 5 General] Mairo:
Flash-all.bat is in stock rom zip.
[Nexus 5 General] venky83:
I have downloaded the stock rom 6.01 from Google developers page, in this zip there is no flash files available, only one image file is available.
[Nexus 5 General] Mairo:
I dont know what OP system you use but You shoud enable " Show Hidden files" in folder options.

In google dev page downloaded content should contain 6 files ( inside one zip file are also 6 files ).
[Nexus 5 General] izzyserious:
same here....everything said success throughout the whole process, but i dont get a chance to go back to recovery and wipe data/factory reset like the last step says, it just reboots and starts booting by itself, but never actually boots...im so stuck
[Nexus 5 General] tedrogers61:
What do the version codes mean on the Google Developers Factory Images page

Hey all,

What do the version codes mean on the Google Developers Factory Images page here?

I'm looking at downloading 6.0.1 for Hammerhead (Nexus 5) and I'm presented with

two

choices:

6.0.1 (MMB29K)

6.0.1 (MMB29S)

Which one is it? What do the S and the K stand for in the version code number?

Thanks.
[Nexus 5 General] .bucch:
Those are build numbers, both are stock android version 6.0.1 but the S is the last build including the latest security update from google. The most recent is always the higher build number.
[Nexus 5 General] tedrogers61:
Higher number alphabetically then? Thanks.

If so, what happened to L, M, N, O, P, Q and R?
[Nexus 5 General] GioVIP:
can anyone help me i did everything from this post , reset data, wipe data, it does not work, than flashes factory image like there is sad but still got 16gb, what can i do ?? :) flashed kitkat, lollipop and marshmallow but got 16 gb again
[Nexus 5 General] tedrogers61:
Did you try what is suggested in post #2?

A common problem is 32gb devices showing as 16gb following return to stock.
[Nexus 5 General] DiamondJohn:
Just a guess, but maybe they were internal test builds that never made it past the first pass of testing, and so were never released to the public; ie us.
[Nexus 5 General] badral9:
Im currently using CM 12.1 with TWRP. Can i flash Stock Marshmallow ROM using TWRP recovery?
[Nexus 5 General] GioVIP:
i did what exactly is written in post #2 but still got 16 gb
[Nexus 5 General] tedrogers61:
Might be a nand issue? If you install EMMC Brickbug Check, do you get a SANE CHIP result?

https://play.google.com/store/apps/details?id=net.vinagre.android.emmc_check&hl=en
[Nexus 5 General] audit13:
You need to use fastboot commands to flash a stock image unless you find a stock MM zip file that can be flashed in TWRP.

Here's an example: http://xdaforums.com/google-nexus-5/development/rom-rooted-busybox-tweaks-t3072279
[Nexus 5 General] GioVIP:
tedrogers61;64848243]Might be a nand issue? If you install EMMC Brickbug Check, do you get a SANE CHIP result?

it needs root acess, so canT check, donT want to root,

in bootloader it shows d821 e 32GB

today i twice repeated all the actions -- flashed 6.0.1 factory image than did post #2 but still 16 gb is there another solution for this bug ???
[Nexus 5 General] tedrogers61:
I dont have root to do basic check for sane chip.
[Nexus 5 General] GioVIP:
It shows : no sane chip

Emmc chip type : SEM32G
[Nexus 5 General] tedrogers61:
I don't really know what to suggest from here, but I would root it and perform the Emmc Check Memory next.
[Nexus 5 General] badral9:
ok thank you
[Nexus 5 General] tedrogers61:
So didn't you follow exactly?
[Nexus 5 General] abaaaabbbb63:
You can only flash the factory images when your phone is in the bootloader.
[Nexus 5 General] audit13:
You can only flash stock images with an unlocked bootloader using fastboot commands and with the phone in bootloader mode.
[Nexus 5 General] GioVIP:
hi bro i rooted my n5 and checked memory with Emmc like you suggested me test showed 29.1 GB of space, what to do next ?
[Nexus 5 General] maRci002:
How can I root my Nexus 5 device

I have made it several times but when Marshmallow came out 6.0.0 (MRA58K) the SuperSu broke my phone (infinity bootloop) so I've reflashed my phone whithout rooting. I've read that I need to use a different kernel from the original one and then it might work.

So the question is: do I still need a differenet kernel to root my phone 6.0.1 (MMB29S)?
[Nexus 5 General] GioVIP:
helllo bro, i see yo are good at nexus 5 development. can you help me ? in bootloader my N5 shows D821e 32GB, but in storage only 16 is available. i flashed factory image several times them did #post 2 , but still got 16gb. what can i do to fix this issue ? i tied flashing kit-kat, lollopop and marshmallow but still got 16 GB, than rooted and tried custom roms but still 16 :)
[Nexus 5 General] demonr6:
Hey guys my wife's phone has been acting like crap since the update to MM with almost constant reboots. I wanted to go back to Lollipop because it never had issues with that flavor of the OS. Would I download the 5.1.1 from the factory images link and follow the same instructions in this OP? Thanks!
[Nexus 5 General] audit13:
Yes, the methods described in the first post will work with stock 5.1.1 images.
[Nexus 5 General] demonr6:
One small issue I ran into using method 1.. I extracted the file that I downloaded from the link provided then ran the flash-all.bat file and the image below is the result. I unlocked the bootloader in advance and the phone is in the ready state. Not sure what I boned any suggestions?
[Nexus 5 General] GioVIP:
try second method, manually write commands in cmd
[Nexus 5 General] audit13:
Could it be a bad download?

Does the bootloader remain unlocked at all times?
[Nexus 5 General] demonr6:
I was able to get into it with the second method. Unfortunately flashing back to Lollipop did not fix the rebooting issue. To make matters worse after I attempted to lock the bootloader again the handset went into a constant bootloop so the phone has moved on to a better place. *hint tonight it will burn in a funeral pyre with a great big F* you to LG* Thanks for the help though, sucks this only lasted barely two years before taking a dump.
[Nexus 5 General] Spud37:
Is there a way to flash the stock from TWRP? I don't care about changing the recovery I just want Stock ROM
[Nexus 5 General] audit13:
Is this what you need: http://xdaforums.com/google-nexus-5/development/rom-android-m-preview-2-flashable-zip-t3157299 ?
[Nexus 5 General] GioVIP:
do you have any idea what to do ? see pics
[Nexus 5 General] tedrogers61:
That is most peculiar! The OS is not recognising that you have a 32gb, yet a root level app (presumably root level) detects capacity correctly. If it is unrooted, then I'd be tempted to try re-rooting and un-rooting, then try whole process again.
[Nexus 5 General] GioVIP:
i did just like you said but got again 16 instead of 32 :(
[Nexus 5 General] jadajada:
I have tried methods 1 and 2 with no luck.

If I try method 1, I get this:

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

archive does not contain 'system.sig'

archive does not contain 'tos.img'

I then started from scratch with method 2, and every command completes with OKAY. After the final command fastboot reboot, It just hangs on the boot animations. It never boots up.

I have tried several times, and I can not get it to boot. What can I try?

EDIT: NEVER MIND! Had to wait longer. It just took a long time to boot completely!
[Nexus 5 General] mclisme:
Hello guys. I'm pretty sure I did everything ok using method 2 cos 1 gives the usual error on system flash. I've done this on my Nexus 4 and Nexus 6 with no probs but on my N5, even using 2 different MM images, phone hangs on 1st boot (google circles) every time, it's now 20min that it's stuck there, surely it must have booted by now... What else can I do I delete/wipe everything and restart from scratch? Drives me crazy.
[Nexus 5 General] casonswag:
Do anybody got just the stock recovery please?
[Nexus 5 General] DiamondJohn:
See OP "★Download the latest factory images from here:" And each release has a stock recovery.
[Nexus 5 General] mclisme:
Hate to admit it but I only managed to resolve this by using the Toolkit... Damn thing flashed System perfectly. Still I can't understand what I was doing wrong when going step-by-step. To my understanding, given that you've got the correct files it's a fail-safe operation :confused:
[Nexus 5 General] fireymint:
Hi, sorry for sounding super stupid but i really hope to get some help. I accidentally flashed a nexus 5 file on my nexus 5x and not i cant boot the phone nor get into recovery. Plugging into windows and it shows usb device is not recognized. Did i hard brick my phone?