diff --git a/logd.te b/logd.te index aa24c0531c1fcbc956bd7606e1160a38c8ea5801..95a30efa9b8af6845fcf82c3591d9ff8b57c5578 100644 --- a/logd.te +++ b/logd.te @@ -22,6 +22,10 @@ userdebug_or_eng(` allow logd pstorefs:dir search; allow logd pstorefs:file r_file_perms; +# Set persist.sys. and sys.powerctl +set_prop(logd, safemode_prop) +set_prop(logd, powerctl_prop) + # Access device logging gating property get_prop(logd, device_logging_prop) diff --git a/property.te b/property.te index c649a90130f2eda7b07de61143f0a37dbc4d570b..26d15ff40d75d98ac4b3128f0a0778e0f3585591 100644 --- a/property.te +++ b/property.te @@ -33,5 +33,6 @@ type nfc_prop, property_type, core_property_type; type dalvik_prop, property_type, core_property_type; type config_prop, property_type, core_property_type; type device_logging_prop, property_type; +type safemode_prop, property_type; allow property_type tmpfs:filesystem associate; diff --git a/property_contexts b/property_contexts index 9e936caa4d11a9472a6fea74a15d3e712796951a..fed44dfaffd3fb243049d17fe86368e81d38778b 100644 --- a/property_contexts +++ b/property_contexts @@ -43,6 +43,8 @@ persist.logd.security u:object_r:device_logging_prop:s0 persist.log.tag u:object_r:logd_prop:s0 persist.mmc. u:object_r:mmc_prop:s0 persist.sys. u:object_r:system_prop:s0 +persist.sys.safemode u:object_r:safemode_prop:s0 +persist.sys.audit_safemode u:object_r:safemode_prop:s0 persist.service. u:object_r:system_prop:s0 persist.service.bdroid. u:object_r:bluetooth_prop:s0 persist.security. u:object_r:system_prop:s0 diff --git a/system_server.te b/system_server.te index 2e131b34f8be86dd821d05add8971a50cd090674..1bbe9efb69cdfa567563b54b364df619ba618dbb 100644 --- a/system_server.te +++ b/system_server.te @@ -295,6 +295,7 @@ allow system_server system_data_file:dir relabelfrom; # Property Service write set_prop(system_server, system_prop) +set_prop(system_server, safemode_prop) set_prop(system_server, dhcp_prop) set_prop(system_server, net_radio_prop) set_prop(system_server, system_radio_prop)