今天早上起来我的N6突然不能启动,非常莫名其妙,尝试了各种方法无效
最终决定刷机
因为之前已经手动root过了所以接下来简述过程。
参考:http://www.muzisoft.com/shuaji/85161.html
首先:需要工具
首先需要进入 Fastboot 模式:http://jiyouhui.it168.com/thread-435764-1-1.html
Nexus6可以用的 Fastboot 工具:http://jiyouhui.it168.com/thread-435762-1-1.html
本教程适用机型:
- Nexus 6
一:使用Fastboot命令刷写系统各镜像部分:
使用格式:fastboot flash <要刷写的对应分区> <某个目录下的要刷写的镜像>
小提示:
刷写镜像时,由于使用cmd命令,电脑并不是智能的,必须把镜像放到fastboot工具的根目录下才能刷写。。。很麻烦,怎么办?!
嘿嘿,我教大家一个简单的方法:
举例如下:(例如要刷底包中的system.img)
1,如图所示,首先在命令提示符中输入
fastboot flash system
一定要包含空格的:
fastboot空格flash空格system空格
记住是fastboot空格flash空格system空格,别弄错了,空格一定要输入的,不输入空格必会报错!
如果驱动连接不上:去下载MOTO的驱动
驱动连接正常进入fastboot模式下,开始刷机时会发现,
error: update package missing system.img 报这个错误
但是线刷的时候发现提示error: update package missing system.img报错
这是因为刷机的时候加载img镜像有问题,google把大部分img镜像压缩成了一个zip的压缩包,文件名为image-hammerhead-lrx21o.zip
我们将这个压缩包解压缩,会得到5个img镜像文件,然后挨个刷入即可。
刷入命令为:
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot reboot
于是我简单修改了fastboot-all.bat的代码
@ECHO OFF
:: Copyright 2012 The Android Open Source Project
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
:: http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-shamu-moto-apq8084-71.08.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-shamu-d4.0-9625-02.98.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
::fastboot -w update image-shamu-lmy47e.zip
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
echo Press any key to exit...
pause >nul
exit
运行 结束后重启,OK!折腾了一下午,希望对大家有所帮助