Nexus刷Android6.0

刷機

1.1下載Nexus 5 官方Android 6.0.1刷機包: hammerhead-mmb29s-factory-6bfcdfa4.tgz (鏈接: https://dl.google.com/dl/android/aosp/hammerhead-mmb29s-factory-6bfcdfa4.tgz)

1.2 解壓hammerhead-mmb29s-factory-6bfcdfa4.tgz到F:\NEXUS5_ANDROID6\hammerhead-mmb29s-factory-6bfcdfa4\hammerhead-mmb29s。

1.3 cd F:\NEXUS5_ANDROID6\hammerhead-mmb29s-factory-6bfcdfa4\hammerhead-mmb29s與f:

1.4 進入快速啓動模式:adb reboot bootloader

1.5 解鎖:fastboot oem unlock

解鎖新款設備
自 2014 年以來發布的所有 Nexus 和 Pixel 設備(從 Nexus 6 和 Nexus 9 開始)都內置有恢復出廠設置保護功能,需要通過多個步驟才能解鎖引導加載程序。

要在設備上啓用 OEM 解鎖功能,請執行以下操作:
在“設置”中,點按關於手機,然後點按版本號七 (7) 次。
當看到“您已處於開發者模式”這條消息後,點按返回按鈕。
點按開發者選項,然後啓用 OEM 解鎖和 USB 調試(如果 OEM 解鎖處於停用狀態,請連接到互聯網,以便設備可以至少簽到一次。如果 OEM 解鎖仍處於停用狀態,則說明您的設備可能已被運營商鎖定 SIM 卡,系統無法解鎖引導加載程序)。
重新啓動進入引導加載程序,然後使用 fastboot 解鎖。
對於新款設備(2015 年及之後發佈的設備):
fastboot flashing unlock

對於老款設備(2014 年及之前發佈的設備):
fastboot oem unlock

在屏幕上確認解鎖。
注意:在 Nexus 10 上,解鎖引導加載程序後,內部存儲空間仍將保持未格式化狀態。您可以依次使用 fastboot format cache 和 fastboot format userdata 來格式化設備。
重新鎖定引導加載程序
要重新鎖定引導加載程序,請執行以下命令:

對於新款設備(2015 年及之後發佈的設備):
fastboot flashing lock

對於老款設備(2014 年及之前發佈的設備):
fastboot oem lock

1.6 執行:flash-all,出現archive does not contain 'system.sig'之後,需要等待一段時間,然後會繼續。最後刷機成功。

@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-hammerhead-hhz12k.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.28.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-hammerhead-mmb29s.zip

echo Press any key to exit...
pause >nul
exit

如果出現Writing 'userdata' FAILED (remote: 'Bogus size sparse and chunk header')則

1.7 執行:flash-base.sh

#!/bin/sh

# 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.

fastboot flash bootloader bootloader-hammerhead-hhz12k.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.28.img
fastboot reboot-bootloader
sleep 5

1.8 解壓目錄下的image-hammerhead-mmb29s.zip到F:\NEXUS5_ANDROID6\hammerhead-mmb29s-factory-6bfcdfa4\hammerhead-mmb29s\image-hammerhead-mmb29s,且cd image-hammerhead-mmb29s

1.9 複製內容到image-hammerhead-mmb29s目錄下,保存爲flash-image.bat,並執行flash-image.bat

@echo off
::正常開機模式
::adb reboot bootloader
::reboot模式
fastboot reboot-bootloader
ping -n 15 127.0.0.1 >nul
::fastboot oem unlock
fastboot erase system
fastboot erase boot
fastboot erase recovery
fastboot erase cache
fastboot erase userdata
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
pause
fastboot reboot

執行正確結果

重啓刷機成功 

 

Root

2.1刷入第三方的recovery包

找到適配您的nexus設備的twrp,可以在https://twrp.me/Devices/ 輸入相關設備名即可找到最新的
nexus 5合適的地址: https://dl.twrp.me/hammerhead/,下載twrp-3.3.1-0-hammerhead.img
2.1.1 adb reboot bootloader
2.1.2 fastboot flash recovery twrp-3.3.1-0-hammerhead.img
刷入成功後,可以在bootloader狀態下,用音量鍵來選擇"recovery mode"來進入twrp。

 

2. 2刷入Su

2.2.1 下載SuperSU v2.64 :

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

 

2.2.2 上傳BETA-SuperSU-v2.64-20151220185127.zip到sdcard
adb push "F:\NEXUS5_ANDROID6\BETA-SuperSU-v2.64-20151220185127.zip" /sdcard/

2.2.3 選擇Wipe->Format Data,自動重啓;(這步是清除數據,應該可以不要)
2.2.4 重啓後,選擇Install,找到放在SD卡上的BETA-SuperSU-v2.64-20151220185127.zip;
2.2.5 選擇Add More Zips 添加其他待刷入的zip包;
2.2.6 滑動進行刷入,完成後重啓手機即可。

 

Xposed

刷入Xposed框架

下載Xposed框架:http://dl-xda.xposed.info/framework/sdk23/arm/
我這裏是下載最新的v89-sdk23版本。

具體步驟

  1. 將壓縮包xposed-v89-sdk23-arm.zip複製到sdcard上:

  2. 點擊twrp上的install,選擇剛剛導入的壓縮包,重啓就OK了。

  3. 最後安裝XposedInstaller_3.1.5.apk

 

Nexus5 Android6.0 Wifi 已連接,但無法訪問互聯網問題解決

實際已經鏈接成功,只不過由於google無法訪問造成的提示問題。

4.1 adb shell settings put global captive_portal_server www.g.cn

4.2 然後開啓飛行模式,然後關閉飛行模式解決!

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