Nexus 5 Android 6.0.1刷机、Root

2016-01-24

 

一、     准备

1.      备份通讯录等数据,切记。

2.      准备adb 、fastboot。网上搜索可以下载到,如果已安装Android开发环境,可直接使用android-sdk\platform-tools目录下的adb.exe(依赖AdbWinApi.dll、AdbWinUsbApi.dll)和fastboot.exe。解压到D:\adb目录,并将D:\adb目录添加到环境变量。

3.      下载Nexus 5 官方Android 6.0.1刷机包: hammerhead-mmb29s-factory-6bfcdfa4.tgz (链接: https://dl.google.com/dl/android/aosp/hammerhead-mmb29s-factory-6bfcdfa4.tgz)

附:

Google官方下载页:https://developers.google.com/android/nexus/images

驱动下载页:https://developers.google.com/android/nexus/drivers

4.      下载TWRP for LG Nexus 5:

twrp-2.8.7.1-hammerhead.img :  https://twrp.me/devices/lgnexus5.html

5.      下载SuperSU v2.64 :

https://download.chainfire.eu/750/SuperSU/BETA-SuperSU-v2.64-20151220185127.zip?retrieve_file=1

二、     刷机

1.      谷歌官方刷机说明( https://developers.google.com/android/nexus/images ):

Factory Images for Nexus Devices

This page contains binary image files that allow you to restore your Nexus device's original factory firmware. You will find these files useful if you have used the Android Open-Source Project, flashed custom builds on your device, and wish to return that device to its factory state.

These files are for use only on your personal Nexus devices and may not be disassembled, decompiled, reverse engineered, modified or redistributed by you or used in any way except as specifically set forth in the license terms that came with your device.

Flashing Instructions

To flash a device using one of the system images below (or one of your own), you need the latest fastboot tool. You can get it from one of the sources below.

From a compiled version of the Android Open Source Project.

From the platform-tools/ directory in the Android SDK. Be sure that you have the latest version of the Android SDK Platform-tools from the SDK Manager.

Once you have the fastboot tool, add it to your PATH environment variable (the flash-all script below must be able to find it). Also be certain that you've set up USB access for your device, as described in the Using Hardware Devices guide.

Caution: Flashing a new system image deletes all user data. Be certain to first backup any personal data such as photos.

To flash a system image:

Download the appropriate system image for your device below, then unzip it to a safe directory.

Connect your device to your computer over USB.

Start the device in fastboot mode with one of the following methods:

Using the adb tool: With the device powered on, execute:

adb reboot bootloader

Using a key combo: Turn the device off, then turn it on and immediately hold down the relevant key combination for your device. For example, to put a Nexus 5 ("hammerhead") into fastboot mode, press and hold Volume Up + Volume Down + Power as the device begins booting up.

If necessary, unlock the device's bootloader by running:

fastboot oem unlock

The target device will show you a confirmation screen. (This erases all data on the target device.)

Open a terminal and navigate to the unzipped system image directory.

Execute the flash-all script. This script installs the necessary bootloader, baseband firmware(s), and operating system.

Once the script finishes, your device reboots. You should now lock the bootloader for security:

Start the device in fastboot mode again, as described above.

Execute:

fastboot oem lock

Locking bootloader will wipe the data on some devices. After locking the bootloader, if you want to flash the device again, you must run fastboot oem unlock again, which will wipe the data.

2.      即:

第一步,进入快速启动模式:adb reboot bootloader

第二步,解锁:fastboot oem unlock

第三步,解压刷机包hammerhead-mmb29s-factory-6bfcdfa4.tgz,其中的image-hammerhead-mmb29s.zip不需要解压,执行flash-all

D:\adb \hammerhead-mmb29s>flash-all

sending 'bootloader' (3120 KB)...

OKAY [  0.330s]

writing 'bootloader'...

OKAY [  0.530s]

finished. total time: 0.860s

rebooting into bootloader...

OKAY [  0.094s]

finished. total time: 0.094s

target reported max download size of 1073741824 bytes

sending 'radio' (45425 KB)...

OKAY [  1.829s]

writing 'radio'...

OKAY [  3.126s]

finished. total time: 4.955s

rebooting into bootloader...

OKAY [  0.000s]

finished. total time: 0.000s

< waiting for device >

target reported max download size of 1073741824 bytes

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

archive does not contain 'system.sig'

Creating filesystem with parameters:

Size: 13725835264

Block size: 4096

Blocks per group: 32768

Inodes per group: 8144

Inode size: 256

Journal blocks: 32768

Label:

Blocks: 3351034

Block groups: 103

Reserved block group size: 823

Created filesystem with 11/838832 inodes and 93654/3351034 blocks

Cannot read image.

Creating filesystem with parameters:

Size: 734003200

Block size: 4096

Blocks per group: 32768

Inodes per group: 7472

Inode size: 256

Journal blocks: 2800

Label:

Blocks: 179200

Block groups: 6

Reserved block group size: 47

Created filesystem with 11/44832 inodes and 5813/179200 blocks

--------------------------------------------

Bootloader Version...: HHZ12k

Baseband Version.....: M8974A-2.0.50.2.28

Serial Number........: ____________________

--------------------------------------------

checking product...

OKAY [  0.100s]

checking version-bootloader...

OKAY [  0.100s]

checking version-baseband...

OKAY [  0.100s]

sending 'boot' (9154 KB)...

OKAY [  1.030s]

writing 'boot'...

OKAY [  0.784s]

sending 'recovery' (10012 KB)...

OKAY [  1.185s]

writing 'recovery'...

OKAY [  0.825s]

erasing 'system'...

OKAY [  1.318s]

sending 'system' (1020413 KB)...

OKAY [ 50.106s]

writing 'system'...

OKAY [ 87.608s]

erasing 'userdata'...

OKAY [ 20.853s]

erasing 'cache'...

OKAY [  0.610s]

sending 'cache' (13348 KB)...

OKAY [  0.709s]

writing 'cache'...

OKAY [  1.068s]

rebooting...

finished. total time: 166.896s

Press any key to exit...

出现archive does not contain 'system.sig'之后,需要等待一段时间,然后会继续。最后刷机成功。

三、     Root

1.      先安装twrp

a.      搞定adb和fastboot的驱动

b.      解锁您的nexus设备的bootloader

c.      找到适配您的nexus设备的twrp(如果下面列表没有找到的话,您可以在https://twrp.me/Devices/ 输入相关设备名即可找到最新的)

d.      关机,将nexus设备进入bootloader状态具体办法是在关机状态下,同时按住电源键和音量下。然后进入以下界面后,就表示设备已经进入了bootloader模式。

e.      刷入twrp的img(使用fastboot flash recovery twrp.img)。这里可能需要一点dos命令,在命令提示符输入相关命令进入您的电脑桌面(这里将twrp-2.8.7.1-hammerhead.img文件名改成了twrp.img),然后输入相关的命令。

f.       刷入成功后,可以在bootloader状态下,用音量键来选择"recovery mode"来进入twrp。

2.      通过第三方recovery twrp刷入supersu.zip包

前提:

a.      解锁了您的nexus6p/5x/5/6/7/9

b.      搞定fastboot驱动

c.      刷入了安卓6.0或者安卓6.0.1原生系统

d.      刷入了twrp等第三方的recovery

具体的步骤(以nexus 5为列):如果您之前使用过刷入修改版内核办法,请重新刷回原生的内核,再行操作。注意:(开始我还以为楼主的supersu有问题,原来是我安装完成以后,直接点的完成,其实supersu并没有完全安装。刷入完成之后,原来必须退回到twrp主界面下,点选reboot,再选择system直接重启。这样才算完全安装了。)

a.      通过USB将nexus 5和电脑相连接。

b.      上面提供的地址找到supersu 2.64 beta版,然后保存到手机的download目录(不需要解压)。

c.      将设备进入bootloader模式,然后用音量键来选择recovery模式,进入twrp(如果没有刷入twrp请先刷入),然后通过twrp的install来刷入supersu 2.62 beta的zip包来实现安卓6.0/6.0.1的root。重启前如果twrp提示你没有root刷入supersu的话,一定要选择否,不然会坏事。

四、     Android 6.0使用中遇到的问题

问题:Android 6.0 已连上网络 但无法访问互联网

在安卓6.0里引入了一个wifi监测功能,这个模块会和谷歌服务器进行通讯以检查wifi网络是否真的有互联网连接,由于在中国大陆谷歌服务器无法访问,所以手机无法连接就会提示“已连接,但无法访问互联网”,所以这是正常的情况,请周知了,另外,wifi和信号还带有感叹号,这个是在安卓5.x时代就引入的网络监测模块,同样也是由于谷歌服务被墙导致的,具体解决办法见:http://www.inexus.co/article-2990-1.html

第3种方法比较麻烦,适用于未ROOT用户:

1、关机-开机-连上wifi

2、设置-用户-添加新用户

3、此时会出现和刚刷机完以后那样需要网络连接,一直点下一步,让手机连接网络

4、关键,当进行到正在联网时,强制关机

5、开机

6、切换下网络,你会发现感叹号很快消失了

7、删除刚刚新添加的用户

五、     参考:

1.      品尝棉花糖之Nexus5线刷Android6.0攻略:

http://blog.csdn.net/lincyang/article/details/47836835

2.      [1228更新]nexus 5x/6p/5/6/7/9 安卓6.0.1一键root办法 :

http://www.inexus.co/thread-23604-1-1.html

3.      nexus 4/5/5x/6/6p/7/9/10刷第三方recovery twrp教程:

http://www.inexus.co/thread-23627-1-1.html

4.      android 6.0 已连上网络 但无法访问互联网:

[更新]关于WiFi和信号图标出现感叹号消除办法 : http://www.inexus.co/article-2990-1.html

Nexus 5 Android 6.0.1刷机、Root的更多相关文章

  1. android [因为开了刷机精灵等软件 导致adb 无法使用]error: could not install *smartsocket* listener: cannot bind

    今天 使用 刷机精灵后 在使用android studio 时发现 adb 无法正常使用.   于是 想重启 adb.exe , 直接在DOS里杀掉adb输入:adb kill-server 再启动输 ...

  2. [ROM]HTC ThunderBolt 4.0.4 刷机教程

    Z大原帖:http://www.in189.com/thread-754076-1-1.html 精简版:http://www.in189.com/thread-807796-1-1.html 下载地 ...

  3. android 与 小米1S刷机学习

    本文内容为本博客作者原创,转载请注明出处或者发私信. [名词] 1.ROM包 :安卓手机系统,以.ZIP结尾,类似windows的 win7系统包,300M-700M不止 2.卡刷(Recovery模 ...

  4. 【译】Android 6.0 Changes (机翻加轻微人工校对)

    Android 6.0 Changes In this document Runtime Permissions Doze and App Standby Apache HTTP Client Rem ...

  5. rm刷机 root

    http://www.miui.com/download-290.html http://www.miui.com/shuaji-329.html    小米稳定版 不可以root 只有升级到上面的开 ...

  6. 联想A390T刷机ROOT教程

    一.联想A390T手动进入Recovery的方法: [步骤一]首先,将你的A390T手机关机,关机状态下,先按住电源键2秒,不要松开,再同时按下音量加.音量减两个键,此时,3个键一直按住不要放开,几秒 ...

  7. IVVI SK3-02小骨酷派SK3-02 进入第三方 recovery 刷机 ROOT

    首先下载好工具:http://url.cn/5AS7IiB 备用连接 :https://pan.baidu.com/s/1jJmbYAi 本篇教程教你如何傻瓜式解锁BootLoader并进入临时rec ...

  8. 金立 M6 (GN8003) 解锁 BootLoader 进入第三方 recovery 刷机 ROOT

    首先下载好工具:http://url.cn/5EILbQn 备用连接 :http://pan.baidu.com/s/1c28j7k0 本篇教程教你如何傻瓜式解锁BootLoader并刷入recove ...

  9. 酷派 5267 刷入第三方 recovery教程 刷机 ROOT

    准备工作: 一台电脑: 酷派5267手机: 一张内存卡: 下载好刷机资料:  http://pan.baidu.com/s/1i4LoVh7 备用下载: http://pan.baidu.com/s/ ...

随机推荐

  1. List<T> 排序

    List<T>的排序 List<DataPoint> dataPointsDataPints = ...; //按RegisterAddress升序排序 dataPointsD ...

  2. Kafka server的的停止

    这算是CountDownLatch的一个典型使用场景. kafka.Kafka对象的main方法中与此有关的代码为 // attach shutdown handler to catch contro ...

  3. Akka学习——术语和概念

    (大部分为翻译) Concurrency vs. Parallelism 并发 vs 并行   并发并不一定同时运行,比如使用时间片,使得两个任务交替执行.而并行是执两个任务真正的同时执行.     ...

  4. python time模块详解

    python time模块详解 转自:http://blog.csdn.net/kiki113/article/details/4033017 python 的内嵌time模板翻译及说明  一.简介 ...

  5. pthread_create()之前的属性设置

    一.pthread_create()之前的属性设置1.线程属性设置我们用pthread_create函数创建一个线程,在这个线程中,我们使用默认参数,即将该函数的第二个参数设为NULL.的确,对大多数 ...

  6. 一分钟明白 VS manifest 原理

    什么是vs 程序的manifest文件 manifest 是VS程序用来标明所依赖的side-by-side组建,如ATL, CRT等的清单. 为什么要有manifest文件 一台pc上,用一组建往往 ...

  7. 深入剖析Classloader(一)--类的主动使用与被动使用

    原文地址:http://yhjhappy234.blog.163.com/blog/static/3163283220115573911607 我们知道java运行的是这样的,首先java编译器将我们 ...

  8. CityEngine 2013部署安装

    安装环境: windows8.1 专业版 已安装arcgis10.2 2的授权方式也同样分为:单机许可和浮动 许可.单机许可是将许可部署在本机直接使用:浮动许可是部署到服务器上通过IP地址连接,可借出 ...

  9. CAS SiteMinder (单点登录)

    http://www.ibm.com/developerworks/cn/opensource/os-cn-cas/

  10. 使用dreamever去掉文件头部BOM(bom)信息 From 百度经验

    本文来此百度经验: 地址为:http://jingyan.baidu.com/article/3f16e003c3dc172591c103e6.html OM主要处理浏览器窗口与框架,但事实上,浏览器 ...