1*e4a36f41SAndroid Build Coastguard Worker# Properties used only in /system 2*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(adbd_prop) 3*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(ctl_snapuserd_prop) 4*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_profcollect_native_boot_prop) 5*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_statsd_native_prop) 6*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_statsd_native_boot_prop) 7*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_storage_native_boot_prop) 8*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_sys_traced_prop) 9*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_window_manager_native_boot_prop) 10*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_configuration_prop) 11*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_connectivity_prop) 12*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(device_config_swcodec_native_prop) 13*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(fastbootd_protocol_prop) 14*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(gsid_prop) 15*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(init_perf_lsm_hooks_prop) 16*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(init_service_status_private_prop) 17*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(init_svc_debug_prop) 18*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(keystore_crash_prop) 19*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(keystore_listen_prop) 20*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(last_boot_reason_prop) 21*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(localization_prop) 22*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(lower_kptr_restrict_prop) 23*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(net_464xlat_fromvendor_prop) 24*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(net_connectivity_prop) 25*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(netd_stable_secret_prop) 26*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(odsign_prop) 27*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(perf_drop_caches_prop) 28*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(pm_prop) 29*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(profcollectd_node_id_prop) 30*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(radio_cdma_ecm_prop) 31*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(rollback_test_prop) 32*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(setupwizard_prop) 33*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(system_adbd_prop) 34*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(traced_perf_enabled_prop) 35*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(userspace_reboot_log_prop) 36*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(userspace_reboot_test_prop) 37*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(verity_status_prop) 38*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(zygote_wrap_prop) 39*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(ctl_mediatranscoding_prop) 40*e4a36f41SAndroid Build Coastguard Workersystem_internal_prop(ctl_odsign_prop) 41*e4a36f41SAndroid Build Coastguard Worker 42*e4a36f41SAndroid Build Coastguard Worker### 43*e4a36f41SAndroid Build Coastguard Worker### Neverallow rules 44*e4a36f41SAndroid Build Coastguard Worker### 45*e4a36f41SAndroid Build Coastguard Worker 46*e4a36f41SAndroid Build Coastguard Workertreble_sysprop_neverallow(` 47*e4a36f41SAndroid Build Coastguard Worker 48*e4a36f41SAndroid Build Coastguard Workerenforce_sysprop_owner(` 49*e4a36f41SAndroid Build Coastguard Worker neverallow domain { 50*e4a36f41SAndroid Build Coastguard Worker property_type 51*e4a36f41SAndroid Build Coastguard Worker -system_property_type 52*e4a36f41SAndroid Build Coastguard Worker -product_property_type 53*e4a36f41SAndroid Build Coastguard Worker -vendor_property_type 54*e4a36f41SAndroid Build Coastguard Worker }:file no_rw_file_perms; 55*e4a36f41SAndroid Build Coastguard Worker') 56*e4a36f41SAndroid Build Coastguard Worker 57*e4a36f41SAndroid Build Coastguard Workerneverallow { domain -coredomain } { 58*e4a36f41SAndroid Build Coastguard Worker system_property_type 59*e4a36f41SAndroid Build Coastguard Worker system_internal_property_type 60*e4a36f41SAndroid Build Coastguard Worker -system_restricted_property_type 61*e4a36f41SAndroid Build Coastguard Worker -system_public_property_type 62*e4a36f41SAndroid Build Coastguard Worker}:file no_rw_file_perms; 63*e4a36f41SAndroid Build Coastguard Worker 64*e4a36f41SAndroid Build Coastguard Workerneverallow { domain -coredomain } { 65*e4a36f41SAndroid Build Coastguard Worker system_property_type 66*e4a36f41SAndroid Build Coastguard Worker -system_public_property_type 67*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 68*e4a36f41SAndroid Build Coastguard Worker 69*e4a36f41SAndroid Build Coastguard Worker# init is in coredomain, but should be able to read/write all props. 70*e4a36f41SAndroid Build Coastguard Worker# dumpstate is also in coredomain, but should be able to read all props. 71*e4a36f41SAndroid Build Coastguard Workerneverallow { coredomain -init -dumpstate } { 72*e4a36f41SAndroid Build Coastguard Worker vendor_property_type 73*e4a36f41SAndroid Build Coastguard Worker vendor_internal_property_type 74*e4a36f41SAndroid Build Coastguard Worker -vendor_restricted_property_type 75*e4a36f41SAndroid Build Coastguard Worker -vendor_public_property_type 76*e4a36f41SAndroid Build Coastguard Worker}:file no_rw_file_perms; 77*e4a36f41SAndroid Build Coastguard Worker 78*e4a36f41SAndroid Build Coastguard Workerneverallow { coredomain -init } { 79*e4a36f41SAndroid Build Coastguard Worker vendor_property_type 80*e4a36f41SAndroid Build Coastguard Worker -vendor_public_property_type 81*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 82*e4a36f41SAndroid Build Coastguard Worker 83*e4a36f41SAndroid Build Coastguard Worker') 84*e4a36f41SAndroid Build Coastguard Worker 85*e4a36f41SAndroid Build Coastguard Worker# There is no need to perform ioctl or advisory locking operations on 86*e4a36f41SAndroid Build Coastguard Worker# property files. If this neverallow is being triggered, it is 87*e4a36f41SAndroid Build Coastguard Worker# likely that the policy is using r_file_perms directly instead of 88*e4a36f41SAndroid Build Coastguard Worker# the get_prop() macro. 89*e4a36f41SAndroid Build Coastguard Workerneverallow domain property_type:file { ioctl lock }; 90*e4a36f41SAndroid Build Coastguard Worker 91*e4a36f41SAndroid Build Coastguard Workerneverallow * { 92*e4a36f41SAndroid Build Coastguard Worker core_property_type 93*e4a36f41SAndroid Build Coastguard Worker -audio_prop 94*e4a36f41SAndroid Build Coastguard Worker -config_prop 95*e4a36f41SAndroid Build Coastguard Worker -cppreopt_prop 96*e4a36f41SAndroid Build Coastguard Worker -dalvik_prop 97*e4a36f41SAndroid Build Coastguard Worker -debuggerd_prop 98*e4a36f41SAndroid Build Coastguard Worker -debug_prop 99*e4a36f41SAndroid Build Coastguard Worker -dhcp_prop 100*e4a36f41SAndroid Build Coastguard Worker -dumpstate_prop 101*e4a36f41SAndroid Build Coastguard Worker -fingerprint_prop 102*e4a36f41SAndroid Build Coastguard Worker -logd_prop 103*e4a36f41SAndroid Build Coastguard Worker -net_radio_prop 104*e4a36f41SAndroid Build Coastguard Worker -nfc_prop 105*e4a36f41SAndroid Build Coastguard Worker -ota_prop 106*e4a36f41SAndroid Build Coastguard Worker -pan_result_prop 107*e4a36f41SAndroid Build Coastguard Worker -persist_debug_prop 108*e4a36f41SAndroid Build Coastguard Worker -powerctl_prop 109*e4a36f41SAndroid Build Coastguard Worker -radio_prop 110*e4a36f41SAndroid Build Coastguard Worker -restorecon_prop 111*e4a36f41SAndroid Build Coastguard Worker -shell_prop 112*e4a36f41SAndroid Build Coastguard Worker -system_prop 113*e4a36f41SAndroid Build Coastguard Worker -usb_prop 114*e4a36f41SAndroid Build Coastguard Worker -vold_prop 115*e4a36f41SAndroid Build Coastguard Worker}:file no_rw_file_perms; 116*e4a36f41SAndroid Build Coastguard Worker 117*e4a36f41SAndroid Build Coastguard Worker# sigstop property is only used for debugging; should only be set by su which is permissive 118*e4a36f41SAndroid Build Coastguard Worker# for userdebug/eng 119*e4a36f41SAndroid Build Coastguard Workerneverallow { 120*e4a36f41SAndroid Build Coastguard Worker domain 121*e4a36f41SAndroid Build Coastguard Worker -init 122*e4a36f41SAndroid Build Coastguard Worker -vendor_init 123*e4a36f41SAndroid Build Coastguard Worker} ctl_sigstop_prop:property_service set; 124*e4a36f41SAndroid Build Coastguard Worker 125*e4a36f41SAndroid Build Coastguard Worker# Don't audit legacy ctl. property handling. We only want the newer permission check to appear 126*e4a36f41SAndroid Build Coastguard Worker# in the audit log 127*e4a36f41SAndroid Build Coastguard Workerdontaudit domain { 128*e4a36f41SAndroid Build Coastguard Worker ctl_bootanim_prop 129*e4a36f41SAndroid Build Coastguard Worker ctl_bugreport_prop 130*e4a36f41SAndroid Build Coastguard Worker ctl_console_prop 131*e4a36f41SAndroid Build Coastguard Worker ctl_default_prop 132*e4a36f41SAndroid Build Coastguard Worker ctl_dumpstate_prop 133*e4a36f41SAndroid Build Coastguard Worker ctl_fuse_prop 134*e4a36f41SAndroid Build Coastguard Worker ctl_mdnsd_prop 135*e4a36f41SAndroid Build Coastguard Worker ctl_rildaemon_prop 136*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 137*e4a36f41SAndroid Build Coastguard Worker 138*e4a36f41SAndroid Build Coastguard Workerneverallow { 139*e4a36f41SAndroid Build Coastguard Worker domain 140*e4a36f41SAndroid Build Coastguard Worker -init 141*e4a36f41SAndroid Build Coastguard Worker} init_svc_debug_prop:property_service set; 142*e4a36f41SAndroid Build Coastguard Worker 143*e4a36f41SAndroid Build Coastguard Workerneverallow { 144*e4a36f41SAndroid Build Coastguard Worker domain 145*e4a36f41SAndroid Build Coastguard Worker -init 146*e4a36f41SAndroid Build Coastguard Worker -dumpstate 147*e4a36f41SAndroid Build Coastguard Worker userdebug_or_eng(`-su') 148*e4a36f41SAndroid Build Coastguard Worker} init_svc_debug_prop:file no_rw_file_perms; 149*e4a36f41SAndroid Build Coastguard Worker 150*e4a36f41SAndroid Build Coastguard Workercompatible_property_only(` 151*e4a36f41SAndroid Build Coastguard Worker# Prevent properties from being set 152*e4a36f41SAndroid Build Coastguard Worker neverallow { 153*e4a36f41SAndroid Build Coastguard Worker domain 154*e4a36f41SAndroid Build Coastguard Worker -coredomain 155*e4a36f41SAndroid Build Coastguard Worker -appdomain 156*e4a36f41SAndroid Build Coastguard Worker -vendor_init 157*e4a36f41SAndroid Build Coastguard Worker } { 158*e4a36f41SAndroid Build Coastguard Worker core_property_type 159*e4a36f41SAndroid Build Coastguard Worker extended_core_property_type 160*e4a36f41SAndroid Build Coastguard Worker exported_config_prop 161*e4a36f41SAndroid Build Coastguard Worker exported_default_prop 162*e4a36f41SAndroid Build Coastguard Worker exported_dumpstate_prop 163*e4a36f41SAndroid Build Coastguard Worker exported_system_prop 164*e4a36f41SAndroid Build Coastguard Worker exported3_system_prop 165*e4a36f41SAndroid Build Coastguard Worker usb_control_prop 166*e4a36f41SAndroid Build Coastguard Worker -nfc_prop 167*e4a36f41SAndroid Build Coastguard Worker -powerctl_prop 168*e4a36f41SAndroid Build Coastguard Worker -radio_prop 169*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 170*e4a36f41SAndroid Build Coastguard Worker 171*e4a36f41SAndroid Build Coastguard Worker neverallow { 172*e4a36f41SAndroid Build Coastguard Worker domain 173*e4a36f41SAndroid Build Coastguard Worker -coredomain 174*e4a36f41SAndroid Build Coastguard Worker -appdomain 175*e4a36f41SAndroid Build Coastguard Worker -hal_nfc_server 176*e4a36f41SAndroid Build Coastguard Worker } { 177*e4a36f41SAndroid Build Coastguard Worker nfc_prop 178*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 179*e4a36f41SAndroid Build Coastguard Worker 180*e4a36f41SAndroid Build Coastguard Worker neverallow { 181*e4a36f41SAndroid Build Coastguard Worker domain 182*e4a36f41SAndroid Build Coastguard Worker -coredomain 183*e4a36f41SAndroid Build Coastguard Worker -appdomain 184*e4a36f41SAndroid Build Coastguard Worker -hal_telephony_server 185*e4a36f41SAndroid Build Coastguard Worker -vendor_init 186*e4a36f41SAndroid Build Coastguard Worker } { 187*e4a36f41SAndroid Build Coastguard Worker radio_control_prop 188*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 189*e4a36f41SAndroid Build Coastguard Worker 190*e4a36f41SAndroid Build Coastguard Worker neverallow { 191*e4a36f41SAndroid Build Coastguard Worker domain 192*e4a36f41SAndroid Build Coastguard Worker -coredomain 193*e4a36f41SAndroid Build Coastguard Worker -appdomain 194*e4a36f41SAndroid Build Coastguard Worker -hal_telephony_server 195*e4a36f41SAndroid Build Coastguard Worker } { 196*e4a36f41SAndroid Build Coastguard Worker radio_prop 197*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 198*e4a36f41SAndroid Build Coastguard Worker 199*e4a36f41SAndroid Build Coastguard Worker neverallow { 200*e4a36f41SAndroid Build Coastguard Worker domain 201*e4a36f41SAndroid Build Coastguard Worker -coredomain 202*e4a36f41SAndroid Build Coastguard Worker -bluetooth 203*e4a36f41SAndroid Build Coastguard Worker -hal_bluetooth_server 204*e4a36f41SAndroid Build Coastguard Worker } { 205*e4a36f41SAndroid Build Coastguard Worker bluetooth_prop 206*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 207*e4a36f41SAndroid Build Coastguard Worker 208*e4a36f41SAndroid Build Coastguard Worker neverallow { 209*e4a36f41SAndroid Build Coastguard Worker domain 210*e4a36f41SAndroid Build Coastguard Worker -coredomain 211*e4a36f41SAndroid Build Coastguard Worker -bluetooth 212*e4a36f41SAndroid Build Coastguard Worker -hal_bluetooth_server 213*e4a36f41SAndroid Build Coastguard Worker -vendor_init 214*e4a36f41SAndroid Build Coastguard Worker } { 215*e4a36f41SAndroid Build Coastguard Worker exported_bluetooth_prop 216*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 217*e4a36f41SAndroid Build Coastguard Worker 218*e4a36f41SAndroid Build Coastguard Worker neverallow { 219*e4a36f41SAndroid Build Coastguard Worker domain 220*e4a36f41SAndroid Build Coastguard Worker -coredomain 221*e4a36f41SAndroid Build Coastguard Worker -hal_camera_server 222*e4a36f41SAndroid Build Coastguard Worker -cameraserver 223*e4a36f41SAndroid Build Coastguard Worker -vendor_init 224*e4a36f41SAndroid Build Coastguard Worker } { 225*e4a36f41SAndroid Build Coastguard Worker exported_camera_prop 226*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 227*e4a36f41SAndroid Build Coastguard Worker 228*e4a36f41SAndroid Build Coastguard Worker neverallow { 229*e4a36f41SAndroid Build Coastguard Worker domain 230*e4a36f41SAndroid Build Coastguard Worker -coredomain 231*e4a36f41SAndroid Build Coastguard Worker -hal_wifi_server 232*e4a36f41SAndroid Build Coastguard Worker -wificond 233*e4a36f41SAndroid Build Coastguard Worker } { 234*e4a36f41SAndroid Build Coastguard Worker wifi_prop 235*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 236*e4a36f41SAndroid Build Coastguard Worker 237*e4a36f41SAndroid Build Coastguard Worker neverallow { 238*e4a36f41SAndroid Build Coastguard Worker domain 239*e4a36f41SAndroid Build Coastguard Worker -init 240*e4a36f41SAndroid Build Coastguard Worker -dumpstate 241*e4a36f41SAndroid Build Coastguard Worker -hal_wifi_server 242*e4a36f41SAndroid Build Coastguard Worker -wificond 243*e4a36f41SAndroid Build Coastguard Worker -vendor_init 244*e4a36f41SAndroid Build Coastguard Worker } { 245*e4a36f41SAndroid Build Coastguard Worker wifi_hal_prop 246*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 247*e4a36f41SAndroid Build Coastguard Worker 248*e4a36f41SAndroid Build Coastguard Worker# Prevent properties from being read 249*e4a36f41SAndroid Build Coastguard Worker neverallow { 250*e4a36f41SAndroid Build Coastguard Worker domain 251*e4a36f41SAndroid Build Coastguard Worker -coredomain 252*e4a36f41SAndroid Build Coastguard Worker -appdomain 253*e4a36f41SAndroid Build Coastguard Worker -vendor_init 254*e4a36f41SAndroid Build Coastguard Worker } { 255*e4a36f41SAndroid Build Coastguard Worker core_property_type 256*e4a36f41SAndroid Build Coastguard Worker dalvik_config_prop 257*e4a36f41SAndroid Build Coastguard Worker extended_core_property_type 258*e4a36f41SAndroid Build Coastguard Worker exported3_system_prop 259*e4a36f41SAndroid Build Coastguard Worker systemsound_config_prop 260*e4a36f41SAndroid Build Coastguard Worker -debug_prop 261*e4a36f41SAndroid Build Coastguard Worker -logd_prop 262*e4a36f41SAndroid Build Coastguard Worker -nfc_prop 263*e4a36f41SAndroid Build Coastguard Worker -powerctl_prop 264*e4a36f41SAndroid Build Coastguard Worker -radio_prop 265*e4a36f41SAndroid Build Coastguard Worker }:file no_rw_file_perms; 266*e4a36f41SAndroid Build Coastguard Worker 267*e4a36f41SAndroid Build Coastguard Worker neverallow { 268*e4a36f41SAndroid Build Coastguard Worker domain 269*e4a36f41SAndroid Build Coastguard Worker -coredomain 270*e4a36f41SAndroid Build Coastguard Worker -appdomain 271*e4a36f41SAndroid Build Coastguard Worker -hal_nfc_server 272*e4a36f41SAndroid Build Coastguard Worker } { 273*e4a36f41SAndroid Build Coastguard Worker nfc_prop 274*e4a36f41SAndroid Build Coastguard Worker }:file no_rw_file_perms; 275*e4a36f41SAndroid Build Coastguard Worker 276*e4a36f41SAndroid Build Coastguard Worker neverallow { 277*e4a36f41SAndroid Build Coastguard Worker domain 278*e4a36f41SAndroid Build Coastguard Worker -coredomain 279*e4a36f41SAndroid Build Coastguard Worker -appdomain 280*e4a36f41SAndroid Build Coastguard Worker -hal_telephony_server 281*e4a36f41SAndroid Build Coastguard Worker } { 282*e4a36f41SAndroid Build Coastguard Worker radio_prop 283*e4a36f41SAndroid Build Coastguard Worker }:file no_rw_file_perms; 284*e4a36f41SAndroid Build Coastguard Worker 285*e4a36f41SAndroid Build Coastguard Worker neverallow { 286*e4a36f41SAndroid Build Coastguard Worker domain 287*e4a36f41SAndroid Build Coastguard Worker -coredomain 288*e4a36f41SAndroid Build Coastguard Worker -bluetooth 289*e4a36f41SAndroid Build Coastguard Worker -hal_bluetooth_server 290*e4a36f41SAndroid Build Coastguard Worker } { 291*e4a36f41SAndroid Build Coastguard Worker bluetooth_prop 292*e4a36f41SAndroid Build Coastguard Worker }:file no_rw_file_perms; 293*e4a36f41SAndroid Build Coastguard Worker 294*e4a36f41SAndroid Build Coastguard Worker neverallow { 295*e4a36f41SAndroid Build Coastguard Worker domain 296*e4a36f41SAndroid Build Coastguard Worker -coredomain 297*e4a36f41SAndroid Build Coastguard Worker -hal_wifi_server 298*e4a36f41SAndroid Build Coastguard Worker -wificond 299*e4a36f41SAndroid Build Coastguard Worker } { 300*e4a36f41SAndroid Build Coastguard Worker wifi_prop 301*e4a36f41SAndroid Build Coastguard Worker }:file no_rw_file_perms; 302*e4a36f41SAndroid Build Coastguard Worker 303*e4a36f41SAndroid Build Coastguard Worker neverallow { 304*e4a36f41SAndroid Build Coastguard Worker domain 305*e4a36f41SAndroid Build Coastguard Worker -coredomain 306*e4a36f41SAndroid Build Coastguard Worker -vendor_init 307*e4a36f41SAndroid Build Coastguard Worker } { 308*e4a36f41SAndroid Build Coastguard Worker suspend_prop 309*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 310*e4a36f41SAndroid Build Coastguard Worker') 311*e4a36f41SAndroid Build Coastguard Worker 312*e4a36f41SAndroid Build Coastguard Workercompatible_property_only(` 313*e4a36f41SAndroid Build Coastguard Worker # Neverallow coredomain to set vendor properties 314*e4a36f41SAndroid Build Coastguard Worker neverallow { 315*e4a36f41SAndroid Build Coastguard Worker coredomain 316*e4a36f41SAndroid Build Coastguard Worker -init 317*e4a36f41SAndroid Build Coastguard Worker -system_writes_vendor_properties_violators 318*e4a36f41SAndroid Build Coastguard Worker } { 319*e4a36f41SAndroid Build Coastguard Worker property_type 320*e4a36f41SAndroid Build Coastguard Worker -system_property_type 321*e4a36f41SAndroid Build Coastguard Worker -extended_core_property_type 322*e4a36f41SAndroid Build Coastguard Worker }:property_service set; 323*e4a36f41SAndroid Build Coastguard Worker') 324*e4a36f41SAndroid Build Coastguard Worker 325*e4a36f41SAndroid Build Coastguard Workerneverallow { 326*e4a36f41SAndroid Build Coastguard Worker domain 327*e4a36f41SAndroid Build Coastguard Worker -coredomain 328*e4a36f41SAndroid Build Coastguard Worker -vendor_init 329*e4a36f41SAndroid Build Coastguard Worker} { 330*e4a36f41SAndroid Build Coastguard Worker ffs_config_prop 331*e4a36f41SAndroid Build Coastguard Worker ffs_control_prop 332*e4a36f41SAndroid Build Coastguard Worker}:file no_rw_file_perms; 333*e4a36f41SAndroid Build Coastguard Worker 334*e4a36f41SAndroid Build Coastguard Workerneverallow { 335*e4a36f41SAndroid Build Coastguard Worker domain 336*e4a36f41SAndroid Build Coastguard Worker -init 337*e4a36f41SAndroid Build Coastguard Worker -system_server 338*e4a36f41SAndroid Build Coastguard Worker} { 339*e4a36f41SAndroid Build Coastguard Worker userspace_reboot_log_prop 340*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 341*e4a36f41SAndroid Build Coastguard Worker 342*e4a36f41SAndroid Build Coastguard Workerneverallow { 343*e4a36f41SAndroid Build Coastguard Worker # Only allow init and system_server to set system_adbd_prop 344*e4a36f41SAndroid Build Coastguard Worker domain 345*e4a36f41SAndroid Build Coastguard Worker -init 346*e4a36f41SAndroid Build Coastguard Worker -system_server 347*e4a36f41SAndroid Build Coastguard Worker} { 348*e4a36f41SAndroid Build Coastguard Worker system_adbd_prop 349*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 350*e4a36f41SAndroid Build Coastguard Worker 351*e4a36f41SAndroid Build Coastguard Worker# Let (vendor_)init, adbd, and system_server set service.adb.tcp.port 352*e4a36f41SAndroid Build Coastguard Workerneverallow { 353*e4a36f41SAndroid Build Coastguard Worker domain 354*e4a36f41SAndroid Build Coastguard Worker -init 355*e4a36f41SAndroid Build Coastguard Worker -vendor_init 356*e4a36f41SAndroid Build Coastguard Worker -adbd 357*e4a36f41SAndroid Build Coastguard Worker -system_server 358*e4a36f41SAndroid Build Coastguard Worker} { 359*e4a36f41SAndroid Build Coastguard Worker adbd_config_prop 360*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 361*e4a36f41SAndroid Build Coastguard Worker 362*e4a36f41SAndroid Build Coastguard Workerneverallow { 363*e4a36f41SAndroid Build Coastguard Worker # Only allow init and adbd to set adbd_prop 364*e4a36f41SAndroid Build Coastguard Worker domain 365*e4a36f41SAndroid Build Coastguard Worker -init 366*e4a36f41SAndroid Build Coastguard Worker -adbd 367*e4a36f41SAndroid Build Coastguard Worker} { 368*e4a36f41SAndroid Build Coastguard Worker adbd_prop 369*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 370*e4a36f41SAndroid Build Coastguard Worker 371*e4a36f41SAndroid Build Coastguard Workerneverallow { 372*e4a36f41SAndroid Build Coastguard Worker # Only allow init and shell to set userspace_reboot_test_prop 373*e4a36f41SAndroid Build Coastguard Worker domain 374*e4a36f41SAndroid Build Coastguard Worker -init 375*e4a36f41SAndroid Build Coastguard Worker -shell 376*e4a36f41SAndroid Build Coastguard Worker} { 377*e4a36f41SAndroid Build Coastguard Worker userspace_reboot_test_prop 378*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 379*e4a36f41SAndroid Build Coastguard Worker 380*e4a36f41SAndroid Build Coastguard Workerneverallow { 381*e4a36f41SAndroid Build Coastguard Worker domain 382*e4a36f41SAndroid Build Coastguard Worker -init 383*e4a36f41SAndroid Build Coastguard Worker -system_server 384*e4a36f41SAndroid Build Coastguard Worker -vendor_init 385*e4a36f41SAndroid Build Coastguard Worker} { 386*e4a36f41SAndroid Build Coastguard Worker surfaceflinger_color_prop 387*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 388*e4a36f41SAndroid Build Coastguard Worker 389*e4a36f41SAndroid Build Coastguard Workerneverallow { 390*e4a36f41SAndroid Build Coastguard Worker domain 391*e4a36f41SAndroid Build Coastguard Worker -init 392*e4a36f41SAndroid Build Coastguard Worker} { 393*e4a36f41SAndroid Build Coastguard Worker libc_debug_prop 394*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 395*e4a36f41SAndroid Build Coastguard Worker 396*e4a36f41SAndroid Build Coastguard Worker# Allow the shell to set MTE props, so that non-root users with adb shell 397*e4a36f41SAndroid Build Coastguard Worker# access can control the settings on their device. 398*e4a36f41SAndroid Build Coastguard Worker# Allow system apps to set MTE props, so Developer Options can set them. 399*e4a36f41SAndroid Build Coastguard Workerneverallow { 400*e4a36f41SAndroid Build Coastguard Worker domain 401*e4a36f41SAndroid Build Coastguard Worker -init 402*e4a36f41SAndroid Build Coastguard Worker -shell 403*e4a36f41SAndroid Build Coastguard Worker -system_app 404*e4a36f41SAndroid Build Coastguard Worker} { 405*e4a36f41SAndroid Build Coastguard Worker arm64_memtag_prop 406*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 407*e4a36f41SAndroid Build Coastguard Worker 408*e4a36f41SAndroid Build Coastguard Workerneverallow { 409*e4a36f41SAndroid Build Coastguard Worker domain 410*e4a36f41SAndroid Build Coastguard Worker -init 411*e4a36f41SAndroid Build Coastguard Worker -system_server 412*e4a36f41SAndroid Build Coastguard Worker -vendor_init 413*e4a36f41SAndroid Build Coastguard Worker} zram_control_prop:property_service set; 414*e4a36f41SAndroid Build Coastguard Worker 415*e4a36f41SAndroid Build Coastguard Workerneverallow { 416*e4a36f41SAndroid Build Coastguard Worker domain 417*e4a36f41SAndroid Build Coastguard Worker -init 418*e4a36f41SAndroid Build Coastguard Worker -system_server 419*e4a36f41SAndroid Build Coastguard Worker -vendor_init 420*e4a36f41SAndroid Build Coastguard Worker} dalvik_runtime_prop:property_service set; 421*e4a36f41SAndroid Build Coastguard Worker 422*e4a36f41SAndroid Build Coastguard Workerneverallow { 423*e4a36f41SAndroid Build Coastguard Worker domain 424*e4a36f41SAndroid Build Coastguard Worker -coredomain 425*e4a36f41SAndroid Build Coastguard Worker -vendor_init 426*e4a36f41SAndroid Build Coastguard Worker} { 427*e4a36f41SAndroid Build Coastguard Worker usb_config_prop 428*e4a36f41SAndroid Build Coastguard Worker usb_control_prop 429*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 430*e4a36f41SAndroid Build Coastguard Worker 431*e4a36f41SAndroid Build Coastguard Workerneverallow { 432*e4a36f41SAndroid Build Coastguard Worker domain 433*e4a36f41SAndroid Build Coastguard Worker -init 434*e4a36f41SAndroid Build Coastguard Worker -system_server 435*e4a36f41SAndroid Build Coastguard Worker} { 436*e4a36f41SAndroid Build Coastguard Worker provisioned_prop 437*e4a36f41SAndroid Build Coastguard Worker retaildemo_prop 438*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 439*e4a36f41SAndroid Build Coastguard Worker 440*e4a36f41SAndroid Build Coastguard Workerneverallow { 441*e4a36f41SAndroid Build Coastguard Worker domain 442*e4a36f41SAndroid Build Coastguard Worker -coredomain 443*e4a36f41SAndroid Build Coastguard Worker -vendor_init 444*e4a36f41SAndroid Build Coastguard Worker} { 445*e4a36f41SAndroid Build Coastguard Worker provisioned_prop 446*e4a36f41SAndroid Build Coastguard Worker retaildemo_prop 447*e4a36f41SAndroid Build Coastguard Worker}:file no_rw_file_perms; 448*e4a36f41SAndroid Build Coastguard Worker 449*e4a36f41SAndroid Build Coastguard Workerneverallow { 450*e4a36f41SAndroid Build Coastguard Worker domain 451*e4a36f41SAndroid Build Coastguard Worker -init 452*e4a36f41SAndroid Build Coastguard Worker} { 453*e4a36f41SAndroid Build Coastguard Worker init_service_status_private_prop 454*e4a36f41SAndroid Build Coastguard Worker init_service_status_prop 455*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 456*e4a36f41SAndroid Build Coastguard Worker 457*e4a36f41SAndroid Build Coastguard Workerneverallow { 458*e4a36f41SAndroid Build Coastguard Worker domain 459*e4a36f41SAndroid Build Coastguard Worker -init 460*e4a36f41SAndroid Build Coastguard Worker -radio 461*e4a36f41SAndroid Build Coastguard Worker -appdomain 462*e4a36f41SAndroid Build Coastguard Worker -hal_telephony_server 463*e4a36f41SAndroid Build Coastguard Worker not_compatible_property(`-vendor_init') 464*e4a36f41SAndroid Build Coastguard Worker} telephony_status_prop:property_service set; 465*e4a36f41SAndroid Build Coastguard Worker 466*e4a36f41SAndroid Build Coastguard Workerneverallow { 467*e4a36f41SAndroid Build Coastguard Worker domain 468*e4a36f41SAndroid Build Coastguard Worker -init 469*e4a36f41SAndroid Build Coastguard Worker -vendor_init 470*e4a36f41SAndroid Build Coastguard Worker} { 471*e4a36f41SAndroid Build Coastguard Worker graphics_config_prop 472*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 473*e4a36f41SAndroid Build Coastguard Worker 474*e4a36f41SAndroid Build Coastguard Workerneverallow { 475*e4a36f41SAndroid Build Coastguard Worker domain 476*e4a36f41SAndroid Build Coastguard Worker -init 477*e4a36f41SAndroid Build Coastguard Worker -surfaceflinger 478*e4a36f41SAndroid Build Coastguard Worker} { 479*e4a36f41SAndroid Build Coastguard Worker surfaceflinger_display_prop 480*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 481*e4a36f41SAndroid Build Coastguard Worker 482*e4a36f41SAndroid Build Coastguard Workerneverallow { 483*e4a36f41SAndroid Build Coastguard Worker domain 484*e4a36f41SAndroid Build Coastguard Worker -coredomain 485*e4a36f41SAndroid Build Coastguard Worker -appdomain 486*e4a36f41SAndroid Build Coastguard Worker -vendor_init 487*e4a36f41SAndroid Build Coastguard Worker} packagemanager_config_prop:file no_rw_file_perms; 488*e4a36f41SAndroid Build Coastguard Worker 489*e4a36f41SAndroid Build Coastguard Workerneverallow { 490*e4a36f41SAndroid Build Coastguard Worker domain 491*e4a36f41SAndroid Build Coastguard Worker -coredomain 492*e4a36f41SAndroid Build Coastguard Worker -vendor_init 493*e4a36f41SAndroid Build Coastguard Worker} keyguard_config_prop:file no_rw_file_perms; 494*e4a36f41SAndroid Build Coastguard Worker 495*e4a36f41SAndroid Build Coastguard Workerneverallow { 496*e4a36f41SAndroid Build Coastguard Worker domain 497*e4a36f41SAndroid Build Coastguard Worker -init 498*e4a36f41SAndroid Build Coastguard Worker} { 499*e4a36f41SAndroid Build Coastguard Worker localization_prop 500*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 501*e4a36f41SAndroid Build Coastguard Worker 502*e4a36f41SAndroid Build Coastguard Workerneverallow { 503*e4a36f41SAndroid Build Coastguard Worker domain 504*e4a36f41SAndroid Build Coastguard Worker -init 505*e4a36f41SAndroid Build Coastguard Worker -vendor_init 506*e4a36f41SAndroid Build Coastguard Worker -dumpstate 507*e4a36f41SAndroid Build Coastguard Worker -system_app 508*e4a36f41SAndroid Build Coastguard Worker} oem_unlock_prop:file no_rw_file_perms; 509*e4a36f41SAndroid Build Coastguard Worker 510*e4a36f41SAndroid Build Coastguard Workerneverallow { 511*e4a36f41SAndroid Build Coastguard Worker domain 512*e4a36f41SAndroid Build Coastguard Worker -coredomain 513*e4a36f41SAndroid Build Coastguard Worker -vendor_init 514*e4a36f41SAndroid Build Coastguard Worker} storagemanager_config_prop:file no_rw_file_perms; 515*e4a36f41SAndroid Build Coastguard Worker 516*e4a36f41SAndroid Build Coastguard Workerneverallow { 517*e4a36f41SAndroid Build Coastguard Worker domain 518*e4a36f41SAndroid Build Coastguard Worker -init 519*e4a36f41SAndroid Build Coastguard Worker -vendor_init 520*e4a36f41SAndroid Build Coastguard Worker -dumpstate 521*e4a36f41SAndroid Build Coastguard Worker -appdomain 522*e4a36f41SAndroid Build Coastguard Worker} sendbug_config_prop:file no_rw_file_perms; 523*e4a36f41SAndroid Build Coastguard Worker 524*e4a36f41SAndroid Build Coastguard Workerneverallow { 525*e4a36f41SAndroid Build Coastguard Worker domain 526*e4a36f41SAndroid Build Coastguard Worker -init 527*e4a36f41SAndroid Build Coastguard Worker -vendor_init 528*e4a36f41SAndroid Build Coastguard Worker -dumpstate 529*e4a36f41SAndroid Build Coastguard Worker -appdomain 530*e4a36f41SAndroid Build Coastguard Worker} camera_calibration_prop:file no_rw_file_perms; 531*e4a36f41SAndroid Build Coastguard Worker 532*e4a36f41SAndroid Build Coastguard Workerneverallow { 533*e4a36f41SAndroid Build Coastguard Worker domain 534*e4a36f41SAndroid Build Coastguard Worker -init 535*e4a36f41SAndroid Build Coastguard Worker -dumpstate 536*e4a36f41SAndroid Build Coastguard Worker -hal_dumpstate_server 537*e4a36f41SAndroid Build Coastguard Worker not_compatible_property(`-vendor_init') 538*e4a36f41SAndroid Build Coastguard Worker} hal_dumpstate_config_prop:file no_rw_file_perms; 539*e4a36f41SAndroid Build Coastguard Worker 540*e4a36f41SAndroid Build Coastguard Workerneverallow { 541*e4a36f41SAndroid Build Coastguard Worker domain 542*e4a36f41SAndroid Build Coastguard Worker -init 543*e4a36f41SAndroid Build Coastguard Worker userdebug_or_eng(`-profcollectd') 544*e4a36f41SAndroid Build Coastguard Worker userdebug_or_eng(`-traced_probes') 545*e4a36f41SAndroid Build Coastguard Worker userdebug_or_eng(`-traced_perf') 546*e4a36f41SAndroid Build Coastguard Worker} { 547*e4a36f41SAndroid Build Coastguard Worker lower_kptr_restrict_prop 548*e4a36f41SAndroid Build Coastguard Worker}:property_service set; 549*e4a36f41SAndroid Build Coastguard Worker 550*e4a36f41SAndroid Build Coastguard Workerneverallow { 551*e4a36f41SAndroid Build Coastguard Worker domain 552*e4a36f41SAndroid Build Coastguard Worker -init 553*e4a36f41SAndroid Build Coastguard Worker} zygote_wrap_prop:property_service set; 554*e4a36f41SAndroid Build Coastguard Worker 555*e4a36f41SAndroid Build Coastguard Workerneverallow { 556*e4a36f41SAndroid Build Coastguard Worker domain 557*e4a36f41SAndroid Build Coastguard Worker -init 558*e4a36f41SAndroid Build Coastguard Worker} verity_status_prop:property_service set; 559*e4a36f41SAndroid Build Coastguard Worker 560*e4a36f41SAndroid Build Coastguard Workerneverallow { 561*e4a36f41SAndroid Build Coastguard Worker domain 562*e4a36f41SAndroid Build Coastguard Worker -init 563*e4a36f41SAndroid Build Coastguard Worker} setupwizard_prop:property_service set; 564*e4a36f41SAndroid Build Coastguard Worker 565*e4a36f41SAndroid Build Coastguard Worker# ro.product.property_source_order is useless after initialization of ro.product.* props. 566*e4a36f41SAndroid Build Coastguard Worker# So making it accessible only from init and vendor_init. 567*e4a36f41SAndroid Build Coastguard Workerneverallow { 568*e4a36f41SAndroid Build Coastguard Worker domain 569*e4a36f41SAndroid Build Coastguard Worker -init 570*e4a36f41SAndroid Build Coastguard Worker -dumpstate 571*e4a36f41SAndroid Build Coastguard Worker -vendor_init 572*e4a36f41SAndroid Build Coastguard Worker} build_config_prop:file no_rw_file_perms; 573*e4a36f41SAndroid Build Coastguard Worker 574*e4a36f41SAndroid Build Coastguard Workerneverallow { 575*e4a36f41SAndroid Build Coastguard Worker domain 576*e4a36f41SAndroid Build Coastguard Worker -init 577*e4a36f41SAndroid Build Coastguard Worker -shell 578*e4a36f41SAndroid Build Coastguard Worker} sqlite_log_prop:property_service set; 579*e4a36f41SAndroid Build Coastguard Worker 580*e4a36f41SAndroid Build Coastguard Workerneverallow { 581*e4a36f41SAndroid Build Coastguard Worker domain 582*e4a36f41SAndroid Build Coastguard Worker -coredomain 583*e4a36f41SAndroid Build Coastguard Worker -appdomain 584*e4a36f41SAndroid Build Coastguard Worker} sqlite_log_prop:file no_rw_file_perms; 585*e4a36f41SAndroid Build Coastguard Worker 586*e4a36f41SAndroid Build Coastguard Workerneverallow { 587*e4a36f41SAndroid Build Coastguard Worker domain 588*e4a36f41SAndroid Build Coastguard Worker -init 589*e4a36f41SAndroid Build Coastguard Worker} default_prop:property_service set; 590*e4a36f41SAndroid Build Coastguard Worker 591*e4a36f41SAndroid Build Coastguard Worker# Only one of system_property_type and vendor_property_type can be assigned. 592*e4a36f41SAndroid Build Coastguard Worker# Property types having both attributes won't be accessible from anywhere. 593*e4a36f41SAndroid Build Coastguard Workerneverallow domain system_and_vendor_property_type:{file property_service} *; 594*e4a36f41SAndroid Build Coastguard Worker 595*e4a36f41SAndroid Build Coastguard Workerneverallow { 596*e4a36f41SAndroid Build Coastguard Worker # Only allow init and shell to set rollback_test_prop 597*e4a36f41SAndroid Build Coastguard Worker domain 598*e4a36f41SAndroid Build Coastguard Worker -init 599*e4a36f41SAndroid Build Coastguard Worker -shell 600*e4a36f41SAndroid Build Coastguard Worker} rollback_test_prop:property_service set; 601*e4a36f41SAndroid Build Coastguard Worker 602*e4a36f41SAndroid Build Coastguard Workerneverallow { 603*e4a36f41SAndroid Build Coastguard Worker # Only allow init and profcollectd to access profcollectd_node_id_prop 604*e4a36f41SAndroid Build Coastguard Worker domain 605*e4a36f41SAndroid Build Coastguard Worker -init 606*e4a36f41SAndroid Build Coastguard Worker -dumpstate 607*e4a36f41SAndroid Build Coastguard Worker -profcollectd 608*e4a36f41SAndroid Build Coastguard Worker} profcollectd_node_id_prop:file r_file_perms; 609*e4a36f41SAndroid Build Coastguard Worker 610