sepolicy: Allow mediacodec to read some props
W omx@1.0-service: type=1400 audit(0.0:117): avc: denied { open } for path="/dev/__properties__/u:object_r:default_prop:s0" dev="tmpfs" ino=12368 scontext=u:r:mediacodec:s0 tcontext=u:object_r:default_prop:s0 tclass=file permissive=0
W libc : Access denied finding property "ro.mtk_deinterlace_support"
W libc : Access denied finding property "ro.mtk_crossmount_support"
W libc : Access denied finding property "mtk.vendor.omx.core.log"
Change-Id: I14cbe8a4e6a7892b0b34d05c86b68281291d6579
diff --git a/basic/non_plat/mediacodec.te b/basic/non_plat/mediacodec.te
index d8c78dc..5995cb1 100644
--- a/basic/non_plat/mediacodec.te
+++ b/basic/non_plat/mediacodec.te
@@ -144,3 +144,7 @@
# # Operation: SQC
# # Purpose : Allow medicodec to control video mode property
set_prop(mediacodec, vendor_mtk_video_prop)
+
+get_prop(mediacodec, vendor_mtk_crossmount_prop)
+get_prop(mediacodec, vendor_mtk_deinterlace_prop)
+get_prop(mediacodec, vendor_mtk_omx_core_prop)
diff --git a/basic/non_plat/property.te b/basic/non_plat/property.te
index 92335ba..46f530d 100644
--- a/basic/non_plat/property.te
+++ b/basic/non_plat/property.te
@@ -122,6 +122,9 @@
vendor_restricted_prop(vendor_mtk_mdrsra_v2_support_prop)
vendor_restricted_prop(vendor_mtk_xfrm_support_prop)
vendor_restricted_prop(vendor_debug_logger_prop)
+vendor_restricted_prop(vendor_mtk_crossmount_prop)
+vendor_restricted_prop(vendor_mtk_deinterlace_prop)
+vendor_restricted_prop(vendor_mtk_omx_core_prop)
# Properties with can be read by all domains
typeattribute vendor_mtk_aal_ro_prop mtk_core_property_type;
@@ -199,3 +202,6 @@
typeattribute vendor_mtk_mdrsra_v2_support_prop mtk_core_property_type;
typeattribute vendor_mtk_xfrm_support_prop mtk_core_property_type;
typeattribute vendor_debug_logger_prop mtk_core_property_type;
+typeattribute vendor_mtk_crossmount_prop mtk_core_property_type;
+typeattribute vendor_mtk_deinterlace_prop mtk_core_property_type;
+typeattribute vendor_mtk_omx_core_prop mtk_core_property_type;
diff --git a/basic/non_plat/property_contexts b/basic/non_plat/property_contexts
index 00a085d..c2c46e6 100644
--- a/basic/non_plat/property_contexts
+++ b/basic/non_plat/property_contexts
@@ -383,3 +383,7 @@
# xfrm and mdrsra property for non 5G GKI platform
persist.vendor.mdrsra_v2_support u:object_r:vendor_mtk_mdrsra_v2_support_prop:s0
persist.vendor.xfrm_support u:object_r:vendor_mtk_xfrm_support_prop:s0
+
+mtk.vendor.omx.core.log u:object_r:vendor_mtk_omx_core_prop:s0
+ro.mtk_crossmount_support u:object_r:vendor_mtk_crossmount_prop:s0
+ro.mtk_deinterlace_support u:object_r:vendor_mtk_deinterlace_prop:s0