|
发表于 2020-8-3 21:00:42
18446 浏览 6 回复
Android 9 userdebug版本执行adb remount失败
本帖最后由 tangh 于 2020-8-5 14:41 编辑
android 9及以后版本google启用avb(Android Verified Boot)2.0,verified boot and DM-verity默认启用策略发生了变化
解决方法:
kernel-4.4 和 kernel-3.18:
- adb root
- adb disable-verity
- adb reboot
- adb root
- adb remount
复制代码
kernel-4.9以及更高版本:
- 在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
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|
手机微信同号:13682654092
|
|
|
|
|
|
楼主|
发表于 2020-8-3 21:02:38
如何确认 fastboot unlock 解锁成功
1、fastboot 模式下按音量上键后是否提示 Unlock Pass…return to fastboot in 3s
2、重启后界面是否显示
orange state
Your deivce has been unlocked and can’t be trusted
your device will boot in 5 seconds
3、解锁成功后检查这两个属性会从
[ro.boot.flash.locked]: [1]
[ro.boot.verifiedbootstate]: [green]
变成
[ro.boot.flash.locked]: [0]
[ro.boot.verifiedbootstate]: [orange]
|
|
手机微信同号:13682654092
|
|
|
|
|
|
楼主|
发表于 2020-12-18 13:54:16
- 如果需要remount 分区,需要将MTK_SECURITY_SW_SUPPORT打开,具体位置如下:
- +++ b/device/mediateksample/k62v1_64_bsp/ProjectConfig.mk
- @@ -562,7 +562,6 @@ MTK_SCOMO_ENTRY = no
- MTK_SCREEN_OFF_WIFI_OFF = no
- MTK_SDIOAUTOK_SUPPORT = no
- +MTK_SECURITY_SW_SUPPORT=yes
- +++ b/kernel-4.9/arch/arm64/configs/k62v1_64_bsp_defconfig
- @@ -181,7 +181,6 @@ CONFIG_MTK_CONNSYS_DEDICATED_LOG_PATH=y
- CONFIG_MTK_ECCCI_DRIVER=y
- CONFIG_MTK_ECCCI_C2K=y
- CONFIG_MTK_BTIF=y
- +CONFIG_MTK_SECURITY_SW_SUPPORT=y
- +++ b/vendor/mediatek/proprietary/bootable/bootloader/lk/project/k62v1_64_bsp.mk
- @@ -20,7 +20,7 @@ CUSTOM_LK_LCM="ili9881c_hd720_dsi_vdo lt8912b_mipi_to_lvds"
- DEFINES += MTK_ROUND_CORNER_SUPPORT
- #nt35595_fhd_dsi_cmd_truly_nt50358 = yes
- #FASTBOOT_USE_G_ORIGINAL_PROTOCOL = yes
- +MTK_SECURITY_SW_SUPPORT = yes
- +++ b/vendor/mediatek/proprietary/bootable/bootloader/preloader/custom/k62v1_64_bsp/k62v1_64_bsp.mk
- @@ -13,7 +13,7 @@ MTK_EMMC_SUPPORT=yes
- MTK_EFUSE_WRITER_RESERVE_CODESIZE=no
- MTK_EFUSE_WRITER_SUPPORT=no
- MTK_MT8193_SUPPORT=no
- +MTK_SECURITY_SW_SUPPORT=yes
复制代码 |
|
手机微信同号:13682654092
|
|
|
|
|
|
若设备无音量键,则需要修改源码跳过音量键确认的界面 修改路径: - vendor/mediatek/proprietary/bootable/bootloader/lk/app/mt_boot/sec_unlock.c
复制代码- @@ -336,7 +336,8 @@ void fastboot_oem_unlock(const char *arg, void *data, unsigned sz)
- unlock_warranty();
-
- while (1) {
- - if (mtk_detect_key(MT65XX_MENU_SELECT_KEY)) { //VOL_UP
- + //if (mtk_detect_key(MT65XX_MENU_SELECT_KEY)) { //VOL_UP
- + if (1) { //VOL_UP
- fastboot_info("Start unlock flow\n");
- //Invoke security check after confirming "yes" by user
- ret = fastboot_get_unlock_perm(&unlock_allowed);
复制代码 以下是android9.0上设备的操作文档
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|
|
|
|
|
|
|
本帖最后由 星空 于 2021-8-24 10:15 编辑
1 如果执行fastboot flashing unlock 后提示
1 fastboot 卡在 waiting for device(明明已经连上usb线) adb 更新(可直接使用附件版本)
2 fastboot flashing unlock = Failed (remote: unknown comand)
需要将MTK_SECURITY_SW_SUPPORT打开
eg:61 32 位go 版本做如下修改
- diff --git device/mediateksample/k61v1_32_bsp_1g/ProjectConfig.mk
- @@ -569,6 +569,8 @@ MTK_RUNTIME_PERMISSION_SUPPORT = no
- MTK_SCOMO_ENTRY = no
- MTK_SCREEN_OFF_WIFI_OFF = no
- MTK_SDIOAUTOK_SUPPORT = no
- +MTK_SECURITY_SW_SUPPORT= yes
- +MTK_SEC_FASTBOOT_UNLOCK_SUPPORT=yes
- MTK_SEARCH_DB_SUPPORT = yes
- MTK_SEC_MODEM_AUTH = no
- MTK_SEC_MODEM_ENCODE = no
-
-
- diff --git kernel-4.9/arch/arm/configs/k61v1_32_bsp_1g_defconfig
- @@ -179,6 +180,7 @@ CONFIG_MTK_CONNSYS_DEDICATED_LOG_PATH=y
- CONFIG_MTK_ECCCI_DRIVER=y
- CONFIG_MTK_ECCCI_C2K=y
- CONFIG_MTK_BTIF=y
- +CONFIG_MTK_SECURITY_SW_SUPPORT=y
- CONFIG_MTK_ACCDET=y
- CONFIG_ACCDET_EINT_IRQ=y
- CONFIG_ACCDET_SUPPORT_EINT0=y
-
-
- diff --git vendor/mediatek/proprietary/bootable/bootloader/lk/project/k61v1_32_bsp_1g.mk
- @@ -20,7 +20,7 @@ CUSTOM_LK_LCM="ili9881c_hd720_dsi_vdo ili9881p_hd720_dsi_vdo"
- DEFINES += MTK_ROUND_CORNER_SUPPORT
- #nt35595_fhd_dsi_cmd_truly_nt50358 = yes
- #FASTBOOT_USE_G_ORIGINAL_PROTOCOL = yes
- -MTK_SECURITY_SW_SUPPORT = no
- +MTK_SECURITY_SW_SUPPORT = yes
- MTK_VERIFIED_BOOT_SUPPORT = yes
- MTK_SEC_FASTBOOT_UNLOCK_SUPPORT = yes
- SPM_FW_USE_PARTITION = yes
-
-
- diff --git vendor/mediatek/proprietary/bootable/bootloader/preloader/custom/k61v1_32_bsp_1g/k61v1_32_bsp_1g.mk
- @@ -13,7 +13,7 @@ MTK_EMMC_SUPPORT=yes
- MTK_EFUSE_WRITER_RESERVE_CODESIZE=no
- MTK_EFUSE_WRITER_SUPPORT=no
- MTK_MT8193_SUPPORT=no
- -MTK_SECURITY_SW_SUPPORT=no
- +MTK_SECURITY_SW_SUPPORT=yes
- MTK_FACTORY_LOCK_SUPPORT=no
- CUSTOM_SEC_AUTH_SUPPORT=no
- MTK_KERNEL_POWER_OFF_CHARGING=yes
复制代码
2 在确认lock还是unlock界面,如果按键不行,请修改
音量+键不行
- //音量+键没反应
- diff --git b/vendor/mediatek/proprietary/bootable/bootloader/lk/target/k61v1_32_bsp_1g/include/target/cust_key.h
- @@ -16,7 +16,7 @@
- #ifdef MT65XX_RECOVERY_KEY
- #define MT65XX_BOOT_MENU_KEY MT65XX_RECOVERY_KEY /* KEY_VOLUMEUP */
- #else
- -#define MT65XX_BOOT_MENU_KEY 17 /* KEY_VOLUMEUP */
- +#define MT65XX_BOOT_MENU_KEY 9 /* KEY_VOLUMEUP */
- #endif
- #define MT65XX_MENU_SELECT_KEY MT65XX_BOOT_MENU_KEY
复制代码
硬件上没做按键
- diff --git vendor/mediatek/proprietary/bootable/bootloader/lk/app/mt_boot/sec_unlock.c
- @@ -336,7 +336,7 @@ void fastboot_oem_unlock(const char *arg, void *data, unsigned sz)
- unlock_warranty();
- while (1) {
- - if (mtk_detect_key(MT65XX_MENU_SELECT_KEY)) { //VOL_UP
- + if (1) { //VOL_UP
- fastboot_info("Start unlock flow\n");
- //Invoke security check after confirming "yes" by user
- ret = fastboot_get_unlock_perm(&unlock_allowed);
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|
|
|
|
|
|
|
android p + kernel4.9 以上的版本 源码调过avb
直接置位检验标志位
至此可以直接 adb root ,adb remount
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|
|
|
|
|
|
|
本帖最后由 七个柚子多少钱 于 2023-2-17 15:38 编辑
按照1楼方法,mt6853 android11成功执行adb remount,步骤如下:- 在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
复制代码 执行成功结果:
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|
|
|
|
|
|
登录或注册
|