• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[SOLVED] Nexus 5 stuck in boot loop animation (Lollipop) , partially working with 4.4

Search This thread

elielbianchi

New member
Nov 26, 2015
1
0
Flash Write Failure

My Nexus 5 is having the same issue. I kept it charging during the night and when I woke up in the morning it was with the 4 dots bootloop. I have the last update of marshmallow (android 6.0) from google and I had the debugging. However, it did not do the root. I tried to reset to factory settings in the device, but it just appears the android guy with a message of no command and no matter what I do it just freeze for 5 seconds and restart the device. I know it is not the power button, because it keeps in the 4 dots loading for hours without restart. Then I tried to use the instructions, but the prompt shows error when it is writing the bootloader and radio, showing flash write failure. The computer found my device on fastboot devices but not shows when I use the adb shell, or adb devices. I already updated the drives, downladed the PdaNet, but nothing is working.

Please, there is a way to save it? It was working perfectly normal, and from the night to the morning it got it.

Thank you in advance,
Eliel.
 

kapil6213

New member
Dec 22, 2015
1
0
Hi, I

Hi,

When I flash Julian's OS, the bootloader gets locked after initially getting unlocked so i am not able to flash Julian's OS. wats the way out here?

I have a Nexus 5 32GB that's about 14 month old. Was running Lollipop 5.1 which was installed through OTA updates (4.44 >5.0 >5.01>5.1). The device is stock and unrooted.
One day, after powering the device up, it went into the boot screen and never managed to finsih the boot (for hours).
After reading extensively on this and other forums , here are the steps I tired , without success:
1. Go to bootloader and press Start
2.Go to bootloader , erase cache
3.Go to bootloader erase user data (factory reset).
I then tried to flash the factory image back. I tried all Lollipop versions from the google developers page of factory images.
starting with 5.1.0 (LMY47I) and going down. All flashing was completed successfully, but the problem remains.
Then I tried 4.4.4 (KTU84P) and the device finally booted up, but it was crippled: Most times It only sees a storage of 16GB , the phone does not recognize any cellular carriers, google play crashes, camera crashes, gallery crashes. An error states that "no external memory is available". Basically it was useless.

I took the phone to an LG lab. They said I need to replace the motherboard. Costs about 200$ !!
I was about to get a new phone , but decided to try one more google search for a fix.
This guide is for any poor soul in the same state.
This issue can be solved without replacing the motherboard for 200$.

The problem in my case was that the /persist partition was degraded, and could not mount.
I found out by trying to follow this guide: http://android.stackexchange.com/qu...dots-lollipop-screen-after-hard-factory-reset
I got as far as activating ADB Sideload when I got the error "cannot mount /persist".
This is a software problem.
Her's how to fix it (It's a long and detailed guide - but worth the result):

First, you must enable USB debugging mode , if it was not enabled (if it is enabled you can skip the first step of this guide) . The way to do that is to flash a stock image that will load, even if not fully working. In my case I could flash version 4.4x and get the phone to load. I am not aware of any other way to enable USB debugging, other than from within a working OS. If someone knows a way - please post it.

The easiest way I found to flash my phone is using Julian OS' script. You can download the stock image5.0 and 5.01 with the script from here:
https://www.androidfilehost.com/?w=files&flid=22367
You will need to adapt the 4.4x firmware to have the script flash it, but it's very easy, just a couple of files to rename.
When you open Julian's zip file you will see that he uses a script that flashes the firmware's images one by one. What I did was download the stock images from Google https://developers.google.com/android/nexus/images , used winrar to extracrt all the files from the .tgz file to a folder, then unzip the only zip file there (image-hammerhead-xxxxx.zip) which contains 5 img files. I then renamed the radio-hammerhead-xxxxx.img to radio.img and bootloader-hammerhead-xxxx.img to bootloader.img. Now all the file names comply with Julian's script. From Julian's archive copy the files "From Bootloader.bat" and "fastboot.exe" to the folder where all the images you just renamed are.
Put the phone in bootloader mode (turn the phone off, press the Vol- and the power buttons). Once the the phone is in bootloader mode, connect it to the PC and run "From Bootloader.bat" and follow the onscreen instructions. In about 2 minutes, your phone will be flashed.

Turn the phone on, it should load the OS. Disregard all the error messages, and don't bother setting the phone up. If you skip wifi, and don't have a sim in the phone you can finish the basic setup quickly.
Next you need to get developer tools activated: Settings>about phone>Build number. Tap 7 times on the build number and this will unlock Developer tools. Go back to settings and the new Developer Tools and enable usb debugging. Approve any popups.

*** I am not aware of how to enable usb debugging if you cannot go into the settings. If non of the stock images loads for you, search for a way to get usb debugging working , or else you cannot continue. You need this for ADB to connect to the phone.****

Next, you need to have ADB on your PC, and it should be able to reach your phone. If you already have - then skip to the next step. If you don't - then here is how to get the latest version:
Go here and download the installer https://developer.android.com/sdk/index.html#Other
Install the file and when it's done run SDK manager. Choose only the first 2 tools (Android sdk tools and Platform tools), this will install the latest adb and fastboot tools. To make sure all is installed open a command prompt (Click Start, type cmd in the search and run cmd.exe) and type adb. You should see all the adb possible commands typed. Now you can test if your phone can be reached by adb: connect your phone (remember usb debugging must be on!) and type: adb devices. After a few seconds you should see something like this:
List of devices attached
024703f599cc8feb device

If you get this, it means you have usb debugging enabled and a proper usb driver installed and you can go to the next step . If there is no device in the list you need to install/update the USB driver:

You have to make sure that when you connect your phone with USB debugging on, you have 2 entries in Winodws Device manager:
Under Portable devices >Nexus 5 , and under Android device> Android composite ADB Interface.
If the second one is missing, ADB will not work and you can't continue. There are 2 ways to fix that :

1. You can install an Android driver called Universal Naked Driver 0.73 from here: http://forum.xda-developers.com/showthread.php?t=2386956. Unzip the file to a folder.
The author of that guide states you need to uninstall any driver that already exists. This proved tricky because Windows would not uninstall the Nexus 5 driver. I decided to install it on a PC that has no android driver.
When you connect the phone to a windows 7 pc for the first time it will search for a driver. I disconnected the internet and windows installed a generic driver. In device manager I saw Nexus 5 with a yellow triangle. I Right clicked on it > update driver software > Browse my computer for driver software and point to the folder you unzipped the driver. You will get a warning - allow the installation.

2. If that does not work or if you don't have another "virgin" PC try this:
Run SDK Manager, under Extras mark Google USB driver. You don't need anything else marked. Install the driver.
Now connect your phone to the PC in normal mode (not bootloader!) . Open device manager. You should have two entries: Portable devices >Nexus 5 and Android device > Android Composite ADB Interface
If the second one is missing, but the Nexus 5 is properly installed, Right click on the Nexus 5 device >Update driver software > Browse my computer for driver software >Let me pick from a list. Now make sure that "Show compatible Hardware" is ticked . You should now have an entry called "USB composite device". Choose that and let it install. When it's done, if you still have an an Unknown device >Nexus 5 and no Android Composite ADB Interface in device manager, then unplug the phone and reconnect it again . You should now have both devices installed.
If by chance this does not work, and you have a Nexus 5 with a yellow error , right click it>update software driver> Browse my computer.> and point it to the Universal Naked Driver folder or the SDK>Extras>Google USB driver folder and it should update so both devices appear (Nexus 5 and ADB).


Once adb can see your pohne go here, to read bitdomo's guide to fix the broken persist partition.
http://forum.xda-developers.com/google-nexus-5/general/guide-to-fix-persist-partition-t2821576

There are some prerequisites to getting this to work:

The first one is that the phone can be reached by ADB, this is why you needed the usb debugging mode to be turned on, and the proper usb driver installed.

Second, you need to install a custom recovery image. Don't worry, you will overwrite it later. The one I used is TWRP. Get the latest version from here:
http://techerrata.com/browse/twrp2/hammerhead
To install I recommend you copy Fastboot.exe and the TWRP file to an empty folder on your PC . Rename the TWRP file to "recovery.img". Open a command prompt in the folder (see here if you don't know how http://www.techsupportalert.com/content/how-open-windows-command-prompt-any-folder.htm) , in the black window type: fastboot flash recovery recovery.img and hit Enter. Wait a few seconds and it will finish.

Last, you need to root your device. There are many ways to do this. I did this very simply by downloading CF-Auto-Root from https://autoroot.chainfire.eu/ The file you need is this: https://download.chainfire.eu/363/CF-Root/CF-Auto-Root/CF-Auto-Root-hammerhead-hammerhead-nexus5.zip . Unzip it, put your phone in bootloader, run root-windows.bat.
Now you are prepaired... Follow the guide by bitdomo . Open a command prompt , and run the 2 commands bitdomo wrote. You will get a series of questions , type y followed by Enter until it's all done.
SInce you are still in bootloader mode, and a big START is at the top of the screen, click the power button to reboot. Now your oS 4.4x should load properly. Make sure everything is working.
I did not follow the steps for the wifi and BT fix , because they worked fine (and still do 4 months later) , but you can go ahead and do that too.

Now you can flash to the latest firmware 5.10 - download the file from the developer site I gave before, use Jason Os's script to flash the image, and lock the device. Done! Boot up the device and make sure it recognizes the right amount of RAM on your phone (16 or 32GB). If it does, then all is well .
When I first booted the device , I saw that it only recognized 16GB instead of 32GB. To solve this install TWRP again, go to Wipe>Format data . Then reboot the device and make sure you have 32GB.
If you like the stock recovery instead of TWRP you can use Fastboot to flash the original recovery.img.
Now you have a working Nexus 5 , v5.10.


Thanks to LyricWulf and bitdomo for their life saving guides. I hope this helps others in the same spot, and saves them 200$ .
 

njewkes

New member
Dec 24, 2015
1
0
Hi, I am not tech savvy at all but I followed these steps as best I could and it worked! Lots of this is just computer jibberish to me but it worked! (I don't think I really had to follow all of the steps exactly) My wife's Nexus 5 is alive again! Thank you so much!!!
 

ramzzo94

New member
Dec 28, 2015
1
0
fix and thanks a lot

your step is very nice dude, im came from indonesian so i must read carefully your step one by one but after confused with step in bitdomo because i didnt have skill ability for adb command but after i read carefully bitdomo step one by one now finally my phone can be healthy again and now if sometimes my phone have that same problem again i can fix that. thanks again dude for your step. :D:D:fingers-crossed::good::p
 
Feb 24, 2014
10
0
Bootloop annoying

I had the same problem, and for me, simple NAND restore from TWRP recovery solved this issue. I recently made this NAND backup for no reason and it happens to be a very good move. Cheers

Hi. I have some real issue back with my device here. Nexus 5 is running android 6.0.1 and running smooth and fine just a battery drainage issue.
So i came up with ElementalX Kernel and crazily wanted to flash in.
But the real problem presists, is whenever I try to root or Flash Kernel using TWRP it get stuck in boot animation. Everytime i have to Flash fresh STOCK ROM to get rid of the Boot Animation prob. I really want to get the kernel. Please tell me something. HELP!!!!!
 

Matterhornjr

New member
Feb 27, 2016
1
0
Hey everyone,

I have a very similar problem (no usb debugging enabled) and this solution does not seem to work due to 2 main reasons:

1. When flashing 4.x i get remote flash write failures, so flashing doesnt work.
2. When bootloader restarts, my device always gets locked again, so it cannot flash it correctly. This is also why TWRP flashing does not work.

Is there nothing I can do? Do you also think the emmc is damaged? Any ideas?
Thanks
 

audit13

Inactive Recognized Contributor
Jun 4, 2012
12,914
5,049
Toronto
If the bootloader relocks itself when you reboot after unlocking, the emmc is defective and cannot be repaired. The only solution is a motherboard replacement. I have two nexus 5 motherboards with this exact issue.
 

lt13jimmy

New member
Apr 21, 2016
1
0
Thanks! Works!!

After unable to use my phone for 3 days, I found this thread.
Here is a summary of the instructions I kept as notes to myself:

  • Enable USB debugging mode`
  • Use Julian OS' script to flash
  • Download stock image 5.0 and 5.1
  • Download Stock Google image: lrx22c
  • Rename radio-hhm-xx.img and bootloader-hhm-xx.img to just radio.img and bootloader.img
  • Move fastbooy and from bootloader from Julian to .tgz zipped folder
  • Put phone to bootloader mode and plug USB to PC
  • run From Bootloader.bat & follow onscreen instructions
  • Turn off and boot
  • enable usb debugging
  • copy Fastboot.exe and the TWRP file to an empty folder on your PC
  • Rename the TWRP file to "recovery.img"
  • Open a command prompt in the folder, type: fastboot flash recovery recovery.img and hit Enter
  • Root Device by donwloading CF Auto Root, put phone in bootloader and run root-windows.bat
  • Open command prompt run 2 commands bitdomo wrote (be in recovery mode)
  • In bootloader Run Start
  • Should be fixed NOW!!!

I love you!! I made an account just for the thanks!
 

apollom

New member
Apr 26, 2016
1
0
hello, i tried to follow the above steps but when i am running "From bootloader" and my phone is in bootloader mode is not working. i followed the instructions from the screen but nothing..please can you help me?????????? i am trying to save my N5 :)
 

audit13

Inactive Recognized Contributor
Jun 4, 2012
12,914
5,049
Toronto
If the phone is stuck are the flying dots and it still won't boot after a factory reset from stock recovery, try flashing a older stock rom.
 

oops675

Senior Member
Mar 19, 2010
165
31
I was able to flash the TWRP. However when I try Julian's scripts I get below log:

target reported max download size of 1073741824 bytes
sending 'bootloader' (2579 KB)...
OKAY [ 0.302s]
writing 'bootloader'...
FAILED (remote: flash write failure)
finished. total time: 43.490s
rebooting into bootloader...
OKAY [ 0.093s]
finished. total time: 0.095s

< waiting for any device >
target reported max download size of 1073741824 bytes
sending 'radio' (45521 KB)...
OKAY [ 1.790s]
writing 'radio'...
OKAY [ 3.132s]
finished. total time: 4.925s
rebooting into bootloader...
OKAY [ 0.081s]
finished. total time: 0.082s

target reported max download size of 1073741824 bytes
sending 'boot' (8888 KB)...
OKAY [ 0.522s]
writing 'boot'...
FAILED (remote: flash write failure)
finished. total time: 44.225s

target reported max download size of 1073741824 bytes
erasing 'cache'...


It takes forever to erase cache as shown above. Also, wiping data from TWRP was stcuk for over 2 hrs.

Does it mean emmc is dead on this phone? I am in doubt since I could flash TWRP successfully.
 

audit13

Inactive Recognized Contributor
Jun 4, 2012
12,914
5,049
Toronto
Try flashing a stock rom, as well as the userdata.img file. Immediately after flashing userdata, boot into stock recovery, factory wipe, and reboot.
 

oops675

Senior Member
Mar 19, 2010
165
31
Try flashing a stock rom, as well as the userdata.img file. Immediately after flashing userdata, boot into stock recovery, factory wipe, and reboot.

WHile flashing rom using WugFresh ROM ToolKit or by using Julian's script, it gets stuck on erasing cache...and has write faiure for boot.img and bootloader.img. NOt sure how to flash stock. Any pointers?

Below are the logs

Flash Stock + Unroot [WugFresh Development]
------------------------------------------------------------------


target reported max download size of 1073741824 bytes
sending 'bootloader' (2506 KB)...
OKAY [ 0.281s]
writing 'bootloader'...
FAILED (remote: flash write failure)
finished. total time: 43.481s
rebooting into bootloader...
OKAY [ 0.016s]
finished. total time: 0.016s

< waiting for any device >
target reported max download size of 1073741824 bytes
sending 'radio' (42033 KB)...
OKAY [ 1.644s]
writing 'radio'...
OKAY [ 2.899s]
finished. total time: 4.545s
rebooting into bootloader...
OKAY [ 0.086s]
finished. total time: 0.087s

target reported max download size of 1073741824 bytes
sending 'boot' (8620 KB)...
OKAY [ 0.440s]
writing 'boot'...
FAILED (remote: flash write failure)
finished. total time: 44.122s

target reported max download size of 1073741824 bytes
erasing 'cache'...
 
Last edited:

audit13

Inactive Recognized Contributor
Jun 4, 2012
12,914
5,049
Toronto
Does the bootloader remain unlocked when the phone is rebooted? I ask because a write failure is often due to a locked bootloader.

Did you flash the userdata.img file?
 
  • Like
Reactions: Fraser34

oops675

Senior Member
Mar 19, 2010
165
31
Does the bootloader remain unlocked when the phone is rebooted? I ask because a write failure is often due to a locked bootloader.

Did you flash the userdata.img file?

1. Yes bootloader remains unlocked
2. Have flashed every .img....but no success.

.i only have bootloader...and TWRP on my phone. Nothing is flashable.
Inside TWRP, i get message 'Unmodified system Partition'.

Dunon what to do ..
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    I have a Nexus 5 32GB that's about 14 month old. Was running Lollipop 5.1 which was installed through OTA updates (4.44 >5.0 >5.01>5.1). The device is stock and unrooted.
    One day, after powering the device up, it went into the boot screen and never managed to finsih the boot (for hours).
    After reading extensively on this and other forums , here are the steps I tired , without success:
    1. Go to bootloader and press Start
    2.Go to bootloader , erase cache
    3.Go to bootloader erase user data (factory reset).
    I then tried to flash the factory image back. I tried all Lollipop versions from the google developers page of factory images.
    starting with 5.1.0 (LMY47I) and going down. All flashing was completed successfully, but the problem remains.
    Then I tried 4.4.4 (KTU84P) and the device finally booted up, but it was crippled: Most times It only sees a storage of 16GB , the phone does not recognize any cellular carriers, google play crashes, camera crashes, gallery crashes. An error states that "no external memory is available". Basically it was useless.

    I took the phone to an LG lab. They said I need to replace the motherboard. Costs about 200$ !!
    I was about to get a new phone , but decided to try one more google search for a fix.
    This guide is for any poor soul in the same state.
    This issue can be solved without replacing the motherboard for 200$.

    The problem in my case was that the /persist partition was degraded, and could not mount.
    I found out by trying to follow this guide: http://android.stackexchange.com/qu...dots-lollipop-screen-after-hard-factory-reset
    I got as far as activating ADB Sideload when I got the error "cannot mount /persist".
    This is a software problem.
    Her's how to fix it (It's a long and detailed guide - but worth the result):

    First, you must enable USB debugging mode , if it was not enabled (if it is enabled you can skip the first step of this guide) . The way to do that is to flash a stock image that will load, even if not fully working. In my case I could flash version 4.4x and get the phone to load. I am not aware of any other way to enable USB debugging, other than from within a working OS. If someone knows a way - please post it.

    The easiest way I found to flash my phone is using Julian OS' script. You can download the stock image5.0 and 5.01 with the script from here:
    https://www.androidfilehost.com/?w=files&flid=22367
    You will need to adapt the 4.4x firmware to have the script flash it, but it's very easy, just a couple of files to rename.
    When you open Julian's zip file you will see that he uses a script that flashes the firmware's images one by one. What I did was download the stock images from Google https://developers.google.com/android/nexus/images , used winrar to extracrt all the files from the .tgz file to a folder, then unzip the only zip file there (image-hammerhead-xxxxx.zip) which contains 5 img files. I then renamed the radio-hammerhead-xxxxx.img to radio.img and bootloader-hammerhead-xxxx.img to bootloader.img. Now all the file names comply with Julian's script. From Julian's archive copy the files "From Bootloader.bat" and "fastboot.exe" to the folder where all the images you just renamed are.
    Put the phone in bootloader mode (turn the phone off, press the Vol- and the power buttons). Once the the phone is in bootloader mode, connect it to the PC and run "From Bootloader.bat" and follow the onscreen instructions. In about 2 minutes, your phone will be flashed.

    Turn the phone on, it should load the OS. Disregard all the error messages, and don't bother setting the phone up. If you skip wifi, and don't have a sim in the phone you can finish the basic setup quickly.
    Next you need to get developer tools activated: Settings>about phone>Build number. Tap 7 times on the build number and this will unlock Developer tools. Go back to settings and the new Developer Tools and enable usb debugging. Approve any popups.

    *** I am not aware of how to enable usb debugging if you cannot go into the settings. If non of the stock images loads for you, search for a way to get usb debugging working , or else you cannot continue. You need this for ADB to connect to the phone.****

    Next, you need to have ADB on your PC, and it should be able to reach your phone. If you already have - then skip to the next step. If you don't - then here is how to get the latest version:
    Go here and download the installer https://developer.android.com/sdk/index.html#Other
    Install the file and when it's done run SDK manager. Choose only the first 2 tools (Android sdk tools and Platform tools), this will install the latest adb and fastboot tools. To make sure all is installed open a command prompt (Click Start, type cmd in the search and run cmd.exe) and type adb. You should see all the adb possible commands typed. Now you can test if your phone can be reached by adb: connect your phone (remember usb debugging must be on!) and type: adb devices. After a few seconds you should see something like this:
    List of devices attached
    024703f599cc8feb device

    If you get this, it means you have usb debugging enabled and a proper usb driver installed and you can go to the next step . If there is no device in the list you need to install/update the USB driver:

    You have to make sure that when you connect your phone with USB debugging on, you have 2 entries in Winodws Device manager:
    Under Portable devices >Nexus 5 , and under Android device> Android composite ADB Interface.
    If the second one is missing, ADB will not work and you can't continue. There are 2 ways to fix that :

    1. You can install an Android driver called Universal Naked Driver 0.73 from here: http://forum.xda-developers.com/showthread.php?t=2386956. Unzip the file to a folder.
    The author of that guide states you need to uninstall any driver that already exists. This proved tricky because Windows would not uninstall the Nexus 5 driver. I decided to install it on a PC that has no android driver.
    When you connect the phone to a windows 7 pc for the first time it will search for a driver. I disconnected the internet and windows installed a generic driver. In device manager I saw Nexus 5 with a yellow triangle. I Right clicked on it > update driver software > Browse my computer for driver software and point to the folder you unzipped the driver. You will get a warning - allow the installation.

    2. If that does not work or if you don't have another "virgin" PC try this:
    Run SDK Manager, under Extras mark Google USB driver. You don't need anything else marked. Install the driver.
    Now connect your phone to the PC in normal mode (not bootloader!) . Open device manager. You should have two entries: Portable devices >Nexus 5 and Android device > Android Composite ADB Interface
    If the second one is missing, but the Nexus 5 is properly installed, Right click on the Nexus 5 device >Update driver software > Browse my computer for driver software >Let me pick from a list. Now make sure that "Show compatible Hardware" is ticked . You should now have an entry called "USB composite device". Choose that and let it install. When it's done, if you still have an an Unknown device >Nexus 5 and no Android Composite ADB Interface in device manager, then unplug the phone and reconnect it again . You should now have both devices installed.
    If by chance this does not work, and you have a Nexus 5 with a yellow error , right click it>update software driver> Browse my computer.> and point it to the Universal Naked Driver folder or the SDK>Extras>Google USB driver folder and it should update so both devices appear (Nexus 5 and ADB).


    Once adb can see your pohne go here, to read bitdomo's guide to fix the broken persist partition.
    http://forum.xda-developers.com/google-nexus-5/general/guide-to-fix-persist-partition-t2821576

    There are some prerequisites to getting this to work:

    The first one is that the phone can be reached by ADB, this is why you needed the usb debugging mode to be turned on, and the proper usb driver installed.

    Second, you need to install a custom recovery image. Don't worry, you will overwrite it later. The one I used is TWRP. Get the latest version from here:
    http://techerrata.com/browse/twrp2/hammerhead
    To install I recommend you copy Fastboot.exe and the TWRP file to an empty folder on your PC . Rename the TWRP file to "recovery.img". Open a command prompt in the folder (see here if you don't know how http://www.techsupportalert.com/content/how-open-windows-command-prompt-any-folder.htm) , in the black window type: fastboot flash recovery recovery.img and hit Enter. Wait a few seconds and it will finish.

    Last, you need to root your device. There are many ways to do this. I did this very simply by downloading CF-Auto-Root from https://autoroot.chainfire.eu/ The file you need is this: https://download.chainfire.eu/363/CF-Root/CF-Auto-Root/CF-Auto-Root-hammerhead-hammerhead-nexus5.zip . Unzip it, put your phone in bootloader, run root-windows.bat.
    Now you are prepaired... Follow the guide by bitdomo . Open a command prompt , and run the 2 commands bitdomo wrote. You will get a series of questions , type y followed by Enter until it's all done.
    SInce you are still in bootloader mode, and a big START is at the top of the screen, click the power button to reboot. Now your oS 4.4x should load properly. Make sure everything is working.
    I did not follow the steps for the wifi and BT fix , because they worked fine (and still do 4 months later) , but you can go ahead and do that too.

    Now you can flash to the latest firmware 5.10 - download the file from the developer site I gave before, use Jason Os's script to flash the image, and lock the device. Done! Boot up the device and make sure it recognizes the right amount of RAM on your phone (16 or 32GB). If it does, then all is well .
    When I first booted the device , I saw that it only recognized 16GB instead of 32GB. To solve this install TWRP again, go to Wipe>Format data . Then reboot the device and make sure you have 32GB.
    If you like the stock recovery instead of TWRP you can use Fastboot to flash the original recovery.img.
    Now you have a working Nexus 5 , v5.10.


    Thanks to LyricWulf and bitdomo for their life saving guides. I hope this helps others in the same spot, and saves them 200$ .
    2
    I get the second one (smaller dots).

    For some reason you are still stuck on Android 5 . That is why you cannot boot in. You need to flash 4.4 to be able to boot in and enable USB debugging.
    1
    how u unlock nexus 5 when stuck booplop n cnt go to android screen?alrdy using ths step "fastboot oem unlock" when i reboot for unlock,stuck at bootloop n alrdy w8ing 24hr still bootloop cnt see android home screen...n i go to restart nexus5,n locked again... i just stuck on this place,cnt go to next step..pls help me
    sry my englsh so bad
    Not sure what your problem is, but if you are stuck at the boot screen (with the colored dots spinning) you might have the smae problem I describe. You can try to go to bootloader and wipe the cache, if that does not help and you don't mind a wiping all your data do a factory reset. , Go to recovery mode (third option in bootloader), then press the powr and vol up buttons together several times until you get into recovery. Then choose what you want to wipe.
    If that does not restore your phone you need to follow my guide. Probably your persist partion is degraded and needs to be fixed. If you follow my guide you will find out what your problem is.
    Good luck
    1
    I had the same problem, and for me, simple NAND restore from TWRP recovery solved this issue. I recently made this NAND backup for no reason and it happens to be a very good move. Cheers
    1
    Does the bootloader remain unlocked when the phone is rebooted? I ask because a write failure is often due to a locked bootloader.

    Did you flash the userdata.img file?