Android O刷机
准备一台设备Nexus 6p,操作系统版本7.1.2
下载刷机包
angler-opp2.170420.019-factory-4554918a.zip
下载地址:https://developer.android.com/preview/download.html?hl=zh-cn
解压缩这个安装包,文件目录如下:
angler-opp2.170420.019 ll
total 2233208
-rwx------@ 1 liudan staff 3.5M 5 18 16:51 bootloader-angler-angler-03.69.img
-rw-r-----@ 1 liudan staff 971B 5 18 16:51 flash-all.bat
-rwxr-x--x@ 1 liudan staff 842B 5 18 16:51 flash-all.sh
-rwxr-x--x@ 1 liudan staff 790B 5 18 16:51 flash-base.sh
-rw-r-----@ 1 liudan staff 1.0G 5 18 16:51 image-angler-opp2.170420.019.zip
-rwx------@ 1 liudan staff 48M 5 18 16:51 radio-angler-angler-03.81.img
通过USB连接设备
启动设备的fastboot模式
使用adb:
adb reboot bootloader
使用物理组合键:
先关机,在开机后立马按住音量- 和电源键
不同设备参照:https://source.android.com/source/running?hl=zh-cn#booting-into-fastboot-mode
解锁设备的fastboot模式
fastboot flashing unlock
新开启一个终端进入到angler-opp2.170420.019目录
执行flash-all.sh脚本
结果如下:
angler-opp2.170420.019 ./flash-all.sh
target reported max download size of 494927872 bytes
sending 'bootloader' (3544 KB)...
OKAY [ 0.104s]
writing 'bootloader'...
OKAY [ 0.207s]
finished. total time: 0.312s
rebooting into bootloader...
OKAY [ 0.022s]
finished. total time: 0.022s
target reported max download size of 494927872 bytes
sending 'radio' (48728 KB)...
OKAY [ 1.072s]
writing 'radio'...
OKAY [ 2.183s]
finished. total time: 3.254s
rebooting into bootloader...
OKAY [ 0.022s]
finished. total time: 0.022s
target reported max download size of 494927872 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
archive does not contain 'vendor.sig'
wiping userdata...
Creating filesystem with parameters:
Size: 27419729920
Block size: 4096
Blocks per group: 32768
Inodes per group: 8176
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 6694270
Block groups: 205
Reserved block group size: 1024
Created filesystem with 11/1676080 inodes and 149233/6694270 blocks
wiping cache...
Creating filesystem with parameters:
Size: 104857600
Block size: 4096
Blocks per group: 32768
Inodes per group: 6400
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 25600
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/6400 inodes and 1438/25600 blocks
--------------------------------------------
Bootloader Version...: angler-03.69
Baseband Version.....: angler-03.81
Serial Number........: ENU7N15B12012244
--------------------------------------------
checking product...
OKAY [ 0.020s]
checking version-bootloader...
OKAY [ 0.021s]
checking version-baseband...
OKAY [ 0.019s]
sending 'boot' (12861 KB)...
OKAY [ 0.309s]
writing 'boot'...
OKAY [ 1.392s]
sending 'recovery' (18117 KB)...
OKAY [ 0.409s]
writing 'recovery'...
OKAY [ 0.294s]
erasing 'system'...
OKAY [ 0.545s]
sending sparse 'system' 1/5 (472382 KB)...
OKAY [ 10.271s]
writing 'system' 1/5...
OKAY [ 6.706s]
sending sparse 'system' 2/5 (469744 KB)...
OKAY [ 10.466s]
writing 'system' 2/5...
OKAY [ 6.836s]
sending sparse 'system' 3/5 (483187 KB)...
OKAY [ 11.028s]
writing 'system' 3/5...
OKAY [ 7.717s]
sending sparse 'system' 4/5 (454401 KB)...
OKAY [ 10.113s]
writing 'system' 4/5...
OKAY [ 6.610s]
sending sparse 'system' 5/5 (225368 KB)...
OKAY [ 5.388s]
writing 'system' 5/5...
OKAY [ 3.296s]
sending 'vendor' (178191 KB)...
OKAY [ 3.930s]
writing 'vendor'...
OKAY [ 3.010s]
erasing 'userdata'...
OKAY [ 2.952s]
sending 'userdata' (139001 KB)...
OKAY [ 3.026s]
writing 'userdata'...
OKAY [ 1.980s]
erasing 'cache'...
OKAY [ 0.076s]
sending 'cache' (5752 KB)...
OKAY [ 0.160s]
writing 'cache'...
OKAY [ 0.108s]
rebooting...
finished. total time: 96.755s
刷机成功,记得关闭bootloader
先进入fastboot模式
fastboot flashing lock