一.默认root
1. adb shell 默认root
在build/core/main.mk下将ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1
改成ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0
2.挂载分区device
ockchip
k3399fstab.rk30board.bootmode.emmc
system 由 ro 改成 rw
二.补丁
diff --git a/build/core/main.mk b/build/core/main.mk index a6b2544..98d0549 100755 --- a/build/core/main.mk +++ b/build/core/main.mk @@ -393,7 +393,7 @@ enable_target_debugging := true tags_to_install := ifneq (,$(user_variant)) # Target is secure in user builds. - ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=1 + ADDITIONAL_DEFAULT_PROPERTIES += ro.secure=0 ADDITIONAL_DEFAULT_PROPERTIES += security.perf_harden=1 ifeq ($(user_variant),user) diff --git a/device/rockchip/rk3399/fstab.rk30board.bootmode.emmc b/device/rockchip/rk3399/fstab.rk30board.bootmode.emmc index 8668a0f..b40ba17 100755 --- a/device/rockchip/rk3399/fstab.rk30board.bootmode.emmc +++ b/device/rockchip/rk3399/fstab.rk30board.bootmode.emmc @@ -3,7 +3,7 @@ # The filesystem that contains the filesystem checker binary (typically /system) cannot # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK -/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,resize +/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 rw,noatime,nodiratime,noauto_da_alloc wait,resize # use this line below instead to enable verity #/dev/block/platform/fe330000.sdhci/by-name/system /system ext4 ro,noatime,nodiratime,noauto_da_alloc wait,check,verify /dev/block/platform/fe330000.sdhci/by-name/cache /cache ext4 noatime,nodiratime,nosuid,nodev,noauto_da_alloc,discard wait,check