有时候需要push应用或是so文件到system目录下,这时候就需要执行adb remount,但是有时候会提示:
remount of the / superblock failed: Permission denied
remount failed
这时可以通过执行adb disable-verity来解决,正常情况下,执行adb disable-verity成功后会提示:
Successfully disabled verity
Now reboot your device for settings to take effect
但是偶尔会失败,提示:
Device is locked. Please unlock the device first
执行adb disable-verity提示:Device is locked. Please unlock the device first 解决方法:
(1)进入开发者模式,打开OEM 解锁
(2)adb reboot bootloader进入fastboot模式
(3)fastboot flashing unlock,会提示Finished. Total time: 0.025s
(4)如果机器没有自动重启,则执行fastboot reboot重启手机.在运行过程中我的机器会自动重启所以省略了这一步
(5)开机之后,依次adb root,adb disable-verity,adb reboot即可,此时查看OEM 解锁项是灰显的