xref: /aosp_15_r20/system/sepolicy/prebuilts/api/33.0/public/file.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1# Filesystem types
2type labeledfs, fs_type;
3type pipefs, fs_type;
4type sockfs, fs_type;
5type rootfs, fs_type;
6type proc, fs_type, proc_type;
7type binderfs, fs_type;
8type binderfs_logs, fs_type;
9type binderfs_logs_proc, fs_type;
10type binderfs_features, fs_type;
11# Security-sensitive proc nodes that should not be writable to most.
12type proc_security, fs_type, proc_type;
13type proc_drop_caches, fs_type, proc_type;
14type proc_overcommit_memory, fs_type, proc_type;
15type proc_min_free_order_shift, fs_type, proc_type;
16type proc_kpageflags, fs_type, proc_type;
17type proc_watermark_boost_factor, fs_type, proc_type;
18# proc, sysfs, or other nodes that permit configuration of kernel usermodehelpers.
19type usermodehelper, fs_type, proc_type;
20type sysfs_usermodehelper, fs_type, sysfs_type;
21type proc_qtaguid_ctrl, fs_type, mlstrustedobject, proc_type;
22type proc_qtaguid_stat, fs_type, mlstrustedobject, proc_type;
23type proc_bluetooth_writable, fs_type, proc_type;
24type proc_abi, fs_type, proc_type;
25type proc_asound, fs_type, proc_type;
26type proc_bootconfig, fs_type, proc_type;
27type proc_bpf, fs_type, proc_type;
28type proc_buddyinfo, fs_type, proc_type;
29type proc_cmdline, fs_type, proc_type;
30type proc_cpu_alignment, fs_type, proc_type;
31type proc_cpuinfo, fs_type, proc_type;
32type proc_dirty, fs_type, proc_type;
33type proc_diskstats, fs_type, proc_type;
34type proc_extra_free_kbytes, fs_type, proc_type;
35type proc_filesystems, fs_type, proc_type;
36type proc_fs_verity, fs_type, proc_type;
37type proc_hostname, fs_type, proc_type;
38type proc_hung_task, fs_type, proc_type;
39type proc_interrupts, fs_type, proc_type;
40type proc_iomem, fs_type, proc_type;
41type proc_kallsyms, fs_type, proc_type;
42type proc_keys, fs_type, proc_type;
43type proc_kmsg, fs_type, proc_type;
44type proc_loadavg, fs_type, proc_type;
45type proc_locks, fs_type, proc_type;
46type proc_lowmemorykiller, fs_type, proc_type;
47type proc_max_map_count, fs_type, proc_type;
48type proc_meminfo, fs_type, proc_type;
49type proc_misc, fs_type, proc_type;
50type proc_modules, fs_type, proc_type;
51type proc_mounts, fs_type, proc_type;
52type proc_net, fs_type, proc_type, proc_net_type;
53type proc_net_tcp_udp, fs_type, proc_type;
54type proc_page_cluster, fs_type, proc_type;
55type proc_pagetypeinfo, fs_type, proc_type;
56type proc_panic, fs_type, proc_type;
57type proc_perf, fs_type, proc_type;
58type proc_pid_max, fs_type, proc_type;
59type proc_pipe_conf, fs_type, proc_type;
60type proc_pressure_cpu, fs_type, proc_type;
61type proc_pressure_io, fs_type, proc_type;
62type proc_pressure_mem, fs_type, proc_type;
63type proc_random, fs_type, proc_type;
64type proc_sched, fs_type, proc_type;
65type proc_slabinfo, fs_type, proc_type;
66type proc_stat, fs_type, proc_type;
67type proc_swaps, fs_type, proc_type;
68type proc_sysrq, fs_type, proc_type;
69type proc_timer, fs_type, proc_type;
70type proc_tty_drivers, fs_type, proc_type;
71type proc_uid_cputime_showstat, fs_type, proc_type;
72type proc_uid_cputime_removeuid, fs_type, proc_type;
73type proc_uid_io_stats, fs_type, proc_type;
74type proc_uid_procstat_set, fs_type, proc_type;
75type proc_uid_time_in_state, fs_type, proc_type;
76type proc_uid_concurrent_active_time, fs_type, proc_type;
77type proc_uid_concurrent_policy_time, fs_type, proc_type;
78type proc_uid_cpupower, fs_type, proc_type;
79type proc_uptime, fs_type, proc_type;
80type proc_version, fs_type, proc_type;
81type proc_vmallocinfo, fs_type, proc_type;
82type proc_vmstat, fs_type, proc_type;
83type proc_watermark_scale_factor, fs_type, proc_type;
84type proc_zoneinfo, fs_type, proc_type;
85type proc_vendor_sched, proc_type, fs_type;
86type selinuxfs, fs_type, mlstrustedobject;
87type fusectlfs, fs_type;
88type cgroup, fs_type, mlstrustedobject;
89type cgroup_v2, fs_type;
90type sysfs, fs_type, sysfs_type, mlstrustedobject;
91type sysfs_android_usb, fs_type, sysfs_type;
92type sysfs_uio, sysfs_type, fs_type;
93type sysfs_batteryinfo, fs_type, sysfs_type;
94type sysfs_bluetooth_writable, fs_type, sysfs_type, mlstrustedobject;
95type sysfs_devfreq_cur, fs_type, sysfs_type;
96type sysfs_devfreq_dir, fs_type, sysfs_type;
97type sysfs_devices_block, fs_type, sysfs_type;
98type sysfs_dm, fs_type, sysfs_type;
99type sysfs_dm_verity, fs_type, sysfs_type;
100type sysfs_dma_heap, fs_type, sysfs_type;
101type sysfs_dmabuf_stats, fs_type, sysfs_type;
102type sysfs_dt_firmware_android, fs_type, sysfs_type;
103type sysfs_extcon, fs_type, sysfs_type;
104type sysfs_ion, fs_type, sysfs_type;
105type sysfs_ipv4, fs_type, sysfs_type;
106type sysfs_kernel_notes, fs_type, sysfs_type, mlstrustedobject;
107type sysfs_leds, fs_type, sysfs_type;
108type sysfs_loop, fs_type, sysfs_type;
109type sysfs_gpu, fs_type, sysfs_type;
110type sysfs_hwrandom, fs_type, sysfs_type;
111type sysfs_nfc_power_writable, fs_type, sysfs_type, mlstrustedobject;
112type sysfs_wake_lock, fs_type, sysfs_type;
113type sysfs_net, fs_type, sysfs_type;
114type sysfs_power, fs_type, sysfs_type;
115type sysfs_rtc, fs_type, sysfs_type;
116type sysfs_suspend_stats, fs_type, sysfs_type;
117type sysfs_switch, fs_type, sysfs_type;
118type sysfs_transparent_hugepage, fs_type, sysfs_type;
119type sysfs_lru_gen_enabled, fs_type, sysfs_type;
120type sysfs_usb, fs_type, sysfs_type;
121type sysfs_wakeup, fs_type, sysfs_type;
122type sysfs_wakeup_reasons, fs_type, sysfs_type;
123type sysfs_fs_ext4_features, sysfs_type, fs_type;
124type sysfs_fs_f2fs, sysfs_type, fs_type;
125type sysfs_fs_fuse_bpf, sysfs_type, fs_type;
126type sysfs_fs_incfs_features, sysfs_type, fs_type;
127type sysfs_fs_incfs_metrics, sysfs_type, fs_type;
128type sysfs_vendor_sched, sysfs_type, fs_type;
129userdebug_or_eng(`
130    typeattribute sysfs_vendor_sched mlstrustedobject;
131')
132type fs_bpf, fs_type, bpffs_type;
133# TODO: S+ fs_bpf_tethering (used by mainline) should be private
134type fs_bpf_tethering, fs_type, bpffs_type;
135type fs_bpf_vendor, fs_type, bpffs_type;
136type configfs, fs_type;
137# /sys/devices/cs_etm
138type sysfs_devices_cs_etm, fs_type, sysfs_type;
139# /sys/devices/system/cpu
140type sysfs_devices_system_cpu, fs_type, sysfs_type;
141# /sys/module/lowmemorykiller
142type sysfs_lowmemorykiller, fs_type, sysfs_type;
143# /sys/module/wlan/parameters/fwpath
144type sysfs_wlan_fwpath, fs_type, sysfs_type;
145type sysfs_vibrator, fs_type, sysfs_type;
146type sysfs_uhid, fs_type, sysfs_type;
147type sysfs_thermal, sysfs_type, fs_type;
148
149type sysfs_zram, fs_type, sysfs_type;
150type sysfs_zram_uevent, fs_type, sysfs_type;
151type inotify, fs_type, mlstrustedobject;
152type devpts, fs_type, mlstrustedobject;
153type tmpfs, fs_type;
154type shm, fs_type;
155type mqueue, fs_type;
156type fuse, fusefs_type, fs_type, mlstrustedobject;
157type sdcardfs, sdcard_type, fs_type, mlstrustedobject;
158type vfat, sdcard_type, fs_type, mlstrustedobject;
159type exfat, sdcard_type, fs_type, mlstrustedobject;
160type debugfs, fs_type, debugfs_type;
161type debugfs_kprobes, fs_type, debugfs_type;
162type debugfs_mmc, fs_type, debugfs_type;
163type debugfs_mm_events_tracing, fs_type, debugfs_type, tracefs_type;
164type debugfs_trace_marker, fs_type, debugfs_type, mlstrustedobject, tracefs_type;
165type debugfs_tracing, fs_type, debugfs_type, mlstrustedobject, tracefs_type;
166type debugfs_tracing_debug, fs_type, debugfs_type, mlstrustedobject, tracefs_type;
167type debugfs_tracing_instances, fs_type, debugfs_type, tracefs_type;
168type debugfs_tracing_printk_formats, fs_type, debugfs_type, tracefs_type;
169type debugfs_wakeup_sources, fs_type, debugfs_type;
170type debugfs_wifi_tracing, fs_type, debugfs_type, tracefs_type;
171type securityfs, fs_type;
172
173type pstorefs, fs_type;
174type functionfs, fs_type, mlstrustedobject;
175type oemfs, fs_type, contextmount_type;
176type usbfs, fs_type;
177type binfmt_miscfs, fs_type;
178type app_fusefs, fs_type, fusefs_type, contextmount_type;
179
180# File types
181type unlabeled, file_type;
182
183# Default type for anything under /system.
184type system_file, system_file_type, file_type;
185# Default type for /system/asan.options
186type system_asan_options_file, system_file_type, file_type;
187# Type for /system/etc/event-log-tags (liblog implementation detail)
188type system_event_log_tags_file, system_file_type, file_type;
189# Default type for anything under /system/lib[64].
190type system_lib_file, system_file_type, file_type;
191# system libraries that are available only to bootstrap processes
192type system_bootstrap_lib_file, system_file_type, file_type;
193# Default type for the group file /system/etc/group.
194type system_group_file, system_file_type, file_type;
195# Default type for linker executable /system/bin/linker[64].
196type system_linker_exec, system_file_type, file_type;
197# Default type for linker config /system/etc/ld.config.*.
198type system_linker_config_file, system_file_type, file_type;
199# Default type for the passwd file /system/etc/passwd.
200type system_passwd_file, system_file_type, file_type;
201# Default type for linker config /system/etc/seccomp_policy/*.
202type system_seccomp_policy_file, system_file_type, file_type;
203# Default type for cacerts in /system/etc/security/cacerts/*.
204type system_security_cacerts_file, system_file_type, file_type;
205# Default type for /system/bin/tcpdump.
206type tcpdump_exec, system_file_type, exec_type, file_type;
207# Default type for zoneinfo files in /system/usr/share/zoneinfo/*.
208type system_zoneinfo_file, system_file_type, file_type;
209# Cgroups description file under /system/etc/cgroups.json
210type cgroup_desc_file, system_file_type, file_type;
211# Cgroups description file under /system/etc/task_profiles/cgroups_*.json
212type cgroup_desc_api_file, system_file_type, file_type;
213# Vendor cgroups description file under /vendor/etc/cgroups.json
214type vendor_cgroup_desc_file, vendor_file_type, file_type;
215# Task profiles file under /system/etc/task_profiles.json
216type task_profiles_file, system_file_type, file_type;
217# Task profiles file under /system/etc/task_profiles/task_profiles_*.json
218type task_profiles_api_file, system_file_type, file_type;
219# Vendor task profiles file under /vendor/etc/task_profiles.json
220type vendor_task_profiles_file, vendor_file_type, file_type;
221# Type for /system/apex/com.android.art
222type art_apex_dir, system_file_type, file_type;
223# /linkerconfig(/.*)?
224type linkerconfig_file, file_type;
225# Control files under /data/incremental
226type incremental_control_file, file_type, data_file_type, core_data_file_type;
227
228# Default type for directories search for
229# HAL implementations
230type vendor_hal_file, vendor_file_type, file_type;
231# Default type for under /vendor or /system/vendor
232type vendor_file, vendor_file_type, file_type;
233# Default type for everything in /vendor/app
234type vendor_app_file, vendor_file_type, file_type;
235# Default type for everything under /vendor/etc/
236type vendor_configs_file, vendor_file_type, file_type;
237# Default type for all *same process* HALs and their lib/bin dependencies.
238# e.g. libEGL_xxx.so, [email protected]
239type same_process_hal_file, vendor_file_type, file_type;
240# Default type for vndk-sp libs. /vendor/lib/vndk-sp
241type vndk_sp_file, vendor_file_type, file_type;
242# Default type for everything in /vendor/framework
243type vendor_framework_file, vendor_file_type, file_type;
244# Default type for everything in /vendor/overlay
245type vendor_overlay_file, vendor_file_type, file_type;
246# Type for all vendor public libraries. These libs should only be exposed to
247# apps. ABI stability of these libs is vendor's responsibility.
248type vendor_public_lib_file, vendor_file_type, file_type;
249# Type for all vendor public libraries for system. These libs should only be exposed to
250# system. ABI stability of these libs is vendor's responsibility.
251type vendor_public_framework_file, vendor_file_type, file_type;
252
253# Input configuration
254type vendor_keylayout_file, vendor_file_type, file_type;
255type vendor_keychars_file, vendor_file_type, file_type;
256type vendor_idc_file, vendor_file_type, file_type;
257
258# Type for vendor uuid mapping config file
259type vendor_uuid_mapping_config_file, vendor_file_type, file_type;
260
261# SoC-specific virtual machine disk files
262type vendor_vm_file, vendor_file_type, file_type;
263# SoC-specific virtual machine disk files that are mutable
264type vendor_vm_data_file, vendor_file_type, file_type;
265
266# /metadata partition itself
267type metadata_file, file_type;
268# Vold files within /metadata
269type vold_metadata_file, file_type;
270# GSI files within /metadata
271type gsi_metadata_file, gsi_metadata_file_type, file_type;
272# DSU (GSI) files within /metadata that are globally readable.
273type gsi_public_metadata_file, gsi_metadata_file_type, file_type;
274# system_server shares Weaver slot information in /metadata
275type password_slot_metadata_file, file_type;
276# APEX files within /metadata
277type apex_metadata_file, file_type;
278# libsnapshot files within /metadata
279type ota_metadata_file, file_type;
280# property files within /metadata/bootstat
281type metadata_bootstat_file, file_type;
282# userspace reboot files within /metadata/userspacereboot
283type userspace_reboot_metadata_file, file_type;
284# Staged install files within /metadata/staged-install
285type staged_install_file, file_type;
286# Metadata information within /metadata/watchdog
287type watchdog_metadata_file, file_type;
288
289# Type for /dev/cpu_variant:.*.
290type dev_cpu_variant, file_type;
291# Speedup access for trusted applications to the runtime event tags
292type runtime_event_log_tags_file, file_type;
293# Type for /system/bin/logcat.
294type logcat_exec, system_file_type, exec_type, file_type;
295# Speedup access to cgroup map file
296type cgroup_rc_file, file_type;
297# /cores for coredumps on userdebug / eng builds
298type coredump_file, file_type;
299# Type of /data itself
300type system_data_root_file, file_type, data_file_type, core_data_file_type;
301# Default type for anything under /data.
302type system_data_file, file_type, data_file_type, core_data_file_type;
303# Type for /data/system/packages.list.
304# TODO(b/129332765): Narrow down permissions to this.
305# Find out users of system_data_file that should be granted only this.
306type packages_list_file, file_type, data_file_type, core_data_file_type;
307type game_mode_intervention_list_file, file_type, data_file_type, core_data_file_type;
308# Default type for anything under /data/vendor{_ce,_de}.
309type vendor_data_file, file_type, data_file_type;
310# Unencrypted data
311type unencrypted_data_file, file_type, data_file_type, core_data_file_type;
312# installd-create files in /data/misc/installd such as layout_version
313type install_data_file, file_type, data_file_type, core_data_file_type;
314# /data/drm - DRM plugin data
315type drm_data_file, file_type, data_file_type, core_data_file_type;
316# /data/adb - adb debugging files
317type adb_data_file, file_type, data_file_type, core_data_file_type;
318# /data/anr - ANR traces
319type anr_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
320# /data/tombstones - core dumps
321type tombstone_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
322# /data/vendor/tombstones/wifi - vendor wifi dumps
323type tombstone_wifi_data_file, file_type, data_file_type;
324# /data/apex - APEX data files
325type apex_data_file, file_type, data_file_type, core_data_file_type;
326# /data/app - user-installed apps
327type apk_data_file, file_type, data_file_type, core_data_file_type;
328type apk_tmp_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
329# /data/app-private - forward-locked apps
330type apk_private_data_file, file_type, data_file_type, core_data_file_type;
331type apk_private_tmp_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
332# /data/dalvik-cache
333type dalvikcache_data_file, file_type, data_file_type, core_data_file_type;
334# /data/ota
335type ota_data_file, file_type, data_file_type, core_data_file_type;
336# /data/ota_package
337type ota_package_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
338# /data/misc/profiles
339type user_profile_root_file, file_type, data_file_type, core_data_file_type;
340type user_profile_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
341# /data/misc/profman
342type profman_dump_data_file, file_type, data_file_type, core_data_file_type;
343# /data/misc/prereboot
344type prereboot_data_file, file_type, data_file_type, core_data_file_type;
345# /data/resource-cache
346type resourcecache_data_file, file_type, data_file_type, core_data_file_type;
347# /data/local - writable by shell
348type shell_data_file, file_type, data_file_type, core_data_file_type, app_data_file_type, mlstrustedobject;
349# /data/property
350type property_data_file, file_type, data_file_type, core_data_file_type;
351# /data/bootchart
352type bootchart_data_file, file_type, data_file_type, core_data_file_type;
353# /data/system/dropbox
354type dropbox_data_file, file_type, data_file_type, core_data_file_type;
355# /data/system/heapdump
356type heapdump_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
357# /data/nativetest
358type nativetest_data_file, file_type, data_file_type, core_data_file_type;
359# /data/local/tests
360type shell_test_data_file, file_type, data_file_type, core_data_file_type;
361# /data/system_de/0/ringtones
362type ringtone_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
363# /data/preloads
364type preloads_data_file, file_type, data_file_type, core_data_file_type;
365# /data/preloads/media
366type preloads_media_file, file_type, data_file_type, core_data_file_type;
367# /data/misc/dhcp and /data/misc/dhcp-6.8.2
368type dhcp_data_file, file_type, data_file_type, core_data_file_type;
369# /data/server_configurable_flags
370type server_configurable_flags_data_file, file_type, data_file_type, core_data_file_type;
371# /data/app-staging
372type staging_data_file, file_type, data_file_type, core_data_file_type;
373# /vendor/apex
374type vendor_apex_file, vendor_file_type, file_type;
375
376# Mount locations managed by vold
377type mnt_media_rw_file, file_type;
378type mnt_user_file, file_type;
379type mnt_pass_through_file, file_type;
380type mnt_expand_file, file_type;
381type mnt_sdcard_file, file_type;
382type storage_file, file_type;
383
384# Label for storage dirs which are just mount stubs
385type mnt_media_rw_stub_file, file_type;
386type storage_stub_file, file_type;
387
388# Mount location for read-write vendor partitions.
389type mnt_vendor_file, file_type;
390
391# Mount location for read-write product partitions.
392type mnt_product_file, file_type;
393
394# Mount point used for APEX images
395type apex_mnt_dir, file_type;
396
397# /apex/apex-info-list.xml created by apexd
398type apex_info_file, file_type;
399
400# /postinstall: Mount point used by update_engine to run postinstall.
401type postinstall_mnt_dir, file_type;
402# Files inside the /postinstall mountpoint are all labeled as postinstall_file.
403type postinstall_file, file_type;
404# /postinstall/apex: Mount point used for APEX images within /postinstall.
405type postinstall_apex_mnt_dir, file_type;
406
407# /data_mirror: Contains mirror directory for storing all apps data.
408type mirror_data_file, file_type, core_data_file_type;
409
410# /data/misc subdirectories
411type adb_keys_file, file_type, data_file_type, core_data_file_type;
412type apex_system_server_data_file, file_type, data_file_type, core_data_file_type, apex_data_file_type;
413type apex_module_data_file, file_type, data_file_type, core_data_file_type;
414type apex_ota_reserved_file, file_type, data_file_type, core_data_file_type;
415type apex_rollback_data_file, file_type, data_file_type, core_data_file_type;
416type appcompat_data_file, file_type, data_file_type, core_data_file_type;
417type audio_data_file, file_type, data_file_type, core_data_file_type;
418type audioserver_data_file, file_type, data_file_type, core_data_file_type;
419type bluetooth_data_file, file_type, data_file_type, core_data_file_type, app_data_file_type;
420type bluetooth_logs_data_file, file_type, data_file_type, core_data_file_type;
421type bootstat_data_file, file_type, data_file_type, core_data_file_type;
422type boottrace_data_file, file_type, data_file_type, core_data_file_type;
423type camera_data_file, file_type, data_file_type, core_data_file_type;
424type credstore_data_file, file_type, data_file_type, core_data_file_type;
425type gatekeeper_data_file, file_type, data_file_type, core_data_file_type;
426type incident_data_file, file_type, data_file_type, core_data_file_type;
427type keychain_data_file, file_type, data_file_type, core_data_file_type;
428type keystore_data_file, file_type, data_file_type, core_data_file_type;
429type media_data_file, file_type, data_file_type, core_data_file_type;
430type media_rw_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
431type misc_user_data_file, file_type, data_file_type, core_data_file_type;
432type net_data_file, file_type, data_file_type, core_data_file_type;
433type network_watchlist_data_file, file_type, data_file_type, core_data_file_type;
434type nfc_data_file, file_type, data_file_type, core_data_file_type, app_data_file_type;
435type nfc_logs_data_file, file_type, data_file_type, core_data_file_type;
436type radio_data_file, file_type, data_file_type, core_data_file_type, app_data_file_type, mlstrustedobject;
437type recovery_data_file, file_type, data_file_type, core_data_file_type;
438type shared_relro_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
439type snapshotctl_log_data_file, file_type, data_file_type, core_data_file_type;
440type stats_data_file, file_type, data_file_type, core_data_file_type;
441type systemkeys_data_file, file_type, data_file_type, core_data_file_type;
442type textclassifier_data_file, file_type, data_file_type, core_data_file_type;
443type trace_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
444type vpn_data_file, file_type, data_file_type, core_data_file_type;
445type wifi_data_file, file_type, data_file_type, core_data_file_type;
446type zoneinfo_data_file, file_type, data_file_type, core_data_file_type;
447type vold_data_file, file_type, data_file_type, core_data_file_type;
448type iorapd_data_file, file_type, data_file_type, core_data_file_type;
449type tee_data_file, file_type, data_file_type;
450type update_engine_data_file, file_type, data_file_type, core_data_file_type;
451type update_engine_log_data_file, file_type, data_file_type, core_data_file_type;
452# /data/misc/trace for method traces on userdebug / eng builds
453type method_trace_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
454type gsi_data_file, file_type, data_file_type, core_data_file_type;
455type radio_core_data_file, file_type, data_file_type, core_data_file_type;
456
457# /data/data subdirectories - app sandboxes
458type app_data_file, file_type, data_file_type, core_data_file_type, app_data_file_type;
459# /data/data subdirectories - priv-app sandboxes
460type privapp_data_file, file_type, data_file_type, core_data_file_type, app_data_file_type;
461# /data/data subdirectory for system UID apps.
462type system_app_data_file, file_type, data_file_type, core_data_file_type, app_data_file_type, mlstrustedobject;
463# Compatibility with type name used in Android 4.3 and 4.4.
464# Default type for anything under /cache
465type cache_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
466# Type for /cache/overlay /mnt/scratch/overlay
467type overlayfs_file, file_type, data_file_type, core_data_file_type;
468# Type for /cache/backup_stage/* (fd interchange with apps)
469type cache_backup_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
470# type for anything under /cache/backup (local transport storage)
471type cache_private_backup_file, file_type, data_file_type, core_data_file_type;
472# Type for anything under /cache/recovery
473type cache_recovery_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
474# Default type for anything under /efs
475type efs_file, file_type;
476# Type for wallpaper file.
477type wallpaper_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
478# Type for shortcut manager icon file.
479type shortcut_manager_icons, file_type, data_file_type, core_data_file_type, mlstrustedobject;
480# Type for user icon file.
481type icon_file, file_type, data_file_type, core_data_file_type;
482# /mnt/asec
483type asec_apk_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
484# Elements of asec files (/mnt/asec) that are world readable
485type asec_public_file, file_type, data_file_type, core_data_file_type;
486# /data/app-asec
487type asec_image_file, file_type, data_file_type, core_data_file_type;
488# /data/backup and /data/secure/backup
489type backup_data_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
490# All devices have bluetooth efs files. But they
491# vary per device, so this type is used in per
492# device policy
493type bluetooth_efs_file, file_type;
494# Type for fingerprint template file
495type fingerprintd_data_file, file_type, data_file_type, core_data_file_type;
496# Type for _new_ fingerprint template file
497type fingerprint_vendor_data_file, file_type, data_file_type;
498# Type for appfuse file.
499type app_fuse_file, file_type, data_file_type, core_data_file_type, mlstrustedobject;
500# Type for face template file
501type face_vendor_data_file, file_type, data_file_type;
502# Type for iris template file
503type iris_vendor_data_file, file_type, data_file_type;
504
505# Socket types
506type adbd_socket, file_type, coredomain_socket;
507type bluetooth_socket, file_type, data_file_type, core_data_file_type, coredomain_socket;
508type dnsproxyd_socket, file_type, coredomain_socket, mlstrustedobject;
509type dumpstate_socket, file_type, coredomain_socket;
510type fwmarkd_socket, file_type, coredomain_socket, mlstrustedobject;
511type lmkd_socket, file_type, coredomain_socket;
512type logd_socket, file_type, coredomain_socket, mlstrustedobject;
513type logdr_socket, file_type, coredomain_socket, mlstrustedobject;
514type logdw_socket, file_type, coredomain_socket, mlstrustedobject;
515type mdns_socket, file_type, coredomain_socket;
516type mdnsd_socket, file_type, coredomain_socket, mlstrustedobject;
517type misc_logd_file, coredomain_socket, file_type, data_file_type, core_data_file_type;
518type mtpd_socket, file_type, coredomain_socket;
519type property_socket, file_type, coredomain_socket, mlstrustedobject;
520type racoon_socket, file_type, coredomain_socket;
521type recovery_socket, file_type, coredomain_socket;
522type rild_socket, file_type;
523type rild_debug_socket, file_type;
524type snapuserd_socket, file_type, coredomain_socket;
525type snapuserd_proxy_socket, file_type, coredomain_socket;
526type statsdw_socket, file_type, coredomain_socket, mlstrustedobject;
527type system_wpa_socket, file_type, data_file_type, core_data_file_type, coredomain_socket;
528type system_ndebug_socket, file_type, data_file_type, core_data_file_type, coredomain_socket, mlstrustedobject;
529type system_unsolzygote_socket, file_type, data_file_type, core_data_file_type, coredomain_socket, mlstrustedobject;
530type tombstoned_crash_socket, file_type, coredomain_socket, mlstrustedobject;
531type tombstoned_java_trace_socket, file_type, mlstrustedobject;
532type tombstoned_intercept_socket, file_type, coredomain_socket;
533type traced_consumer_socket, file_type, coredomain_socket, mlstrustedobject;
534type traced_perf_socket, file_type, coredomain_socket, mlstrustedobject;
535type traced_producer_socket, file_type, coredomain_socket, mlstrustedobject;
536type uncrypt_socket, file_type, coredomain_socket;
537type wpa_socket, file_type, data_file_type, core_data_file_type;
538type zygote_socket, file_type, coredomain_socket;
539type heapprofd_socket, file_type, coredomain_socket, mlstrustedobject;
540# UART (for GPS) control proc file
541type gps_control, file_type;
542
543# PDX endpoint types
544type pdx_display_dir, pdx_endpoint_dir_type, file_type;
545type pdx_performance_dir, pdx_endpoint_dir_type, file_type;
546type pdx_bufferhub_dir, pdx_endpoint_dir_type, file_type;
547
548pdx_service_socket_types(display_client, pdx_display_dir)
549pdx_service_socket_types(display_manager, pdx_display_dir)
550pdx_service_socket_types(display_screenshot, pdx_display_dir)
551pdx_service_socket_types(display_vsync, pdx_display_dir)
552pdx_service_socket_types(performance_client, pdx_performance_dir)
553pdx_service_socket_types(bufferhub_client, pdx_bufferhub_dir)
554
555# file_contexts files
556type file_contexts_file, system_file_type, file_type;
557
558# mac_permissions file
559type mac_perms_file, system_file_type, file_type;
560
561# property_contexts file
562type property_contexts_file, system_file_type, file_type;
563
564# seapp_contexts file
565type seapp_contexts_file, system_file_type, file_type;
566
567# sepolicy files binary and others
568type sepolicy_file, system_file_type, file_type;
569
570# service_contexts file
571type service_contexts_file, system_file_type, file_type;
572
573# keystore2_key_contexts_file
574type keystore2_key_contexts_file, system_file_type, file_type;
575
576# vendor service_contexts file
577type vendor_service_contexts_file, vendor_file_type, file_type;
578
579# hwservice_contexts file
580type hwservice_contexts_file, system_file_type, file_type;
581
582# vndservice_contexts file
583type vndservice_contexts_file, file_type;
584
585# /sys/kernel/tracing/instances/bootreceiver for monitoring kernel memory corruptions.
586type debugfs_bootreceiver_tracing, fs_type, debugfs_type, tracefs_type;
587
588# kernel modules
589type vendor_kernel_modules, vendor_file_type, file_type;
590
591# system_dlkm
592type system_dlkm_file, system_dlkm_file_type, file_type;
593
594# Allow files to be created in their appropriate filesystems.
595allow fs_type self:filesystem associate;
596allow cgroup tmpfs:filesystem associate;
597allow cgroup_v2 tmpfs:filesystem associate;
598allow cgroup_rc_file tmpfs:filesystem associate;
599allow sysfs_type sysfs:filesystem associate;
600allow debugfs_type { debugfs debugfs_tracing debugfs_tracing_debug }:filesystem associate;
601allow file_type labeledfs:filesystem associate;
602allow file_type tmpfs:filesystem associate;
603allow file_type rootfs:filesystem associate;
604allow dev_type tmpfs:filesystem associate;
605allow app_fuse_file app_fusefs:filesystem associate;
606allow postinstall_file self:filesystem associate;
607allow proc_net proc:filesystem associate;
608
609# asanwrapper (run a sanitized app_process, to be used with wrap properties)
610with_asan(`type asanwrapper_exec, exec_type, file_type;')
611
612# Deprecated in SDK version 28
613type audiohal_data_file, file_type, data_file_type, core_data_file_type;
614
615# It's a bug to assign the file_type attribute and fs_type attribute
616# to any type. Do not allow it.
617#
618# For example, the following is a bug:
619#   type apk_data_file, file_type, data_file_type, fs_type;
620# Should be:
621#   type apk_data_file, file_type, data_file_type;
622neverallow fs_type file_type:filesystem associate;
623