Android P(9.0) userdebug 版本执行adb remount失败
当你执行 adb remount 时会发现提示 remount of the / superblock failed: Permission denied
remount failed
原因是android P 版本后 google 启用 avb(Android Verified Boot)2.0,verified boot and DM-verity默认启用策略发生了变化。详情如下:
DM-Verity behavior changes from vboot1.0 to avb2.0.
On vboot1.0, dm-verity is turned off on eng build and is enabled on userdebug/user build.
DM-verity could be disabled with adb (not fastboot) on userdebug build without unlocking device first.
DM-Verity could not be disabled on user build.
On avb2.0, dm-verity behavior are the same on all build variants.
It’s turned on by default and could only be disabled after device is unlocked.
dm-verity disable flag is moved from system image dm-verity metadata(vboot1.0) to vbmeta image(avb2.0), and you have two ways to disable it: adb and fastboot
解决办法:
1、setting -> system -> Developer options -> OEM unlocking
进入开发者模式中打开 OEM 接锁
2、adb reboot bootloader
设备重启进入 bootloader 界面,继续执行
3、fastboot flashing unlock
如果出现 < waiting for any device >,说明你的 Android 设备驱动安装不正确,可以下载 驱动精灵,驱动精灵安装好后再次进入 fastboot 界面执行 第三步,这样你应该能看到下面的界面
4、press volume up key
按音量上键,确认解锁。
选择Yes后 显示
Unlock Pass…return to fastboot in 3s 则解锁成功
如果仅显示
return to fastboot in 3s 则表示未解锁成功,可能还需要修改如下代码
vendor\mediatek\proprietary\bootable\bootloader\lk\app\mt_boot\sec_unlock.c
修改 fastboot_oem_unlock() 中将
if (mtk_detect_key(MT65XX_MENU_SELECT_KEY)) { //VOL_UP
和
if (mtk_detect_key(MT65XX_MENU_OK_KEY)) { //VOL_DOWN
两个互换后重新编译。再次执行以上操作
5、fastboot reboot
解锁成功后,执行命令重启
6、adb root
7、adb disable-verity
提示 Successfully disabled verity
Now reboot your device for settings to take effect
8、adb reboot
9、adb root
10、adb remount
remount 成功,push 成功](https://imgchr.com/i/uIStL6)