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