diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 47767c8..2f62c27 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -206,7 +206,6 @@ VENDOR_SECURITY_PATCH := 2020-11-01 # Sepolicy include device/qcom/sepolicy_vndr/SEPolicy.mk -BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/private BOARD_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor # Verified Boot diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts deleted file mode 100644 index 0d4843d..0000000 --- a/sepolicy/private/file_contexts +++ /dev/null @@ -1,2 +0,0 @@ -# tri-state-key -/system/bin/tri-state-key_daemon u:object_r:tri-state-key_daemon_exec:s0 diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 4477900..5cfb89a 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -1,7 +1,8 @@ # Binaries -/(vendor|system/vendor)/bin/dashd u:object_r:dashd_exec:s0 -/(vendor|system/vendor)/bin/opf-service u:object_r:opf_exec:s0 -/(vendor|system/vendor)/bin/wlchgd u:object_r:wlchgd_exec:s0 +/(vendor|system/vendor)/bin/dashd u:object_r:dashd_exec:s0 +/(vendor|system/vendor)/bin/opf-service u:object_r:opf_exec:s0 +/(vendor|system/vendor)/bin/tri-state-key_daemon u:object_r:tri-state-key_daemon_exec:s0 +/(vendor|system/vendor)/bin/wlchgd u:object_r:wlchgd_exec:s0 # Block devices /dev/block/platform/soc/1d84000.ufshc/by-name/config u:object_r:frp_block_device:s0 diff --git a/sepolicy/private/tri-state-key.te b/sepolicy/vendor/tri-state-key_daemon.te similarity index 64% rename from sepolicy/private/tri-state-key.te rename to sepolicy/vendor/tri-state-key_daemon.te index 726d53a..08fdb5d 100644 --- a/sepolicy/private/tri-state-key.te +++ b/sepolicy/vendor/tri-state-key_daemon.te @@ -1,5 +1,5 @@ -type tri-state-key_daemon, domain, coredomain; -type tri-state-key_daemon_exec, system_file_type, exec_type, file_type; +type tri-state-key_daemon, domain; +type tri-state-key_daemon_exec, vendor_file_type, exec_type, file_type; init_daemon_domain(tri-state-key_daemon) diff --git a/tri-state-key/Android.bp b/tri-state-key/Android.bp index 1416837..687199e 100644 --- a/tri-state-key/Android.bp +++ b/tri-state-key/Android.bp @@ -24,6 +24,7 @@ cc_binary { "-Wall", "-Werror", ], + vendor: true, shared_libs: [ "libbase", "liblog", diff --git a/tri-state-key/tri-state-key_daemon.rc b/tri-state-key/tri-state-key_daemon.rc index c8204d9..028d472 100644 --- a/tri-state-key/tri-state-key_daemon.rc +++ b/tri-state-key/tri-state-key_daemon.rc @@ -1,7 +1,7 @@ on fs start tri-state-key_daemon -service tri-state-key_daemon /system/bin/tri-state-key_daemon +service tri-state-key_daemon /vendor/bin/tri-state-key_daemon class late_start user system group system uhid