Android P 以上版本,GMS CDD 检查 userdebug 版本是否有 root 权限

P 以上版本,检查 userdebug 版本是否有 root 权限的行为发生了变化。

以下参考自:https://ressrc.com/2018/09/21/android-p9-0-userdebug%E7%89%88%E6%9C%AC%E6%89%A7%E8%A1%8Cadb-remount%E5%A4%B1%E8%B4%A5/

或 : https://www.cnblogs.com/bluestorm/p/10911676.html

[DESCRIPTION]

     在android P版本上如果按照“FAQ18076 android 6.0 M userdebug版本执行adb remount失败”的做法在userdebug版本上执行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.

  

 

[SOLUTION]

* Android P + kernel-4.4 or kernel-3.18
– download preloader with verified boot disabled which location is the same as scatter file //preloader_<PROJECT>_SBOOT_DIS.bin


– adb root
– adb disable-verity
– adb reboot
– adb root
– adb remount

 

* Android P + kernel-4.9 or after
– download preloader with verified boot disabled which location is the same as scatter file. //preloader_<PROJECT>_SBOOT_DIS.bin
– boot to Home Screen
– go to setting -> system -> Developer options -> OEM unlocking
– adb reboot bootloader
– fastboot flashing unlock
– press volume up key
– fastboot reboot
– adb root
– adb disable-verity
– adb reboot
– adb root
– adb remount

After Android P, preloader_<PROJECT>_SBOOT_DIS.bin will be generated automatically after building preloader.

* 请注意下载最新的adb/fastboot tool

Windows
https://dl.google.com/android/repository/platform-tools-latest-windows.zip
Mac
https://dl.google.com/android/repository/platform-tools-latest-darwin.zip
Linux
https://dl.google.com/android/repository/platform-tools-latest-linux.zip

 

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

上面可以看到,解锁方式用 adb 或者 fastboot 方式都是可行的。

自测的时候,没有找到 preloader_<PROJECT>_SBOOT_DIS.bin 这个文件,用的是 adb 方式。

我默认选的原文允许被我转载,如果原文作者不允许被转载,请联系我删除,谢谢!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值