Pixel设备解锁OEM

进入bootloader

# 1.开机状态, 执行
adb reboot bootloader

# 2. 关机状态, 按住音量-, 然后按开机键

解锁

# 连接USB后, 先看看设备是否连接成功, 如有报错看文末
fastboot devices

# 解锁 (用于2015年及之后的设备)
fastboot flashing unlock

# 老设备解锁 (2014及以前的设备)
fastboot oem unlock
 

重新上锁 (会wipe data, 擦除用户数据, 谨慎操作)

# 进入bootloader模式, 执行
fastboot flashing lock

# 老设备
fastboot oem lock
 

 

刷写设备

fastboot flashall -w

 

错误

$ fastboot devices
no permissions (missing udev rules? user is in the plugdev group); see [http://developer.android.com/tools/device.html]fastboot

解决:

$ lsusb
Bus 002 Device 002: ID 8087:8002 Intel Corp. 8 channel internal hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 09da:6402 A4Tech Co., Ltd. A4tech KB
Bus 003 Device 002: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 003 Device 018: ID 18d1:4ee0 Google Inc. Nexus/Pixel Device (fastboot)
Bus 003 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub

# 注意 ID 18d1:4ee0 是我的手机
$ sudo vi /etc/udev/rules.d/51-android.rules
# Pixel 2
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1" ,MODE="0666", GROUP="plugdev"

#保存退出后
$ sudo service udev restart
# 重新插下手机
$ fastboot devices
xxx11A0xxxx    fastboot

 

 

参考:

  https://source.android.google.cn/setup/build/running

posted @ 2020-11-09 18:10  Coding&Life  阅读(7551)  评论(0编辑  收藏  举报