Nexus 5 Android 6.0.1刷機、Root

原文鏈接:https://www.cnblogs.com/wintys/p/nexus_5_android_6_flash.html

一、     準備

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 已連上網絡 但無法訪問互聯網:

 

轉載地址:https://www.cnblogs.com/wintys/p/nexus_5_android_6_flash.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章