Nexus 5 Android 6.0.1刷机、Root

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

时间: 2024-08-02 15:09:47

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

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

Android 6.0 Changes In this document Runtime Permissions Doze and App Standby Apache HTTP Client Removal BoringSSL Access to Hardware Identifiers Notifications AudioManager Changes Text Selection Browser Bookmark Changes Android Keystore Changes Wi-F

rm刷机 root

http://www.miui.com/download-290.html http://www.miui.com/shuaji-329.html 方法1:系统内升级 下载必要的文件,为刷机过程做准备. MIUI完整包跨版本升级.降级均需手动进入Recovery 清除全部数据. 带BL锁机型:跨版本升级过程中会强制清除全部数据,无需手动清除. 下载论坛APP,跟刷机大神一起讨论刷机问题吧!立即下载 下载 MIUI_ROM 最新安装包 立即下载如果已经在下载页面下载过最新安装包,无需重新下载. 将

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

首先下载好工具:http://url.cn/5AS7IiB 备用连接 :https://pan.baidu.com/s/1jJmbYAi 本篇教程教你如何傻瓜式解锁BootLoader并进入临时recovery 仅限于IVVI SK3-02小骨 酷派SK3-02使用. 首先需要在设置-关于手机 找到版本号 然后手机快速连续点击来启用开发者模式 然后在开发者模式里面勾选 USB调试 然后连接电脑 使用 刷机精灵 连接手机,确认已经成功连接后 (如果不能连接请状态栏下拉,点击 "USB已连接&quo

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

首先下载好工具:http://pan.baidu.com/s/1hsw5cjU 备用连接 :http://url.cn/5EILbQn 本篇教程教你如何傻瓜式解锁BootLoader并刷入recovery 仅限于金立 M6 (GN8003) 使用. 首先需要在设置-关于手机 找到版本号 然后手机快速连续点击来启用开发者模式 然后在开发者模式里面勾选 USB调试 和 允许OEM解锁 然后连接电脑 使用 刷机精灵 连接手机,确认已经成功连接后 打开 GiONEE_GN8003解锁BootLoader

Google Nexus 5x Android 7.0 Root

很久没有写东西了,准备重新养成这个好习惯.因为自己一直在用Nexus,前段时间自己的Nexus5老的不行了,所以买了台5x,一直没时间root,今天有时间终于有时间弄一下. 在这里整理分享一下. 开始之前请备份好文件,以下操作可能删除用户文件. 手机准备工作 首先你要确保USB驱动安装好,这个简单,自行搜索方法吧. 打开手机的USB调试.先启用"开发者选项". 方法: 设置->关于手机->版本号, 连续点击5次版本号即可启用开发者模式.退回设置中,在"关于手机&q

Android刷机教程

我的机器是Nexus 5 一. 安装驱动 如何进入fastboot模式 1. 拔掉数据线,将手机关机 2. 关机后同时按住[音量减小键]和[开关机键]即可进入Fastboot模式 开启usb调试  --> 勾选usb调试 adb devices可以看到设备名即可 二. 下载刷机包 这是Android 4.4的刷机包,大家可以根据需求自己寻找指定的版本的刷机包 https://dl.google.com/dl/android/aosp/hammerhead-kot49h-factory-02006

华硕zenfone2 ze551ml刷机

以下内容为记事,供自己以后可能需要的参考. 购买时间:    2016年12月买的asus zenfone2 ze551ml,性能不错,配置高,使用流畅,支持NFC,双开双待,有快充,像素也不错,比我之前买的OPPO X9077强多了,系统流畅上很明显的差别. 使用体验(CM-5.0): 买回来是CM-5.0的系统,推送了一次升级到0.197版本,有很多不错的应用,比如华硕的pc link上班时候可以不用看手机,remote link可是在需要时代替鼠标,还要很喜欢的用户模式,可以建立隐私模式使

刷机相关

android开发过程中,刷机肯定是必不可少的.下面介绍一下刷system.img和boot.img的方法. ●boot.img device等相关的内容,都要刷boot.img来验证. $make bootimage -j4                   首先是编译boot.img 因为VerifiedBoot,dm_verity被有效化之后,刷机的步骤和以前稍微有点变化. Settings->Device management->Developer options->OEM u

[Android编译(二)] 从谷歌官网下载android 6.0源码、编译并刷入nexus 6p手机

1 前言 经过一周的奋战,终于从谷歌官网上下载最新的android 6.0.1_r62源码,编译成功,并成功的刷入nexus6p,接着root完毕,现写下这篇博客记录一下实践过程. 2 简介 自己下载android系统源码,修改定制,然后编译刷入安卓手机,想想还有点小激动呢.简单点说一句话--定制我们自己的MIUI,这就是android的魅力,这篇博客博主就来教大家实现自己的定制系统. 首先,要明白下面的基础知识: (1) 什么是aosp? aosp就是android open source p