前置条件:

1 android nexue 5 手机一部
2 android L最新rom包
android L rom下载地址
https://developers.google.com/fit/preview#flash_your_nexus_5_or_nexus_7



过程:

下载完成后解压缩,这个包需要使用 fastboot工具,不是原来的zip卡刷包,好在里面的脚本文件
都已经写好了,如下图:


连接好手机和电脑,笔者是在ubuntu下的进行刷机,以下是刷机过程

nexus 5 手机需要进入到fastboot的模式,进入方式 按下开机键+音量上下键(也就是要按下音量键中间的部分)
在手机的 fastboot模式,执行下面的命令

root@ubuntu:~/Desktop/hammerhead-lpv81c#lsbootloader-hammerhead-hhz11k.imgflash-base.shflash-all.batp_w_picpath-hammerhead-lpv81c.zipflash-all.shradio-hammerhead-m8974a-2.0.50.2.08.imgroot@ubuntu:~/Desktop/hammerhead-lpv81c#./flash-all.shsending'bootloader'(2508KB)...OKAY[0.543s]writing'bootloader'...OKAY[0.494s]finished.totaltime:1.037srebootingintobootloader...OKAY[0.040s]finished.totaltime:0.040ssending'radio'(45505KB)...OKAY[6.213s]writing'radio'...OKAY[3.118s]finished.totaltime:9.332srebootingintobootloader...OKAY[0.044s]finished.totaltime:0.044sarchivedoesnotcontain'boot.sig'archivedoesnotcontain'recovery.sig'archivedoesnotcontain'system.sig'--------------------------------------------BootloaderVersion...:HHZ11kBasebandVersion.....:M8974A-2.0.50.2.08SerialNumber........:06ea489d00e2a439--------------------------------------------checkingproduct...OKAY[0.101s]checkingversion-bootloader...OKAY[0.099s]checkingversion-baseband...OKAY[0.100s]sending'boot'(8754KB)...OKAY[1.420s]writing'boot'...OKAY[0.754s]sending'recovery'(9412KB)...OKAY[1.516s]writing'recovery'...OKAY[0.791s]erasing'system'...OKAY[0.969s]sending'system'(682924KB)...OKAY[103.092s]writing'system'...OKAY[46.568s]erasing'userdata'...OKAY[8.677s]formatting'userdata'partition...Creatingfilesystemwithparameters:Size:13725835264Blocksize:4096Blockspergroup:32768Inodespergroup:8144Inodesize:256Journalblocks:32768Label:Blocks:3351034Blockgroups:103Reservedblockgroupsize:823Createdfilesystemwith11/838832inodesand93654/3351034blockssending'userdata'(137318KB)...writing'userdata'...OKAY[38.505s]erasing'cache'...OKAY[0.613s]formatting'cache'partition...Creatingfilesystemwithparameters:Size:734003200Blocksize:4096Blockspergroup:32768Inodespergroup:7472Inodesize:256Journalblocks:2800Label:Blocks:179200Blockgroups:6Reservedblockgroupsize:47Createdfilesystemwith11/44832inodesand5813/179200blockssending'cache'(13348KB)...writing'cache'...OKAY[3.278s]rebooting...finished.totaltime:207.000sroot@ubuntu:~/Desktop/hammerhead-lpv81c#


注意:fastboot刷机界面很不友好,比如
fastboot -w update p_w_picpath-hammerhead-lpv81c.zip
这个命令执行过程,没有任何提示,并且时间很长,如果是初次刷机,有可能认为是刷机失败了
需要耐心等待一会儿



开机体验:

android L第一次开机速度奇慢,开机动画出现以后,等了大概5分钟,让笔者甚至怀疑是不是刷错
rom包了。在最后要放弃的时间,才出现了配置界面,发现rom包没有问题,估计是art模式转换的
时间太长了,但是好歹做个进度条提示,光一个开机动画转啊转,实在是让人很难忍受。