修改基于RK3399 android10
一、user版本默认编译不打包su,故须在
build/target目录下
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index c39cb31..0d44d05 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -270,6 +270,7 @@ PRODUCT_PACKAGES += \
wificond \
wifi-service \
wm \
+ su \
# VINTF data for system image
PRODUCT_PACKAGES += \
二、加入缺失的权限
根据日志添加权限
11-09 06:42:22.399 17729 17729 I auditd : type=1400 audit(0.0:136): avc: denied { execute } for comm="e.myapplication" name="su" dev="dm-0" ino=3483 scontext=u:r:untrusted_app:s0:c94,c256,c512,c768 tcontext=u:object_r:su_exec:s0 tclass=file permissive=1 app=com.example.myapplication
11-09 06:42:22.399 17729 17729 I e.myapplication: type=1400 audit(0.0:136): avc: denied { execute } for name="su" dev="dm-0" ino=3483 scontext=u:r:untrusted_app:s0:c94,c256,c512,c768 tcontext=u:object_r:su_exec:s0 tclass=file permissive=1 app=com.example.myapplication
1 在untrusted_app.te 添加权限 scontext=的值决定再xxx.te添加
比如:
allow untrusted_app su_exec:file= {execute map getattr };
untrusted_app 为scontext的值
su_exec 为tcontext中的值
file 为tclass 的值
{}中的值由denied { execute } 决定
diff --git a/BoardConfig_hmi_156_rk99.mk b/BoardConfig_hmi_156_rk99.mk
index f2a8bd7..05a9137 100755
--- a/BoardConfig_hmi_156_rk99.mk
+++ b/BoardConfig_hmi_156_rk99.mk
@@ -68,12 +68,12 @@ BOARD_AVB_ENABLE ?= false
BOARD_SELINUX_ENFORCING ?= true
ifneq ($(filter true, $(BOARD_AVB_ENABLE)), )
-BOARD_KERNEL_CMDLINE := androidboot.wificountrycode=US androidboot.hardware=rk30board androidboot.console=ttyFIQ0 firmware_class.path=/vendor/etc/firmware init=/init rootwait ro init=/init
+BOARD_KERNEL_CMDLINE := androidboot.wificountrycode=US androidboot.hardware=rk30board androidboot.console=ttyFIQ0 firmware_class.path=/vendor/etc/firmware init=/init rootwait ro init=/init
else # BOARD_AVB_ENABLE is false
-BOARD_KERNEL_CMDLINE := console=ttyFIQ0 androidboot.baseband=N/A androidboot.wificountrycode=US androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 androidboot.verifiedbootstate=orange firmware_class.path=/vendor/etc/firmware init=/init rootwait ro
+BOARD_KERNEL_CMDLINE := androidboot.selinux=permissive console=ttyFIQ0 androidboot.selinux=permissive androidboot.baseband=N/A androidboot.wificountrycode