zenfone8: Fix hal_health_default get system.prop
W health@2.1-serv: type=1400 audit(0.0:235): avc: denied { read } for name="u:object_r:system_prop:s0" dev="tmpfs" ino=12780 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:system_prop:s0 tclass=file permissive=0
W libc : Access denied finding property "sys.health.healthloop.disable"
Change-Id: I30682a16c816af75d7fb682c8c14883388123ef4
diff --git a/BoardConfig.mk b/BoardConfig.mk
index cbdc48d..0c716ac 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -89,6 +89,7 @@
BUILD_BROKEN_DUP_RULES := true
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
BUILD_BROKEN_ENFORCE_SYSPROP_OWNER := true
+BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE := true
# charger
BOARD_CHARGER_DISABLE_INIT_BLANK := true
diff --git a/sepolicy/vendor/hal_health_default.te b/sepolicy/vendor/hal_health_default.te
new file mode 100644
index 0000000..285951b
--- /dev/null
+++ b/sepolicy/vendor/hal_health_default.te
@@ -0,0 +1 @@
+get_prop(hal_health_default, vendor_health_prop)
diff --git a/sepolicy/vendor/property.te b/sepolicy/vendor/property.te
index c222034..9250d49 100644
--- a/sepolicy/vendor/property.te
+++ b/sepolicy/vendor/property.te
@@ -10,6 +10,9 @@
# GPS
vendor_internal_prop(vendor_gps_prop)
+# Health
+system_vendor_config_prop(vendor_health_prop)
+
# NFC
vendor_internal_prop(vendor_nfc_prop)
diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts
index 4136aae..c8033bb 100644
--- a/sepolicy/vendor/property_contexts
+++ b/sepolicy/vendor/property_contexts
@@ -32,6 +32,9 @@
persist.vendor.asus.gps. u:object_r:vendor_gps_prop:s0
vendor.gps. u:object_r:vendor_gps_prop:s0
+# Health
+sys.health.healthloop.disable u:object_r:vendor_health_prop:s0
+
# NFC
persist.vendor.nfc. u:object_r:vendor_nfc_prop:s0