xref: /aosp_15_r20/system/sepolicy/prebuilts/api/30.0/public/device.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Worker# Device types
2*e4a36f41SAndroid Build Coastguard Workertype device, dev_type, fs_type;
3*e4a36f41SAndroid Build Coastguard Workertype ashmem_device, dev_type, mlstrustedobject;
4*e4a36f41SAndroid Build Coastguard Workertype ashmem_libcutils_device, dev_type, mlstrustedobject;
5*e4a36f41SAndroid Build Coastguard Workertype audio_device, dev_type;
6*e4a36f41SAndroid Build Coastguard Workertype binder_device, dev_type, mlstrustedobject;
7*e4a36f41SAndroid Build Coastguard Workertype hwbinder_device, dev_type, mlstrustedobject;
8*e4a36f41SAndroid Build Coastguard Workertype vndbinder_device, dev_type;
9*e4a36f41SAndroid Build Coastguard Workertype block_device, dev_type;
10*e4a36f41SAndroid Build Coastguard Workertype camera_device, dev_type;
11*e4a36f41SAndroid Build Coastguard Workertype dm_device, dev_type;
12*e4a36f41SAndroid Build Coastguard Workertype keychord_device, dev_type;
13*e4a36f41SAndroid Build Coastguard Workertype loop_control_device, dev_type;
14*e4a36f41SAndroid Build Coastguard Workertype loop_device, dev_type;
15*e4a36f41SAndroid Build Coastguard Workertype pmsg_device, dev_type, mlstrustedobject;
16*e4a36f41SAndroid Build Coastguard Workertype radio_device, dev_type;
17*e4a36f41SAndroid Build Coastguard Workertype ram_device, dev_type;
18*e4a36f41SAndroid Build Coastguard Workertype rtc_device, dev_type;
19*e4a36f41SAndroid Build Coastguard Workertype vold_device, dev_type;
20*e4a36f41SAndroid Build Coastguard Workertype console_device, dev_type;
21*e4a36f41SAndroid Build Coastguard Workertype fscklogs, dev_type;
22*e4a36f41SAndroid Build Coastguard Worker# GPU (used by most UI apps)
23*e4a36f41SAndroid Build Coastguard Workertype gpu_device, dev_type, mlstrustedobject;
24*e4a36f41SAndroid Build Coastguard Workertype graphics_device, dev_type;
25*e4a36f41SAndroid Build Coastguard Workertype hw_random_device, dev_type;
26*e4a36f41SAndroid Build Coastguard Workertype input_device, dev_type;
27*e4a36f41SAndroid Build Coastguard Workertype port_device, dev_type;
28*e4a36f41SAndroid Build Coastguard Workertype lowpan_device, dev_type;
29*e4a36f41SAndroid Build Coastguard Workertype mtp_device, dev_type, mlstrustedobject;
30*e4a36f41SAndroid Build Coastguard Workertype nfc_device, dev_type;
31*e4a36f41SAndroid Build Coastguard Workertype ptmx_device, dev_type, mlstrustedobject;
32*e4a36f41SAndroid Build Coastguard Workertype kmsg_device, dev_type;
33*e4a36f41SAndroid Build Coastguard Workertype kmsg_debug_device, dev_type;
34*e4a36f41SAndroid Build Coastguard Workertype null_device, dev_type, mlstrustedobject;
35*e4a36f41SAndroid Build Coastguard Workertype random_device, dev_type, mlstrustedobject;
36*e4a36f41SAndroid Build Coastguard Workertype secure_element_device, dev_type;
37*e4a36f41SAndroid Build Coastguard Workertype sensors_device, dev_type;
38*e4a36f41SAndroid Build Coastguard Workertype serial_device, dev_type;
39*e4a36f41SAndroid Build Coastguard Workertype socket_device, dev_type;
40*e4a36f41SAndroid Build Coastguard Workertype owntty_device, dev_type, mlstrustedobject;
41*e4a36f41SAndroid Build Coastguard Workertype tty_device, dev_type;
42*e4a36f41SAndroid Build Coastguard Workertype video_device, dev_type;
43*e4a36f41SAndroid Build Coastguard Workertype zero_device, dev_type, mlstrustedobject;
44*e4a36f41SAndroid Build Coastguard Workertype fuse_device, dev_type, mlstrustedobject;
45*e4a36f41SAndroid Build Coastguard Workertype iio_device, dev_type;
46*e4a36f41SAndroid Build Coastguard Workertype ion_device, dev_type, mlstrustedobject;
47*e4a36f41SAndroid Build Coastguard Workertype qtaguid_device, dev_type;
48*e4a36f41SAndroid Build Coastguard Workertype watchdog_device, dev_type;
49*e4a36f41SAndroid Build Coastguard Workertype uhid_device, dev_type;
50*e4a36f41SAndroid Build Coastguard Workertype uio_device, dev_type;
51*e4a36f41SAndroid Build Coastguard Workertype tun_device, dev_type, mlstrustedobject;
52*e4a36f41SAndroid Build Coastguard Workertype usbaccessory_device, dev_type, mlstrustedobject;
53*e4a36f41SAndroid Build Coastguard Workertype usb_device, dev_type, mlstrustedobject;
54*e4a36f41SAndroid Build Coastguard Workertype usb_serial_device, dev_type;
55*e4a36f41SAndroid Build Coastguard Workertype properties_device, dev_type;
56*e4a36f41SAndroid Build Coastguard Workertype properties_serial, dev_type;
57*e4a36f41SAndroid Build Coastguard Workertype property_info, dev_type;
58*e4a36f41SAndroid Build Coastguard Worker
59*e4a36f41SAndroid Build Coastguard Worker# All devices have a uart for the hci
60*e4a36f41SAndroid Build Coastguard Worker# attach service. The uart dev node
61*e4a36f41SAndroid Build Coastguard Worker# varies per device. This type
62*e4a36f41SAndroid Build Coastguard Worker# is used in per device policy
63*e4a36f41SAndroid Build Coastguard Workertype hci_attach_dev, dev_type;
64*e4a36f41SAndroid Build Coastguard Worker
65*e4a36f41SAndroid Build Coastguard Worker# All devices have a rpmsg device for
66*e4a36f41SAndroid Build Coastguard Worker# achieving remoteproc and rpmsg modules
67*e4a36f41SAndroid Build Coastguard Workertype rpmsg_device, dev_type;
68*e4a36f41SAndroid Build Coastguard Worker
69*e4a36f41SAndroid Build Coastguard Worker# Partition layout block device
70*e4a36f41SAndroid Build Coastguard Workertype root_block_device, dev_type;
71*e4a36f41SAndroid Build Coastguard Worker
72*e4a36f41SAndroid Build Coastguard Worker# factory reset protection block device
73*e4a36f41SAndroid Build Coastguard Workertype frp_block_device, dev_type;
74*e4a36f41SAndroid Build Coastguard Worker
75*e4a36f41SAndroid Build Coastguard Worker# System block device mounted on /system.
76*e4a36f41SAndroid Build Coastguard Worker# Documented at https://source.android.com/devices/bootloader/partitions-images
77*e4a36f41SAndroid Build Coastguard Workertype system_block_device, dev_type;
78*e4a36f41SAndroid Build Coastguard Worker
79*e4a36f41SAndroid Build Coastguard Worker# Recovery block device.
80*e4a36f41SAndroid Build Coastguard Worker# Documented at https://source.android.com/devices/bootloader/partitions-images
81*e4a36f41SAndroid Build Coastguard Workertype recovery_block_device, dev_type;
82*e4a36f41SAndroid Build Coastguard Worker
83*e4a36f41SAndroid Build Coastguard Worker# boot block device.
84*e4a36f41SAndroid Build Coastguard Worker# Documented at https://source.android.com/devices/bootloader/partitions-images
85*e4a36f41SAndroid Build Coastguard Workertype boot_block_device, dev_type;
86*e4a36f41SAndroid Build Coastguard Worker
87*e4a36f41SAndroid Build Coastguard Worker# Userdata block device mounted on /data.
88*e4a36f41SAndroid Build Coastguard Worker# Documented at https://source.android.com/devices/bootloader/partitions-images
89*e4a36f41SAndroid Build Coastguard Workertype userdata_block_device, dev_type;
90*e4a36f41SAndroid Build Coastguard Worker
91*e4a36f41SAndroid Build Coastguard Worker# Cache block device mounted on /cache.
92*e4a36f41SAndroid Build Coastguard Worker# Documented at https://source.android.com/devices/bootloader/partitions-images
93*e4a36f41SAndroid Build Coastguard Workertype cache_block_device, dev_type;
94*e4a36f41SAndroid Build Coastguard Worker
95*e4a36f41SAndroid Build Coastguard Worker# Block device for any swap partition.
96*e4a36f41SAndroid Build Coastguard Workertype swap_block_device, dev_type;
97*e4a36f41SAndroid Build Coastguard Worker
98*e4a36f41SAndroid Build Coastguard Worker# Metadata block device used for encryption metadata.
99*e4a36f41SAndroid Build Coastguard Worker# Assign this type to the partition specified by the encryptable=
100*e4a36f41SAndroid Build Coastguard Worker# mount option in your fstab file in the entry for userdata.
101*e4a36f41SAndroid Build Coastguard Worker# Documented at https://source.android.com/devices/bootloader/partitions-images
102*e4a36f41SAndroid Build Coastguard Workertype metadata_block_device, dev_type;
103*e4a36f41SAndroid Build Coastguard Worker
104*e4a36f41SAndroid Build Coastguard Worker# The 'misc' partition used by recovery and A/B.
105*e4a36f41SAndroid Build Coastguard Worker# Documented at https://source.android.com/devices/bootloader/partitions-images
106*e4a36f41SAndroid Build Coastguard Workertype misc_block_device, dev_type;
107*e4a36f41SAndroid Build Coastguard Worker
108*e4a36f41SAndroid Build Coastguard Worker# 'super' partition to be used for logical partitioning.
109*e4a36f41SAndroid Build Coastguard Workertype super_block_device, super_block_device_type, dev_type;
110*e4a36f41SAndroid Build Coastguard Worker
111*e4a36f41SAndroid Build Coastguard Worker# sdcard devices; normally vold uses the vold_block_device label and creates a
112*e4a36f41SAndroid Build Coastguard Worker# separate device node. gsid, however, accesses the original devide node
113*e4a36f41SAndroid Build Coastguard Worker# created through uevents, so we use a separate label.
114*e4a36f41SAndroid Build Coastguard Workertype sdcard_block_device, dev_type;
115