Bootloop is a problem that occur to Android devices very often. Usually it happens after flashing a Custom ROM or Mod. Occuring over and over again, and you don’t have any backup available, flashing another ROM again and again and starting everything from strach can be very annoying.
To help us a XDA Forum Member called Julian_os managed to create a handy batch file tool aimed to bring some much needed relief in the aforementioned scenario. The tools is named Flash 5.0 N5 Tool. It can flash stock Android 5.0 Lollipop on your Nexus 5 automatically, and it needs only two minutes to flash it. This is a perfect choice when you have a Nexus 5 stuck in bootloop/bootloader mode.
The tool was developed according to the XDA TV tutorial on writing batch files. It works in both cases, with bootloader locked and unlocked. The developer tested on his on device and it works fine. The developer also says that he will be updating the tool to support the future releases of Android.
See also: Download & Install Flyme OS To Nexus 5
So if your Nexus 5 has stuck in bootloop/bootloader mode try this tool. It’s the right chose to make your nexus 5 like new. You can easily adapt the batch for use on additional devices, provided that you have the applicable image files, paths, fastboot drivers. Download the tool from here and once downloaded unzip it and follow the instructions in instructions.txt file.