[Nexus 5 Q&A, Help & Troubleshooting] zameer hassan:
Steps to recover back to stock Android 6.0.1 MOB31E

1) Visit.... https://developers.google.com/android/nexus/images

to download latest official from for nexus 5.

2)download NEXUS TOOLKIT application for flashing and everything from here...http://www.wugfresh.com/nrt/

3)install driver for nexus in order to detect your phone from here...http://www.android.gs/download-and-install-google-nexus-5-usb-drivers-adb-fastboot/

4)unzip the stock file two times to get all the .IMG files (boot.img,recovery.img,userdata.img,system.img,etc)..

5) install and open nexus toolkit (but remember before opening turn on laptop internet) ,select your model and build to latest Android 6.0 version.

And click on LUNCH under Advanced utilities.

Then under fastboot flash select system ,click ok then browse option. Now select your folder containing system.img inside your unzipped firmware.

6) first turn your nexus 5 in bootloader mode and now connect it to pc.

7)and flash system.img file..but atleast battery should be 30℅

Or you can directly use option Flash stock + unroot and click other browse and I downloaded a factory image option and hit ok.Then search your zip firmware in folder that you have downloaded and go...but make sure to turn your phone in bootloader mode before flashing..

Now after successful stock flashing...

FOR FLASHING ANDROIND 7.0 AOSP

1) go to setting >about phone,tap build number 3-4 to activate developer option and enable debugging mode...and connect to pc

2)open nexus root toolkit and first unlock bootloader(take full backup of internal storage before unlocking)..to take backup when your phone is bricked just enter in bootloader mode,launch nexus root toolkit,go to Advanced utilities and click custom recovery under fastboot boot option..

After booting in two recovery connect your phone to pc..and you will be able to see your internal storage in pc..

3) after bootloader unlock..use Root option in toolkit and download necessary file it it says to download....allow debugging if pop-up come in your phone after connecting..

4)after rooting go to fastboot boot under Advanced utilities and click custom twrp and hit...

5)but make sure you have transfered Android 7.0 zip files and Gapps in your internal storage

6) and flash one by one..

OR IF YOU JUST DIRECTLY WANT TO FLASH ANDEOID 7.0....TRY THIS SHORTCUT STEPS..

1) TURN YOUR NEXUS 5 IN BOOTLOADER MODE..

2) CONNECT IT TO PC...BUT BE SURE THAT NEXUS 5 DRIVERS ARE INSTALLED IF NOT DO THAT FIRST

3)LAUNCH NEXUS ROOT TOOLKIT AND CLICK ADVANCED UTILITIES >Fastboot Boot >custom recoveryand wait till it boots into twrp..

4) now swipe for factory reset and select install option and find your Android 7.0 zip file in internal storage and go..if you have not transferred Android 7.0 zip files and Gapps you can still transfer that time in TWRP mode as in twrp mode ours internal storage in accessible..so transfer and flash Android 7.0 first and then after successful flashing you may get red error at last but ignore it..and boot your phone..now again after your phone boot to Android 7.0 ..select custom recovery option in root toolkit and enter twrp mode and now flash Gapps better download micro Gapps around 130mb..

If u still face any difficulty let me know..