diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 2206820..c4283b9 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -96,6 +96,7 @@ OVERRIDE_RS_DRIVER := libRSDriver_adreno.so TARGET_PROVIDES_QTI_TELEPHONY_JAR := true # Sepolicy +PRIVATE_EXCLUDE_BUILD_TEST := true BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/private BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/qcom/sepolicy/private BOARD_PLAT_PUBLIC_SEPOLICY_DIR += device/qcom/sepolicy/public diff --git a/sepolicy/private/audioserver.te b/sepolicy/private/audioserver.te new file mode 100644 index 0000000..ca81465 --- /dev/null +++ b/sepolicy/private/audioserver.te @@ -0,0 +1,2 @@ +# Allow audioserver to read system_configs_file +allow audioserver system_configs_file:file r_file_perms; diff --git a/sepolicy/private/file.te b/sepolicy/private/file.te index d86e6d1..0fb1f1a 100644 --- a/sepolicy/private/file.te +++ b/sepolicy/private/file.te @@ -4,3 +4,4 @@ type firmware_file, file_type; type persist_file, file_type; type sysfs_graphics, sysfs_type, fs_type; type sysfs_white_led, sysfs_type, fs_type; +type system_configs_file, system_file_type, file_type; diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts index bc3e8d0..0d259d0 100644 --- a/sepolicy/private/file_contexts +++ b/sepolicy/private/file_contexts @@ -3,7 +3,7 @@ /system/bin/hw/vendor\.lineage\.camera\.motor@1.0-service\.realme_sdm710 u:object_r:hal_lineage_camera_motor_realme_sdm710_exec:s0 # Audio -/system/etc/audio_policy_configuration.xml u:object_r:vendor_configs_file:s0 +/system/etc/audio_policy_configuration.xml u:object_r:system_configs_file:s0 # Files in rootfs /bt_firmware(/.*)? u:object_r:bt_firmware_file:s0 diff --git a/sepolicy/private/hal_light_sdm710.te b/sepolicy/private/hal_light_sdm710.te index dfcf946..e85d9b3 100644 --- a/sepolicy/private/hal_light_sdm710.te +++ b/sepolicy/private/hal_light_sdm710.te @@ -12,7 +12,7 @@ binder_call(hal_light_server, hal_light_client) add_hwservice(hal_light_server, hal_light_hwservice) allow hal_light_client hal_light_hwservice:hwservice_manager find; -type hal_light_sdm710_exec, exec_type, file_type; +type hal_light_sdm710_exec, system_file_type, exec_type, file_type; init_daemon_domain(hal_light_sdm710) allow hal_light_sdm710 { sysfs_graphics sysfs_white_led }:lnk_file read; diff --git a/sepolicy/private/init.te b/sepolicy/private/init.te index fcf7a8e..46cae15 100644 --- a/sepolicy/private/init.te +++ b/sepolicy/private/init.te @@ -2,4 +2,4 @@ allow init sysfs_graphics:file { open read setattr }; # Allow init to mount vendor configs -allow init vendor_configs_file:file mounton; +allow init { system_configs_file vendor_configs_file }:file mounton;