Android4.4环境搭建

2021-03-25  本文已影响0人  Sharkchilli

前言

我的nexus5 手机也经常需要刷机,因为刷机方式和pixel有些不同所以这里也记录一下,以便以后恢复。

官方包

依然是去官网下载n5代号hammerhead的线刷包,这里我下载的4.4
https://developers.google.cn/android/images#hammerhead

解压进入到目录
我的手机不能直接运行flash-all.bat
使用下面的命令(读者根据自己下载的版本更换)

//进入bootloader
adb reboot bootloader
fastboot erase cache
fastboot erase userdata
fastboot erase recovery
fastboot erase system
fastboot erase userdata
fastboot flash bootloader .\bootloader-hammerhead-hhz11k.img
fastboot reboot-bootloader
fastboot flash radio .\radio-hammerhead-m8974a-2.0.50.1.16.img
fastboot reboot-bootloader
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

root

进入CF-Auto-Root
https://autoroot.chainfire.eu/
下载 Nexus 5 对应的 CF-Auto-Root 版本

image.png
image.png

将手机进入 bootloader 模式

adb reboot bootloader

运行 root-windows.bat

 .\root-windows.bat

----- CF-Auto-Root-hammerhead-hammerhead-nexus5 -----

If you are on Android 5.0 or newer, please make sure the "Allow OEM Unlock"
option (if present) is enabled in "Settings->Developer Options".

If you cannot find "Developer Options" under "Settings", first go to the
"Settings->About" screen, find the "Build number" entry, and tap it 7 times.

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

Please make sure your device is in bootloader/fastboot mode before continuing.

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

***WARNING*** ALL YOUR DATA *MAY* BE WIPED ! ***WARNING***

We are going to run the "OEM UNLOCK" command on your device. If your device
was not previously unlocked, this will wipe all your data !

Please watch the screen on your device, user input may be required.

Press Ctrl+C followed by Y to cancel !

请按任意键继续. . .

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

If you just unlocked for the first time, it is advised to boot the device into
Android before continuing. This first boot may take several minutes, sometimes
even half an hour.

If you decide to boot back into Android first, return your device to
bootloader/fastboot mode before continuing again.

Press Ctrl+C followed by Y to cancel !

请按任意键继续. . .

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

We will now attempt to boot CF-Auto-Root. You should see a red Android on the
screen of your device in a minute, with scrolling white text on top of it.

downloading 'boot.img'...
OKAY [  0.609s]
booting...
OKAY [  0.118s]
finished. total time: 0.732s

If nothing happens even after several minutes, something may be wrong.

Once CF-Auto-Root is done, it will reboot your device. Keep in mind that your
device may reboot a number of times, and it may be a few minutes before you
are back into Android. It is important that you do not interrupt this process,
unless it takes more than five minutes in total.

请按任意键继续. . .

经过漫长的重启后就成功了

上一篇下一篇

猜你喜欢

热点阅读