diff --git a/Android.bp b/Android.bp index 170e7ca89..e8bb2706d 100644 --- a/Android.bp +++ b/Android.bp @@ -255,6 +255,13 @@ property_contexts { recovery_available: true, } +property_contexts { + name: "system_ext_property_contexts", + srcs: [":property_contexts_files"], + system_ext_specific: true, + recovery_available: true, +} + property_contexts { name: "product_property_contexts", srcs: [":property_contexts_files"], diff --git a/Android.mk b/Android.mk index 5cb79be45..e57024721 100644 --- a/Android.mk +++ b/Android.mk @@ -318,6 +318,8 @@ LOCAL_REQUIRED_MODULES += \ system_ext_file_contexts_test \ system_ext_hwservice_contexts \ system_ext_hwservice_contexts_test \ + system_ext_property_contexts \ + system_ext_property_contexts_test \ system_ext_seapp_contexts \ system_ext_mapping_file \ diff --git a/contexts_tests.mk b/contexts_tests.mk index 0073e9cd5..0b7e8565b 100644 --- a/contexts_tests.mk +++ b/contexts_tests.mk @@ -163,6 +163,24 @@ $(eval $(call run_contexts_test, $(pc_files), $(property_info_checker),)) ################################## +ifdef HAS_SYSTEM_EXT_SEPOLICY + +pc_files += $(system_ext_out)/system_ext_property_contexts + +include $(CLEAR_VARS) + +LOCAL_MODULE := system_ext_property_contexts_test +LOCAL_MODULE_CLASS := FAKE +LOCAL_MODULE_TAGS := optional + +include $(BUILD_SYSTEM)/base_rules.mk + +$(eval $(call run_contexts_test, $(pc_files), $(property_info_checker),)) + +endif + +################################## + pc_files += $(vendor_out)/vendor_property_contexts include $(CLEAR_VARS) diff --git a/private/file_contexts b/private/file_contexts index 6fa1c5616..3d967a73d 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -424,6 +424,7 @@ /(system_ext|system/system_ext)/etc/selinux/system_ext_file_contexts u:object_r:file_contexts_file:s0 /(system_ext|system/system_ext)/etc/selinux/system_ext_hwservice_contexts u:object_r:hwservice_contexts_file:s0 +/(system_ext|system/system_ext)/etc/selinux/system_ext_property_contexts u:object_r:property_contexts_file:s0 /(system_ext|system/system_ext)/etc/selinux/system_ext_seapp_contexts u:object_r:seapp_contexts_file:s0 #############################