diff --git a/private/property_contexts b/private/property_contexts index 2e0b2dd3f33bb1a44789d3da45aac6600ca8a56b..340756033b4670649ef1e8a94073db9dbaac30cc 100644 --- a/private/property_contexts +++ b/private/property_contexts @@ -58,6 +58,7 @@ persist.service.bdroid. u:object_r:bluetooth_prop:s0 persist.security. u:object_r:system_prop:s0 persist.vendor.overlay. u:object_r:overlay_prop:s0 ro.boot.vendor.overlay. u:object_r:overlay_prop:s0 +ro.boottime. u:object_r:boottime_prop:s0 # Boolean property set by system server upon boot indicating # if device owner is provisioned. diff --git a/public/bootstat.te b/public/bootstat.te index 98b2565f70912cdb9d5edf247f526998d4b555a5..7fc589235fd8489bb857dad352b1f4aa3d2c892d 100644 --- a/public/bootstat.te +++ b/public/bootstat.te @@ -8,3 +8,6 @@ allow bootstat bootstat_data_file:file create_file_perms; # Read access to pseudo filesystems (for /proc/uptime). r_dir_file(bootstat, proc) + +# Collect metrics on boot time created by init +get_prop(bootstat, boottime_prop) diff --git a/public/property.te b/public/property.te index e64ebcd2ad25a9299a3ca003ecb1c5552d1b0923..731eee518daf1e041018711fc6219d484e598fd8 100644 --- a/public/property.te +++ b/public/property.te @@ -1,4 +1,5 @@ type audio_prop, property_type, core_property_type; +type boottime_prop, property_type; type bluetooth_prop, property_type, core_property_type; type config_prop, property_type, core_property_type; type cppreopt_prop, property_type, core_property_type; diff --git a/public/system_server.te b/public/system_server.te index f7f87f82a5d9ea175e2dde5c513457adf6a792e5..c0802e8d40af8c00b551c30afbbf337e9f04c49c 100644 --- a/public/system_server.te +++ b/public/system_server.te @@ -384,6 +384,9 @@ set_prop(system_server, ctl_bugreport_prop) # cppreopt property set_prop(system_server, cppreopt_prop) +# Collect metrics on boot time created by init +get_prop(system_server, boottime_prop) + # Create a socket for receiving info from wpa. allow system_server wpa_socket:dir rw_dir_perms; allow system_server system_wpa_socket:sock_file create_file_perms;