1.This is the website to download Factory Images for Nexus Devices
https://developers.google.com/android/nexus/images?hl=en
and choose the nexus5 one.
2.下载下来文件名是hammerhead-lmy48m-factory-bf3c82fd.tgz,解压
3.得到一个文件夹hammerhead-lmy48m,里面有
flash-all.sh(全刷)
flash-all.bat(windows用的)
flash-base.sh(不刷ROM)
bootloader-hammerhead-hhz12h.img
radio-hammerhead-m8974a-2.0.50.2.26.img
image-hammerhead-lmy48m.zip
4.android-sdks里面有个fastboot(找不到搜一下)
5.具体刷机用法参考flash-all.sh和flash-base.sh里地内容,写的非常清楚
当然fastboot -h也讲得很清楚