Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 1 | # Device types |
| 2 | type device, dev_type, fs_type; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 3 | type ashmem_device, dev_type, mlstrustedobject; |
Tri Vo | a7f6102 | 2019-09-24 14:43:00 -0700 | [diff] [blame] | 4 | type ashmem_libcutils_device, dev_type, mlstrustedobject; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 5 | type audio_device, dev_type; |
| 6 | type binder_device, dev_type, mlstrustedobject; |
Charles Chen | 27a8f43 | 2023-04-20 16:38:30 +0000 | [diff] [blame] | 7 | type hwbinder_device, dev_type, mlstrustedobject, isolated_compute_allowed_device; |
Martijn Coenen | e7d8f4c | 2017-03-21 16:01:52 -0700 | [diff] [blame] | 8 | type vndbinder_device, dev_type; |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 9 | type block_device, dev_type; |
Henri Chataing | 9ff3423 | 2023-01-04 16:55:23 +0000 | [diff] [blame] | 10 | type bt_device, dev_type; |
Jeff Vander Stoep | 68339ac | 2016-04-23 16:34:03 -0700 | [diff] [blame] | 11 | type camera_device, dev_type; |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 12 | type dm_device, dev_type; |
Akilesh Kailash | 63a2104 | 2023-02-13 16:30:40 -0800 | [diff] [blame] | 13 | type ublk_block_device, dev_type; |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 14 | type dm_user_device, dev_type; |
Akilesh Kailash | 63a2104 | 2023-02-13 16:30:40 -0800 | [diff] [blame] | 15 | type ublk_control_device, dev_type; |
Max Bires | 9e7a5b0 | 2017-01-09 14:57:03 -0800 | [diff] [blame] | 16 | type keychord_device, dev_type; |
Jeff Sharkey | a8e0f76 | 2017-03-25 21:38:17 -0600 | [diff] [blame] | 17 | type loop_control_device, dev_type; |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 18 | type loop_device, dev_type; |
Mark Salyzyn | 34d32ea | 2014-12-15 12:01:35 -0800 | [diff] [blame] | 19 | type pmsg_device, dev_type, mlstrustedobject; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 20 | type radio_device, dev_type; |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 21 | type ram_device, dev_type; |
dcashman | c759489 | 2015-05-18 14:01:37 -0700 | [diff] [blame] | 22 | type rtc_device, dev_type; |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 23 | type vd_device, dev_type; |
Stephen Smalley | 273d7ea | 2014-09-30 11:37:51 -0400 | [diff] [blame] | 24 | type vold_device, dev_type; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 25 | type console_device, dev_type; |
Stephen Smalley | af47ebb | 2013-11-04 09:47:29 -0500 | [diff] [blame] | 26 | type fscklogs, dev_type; |
Stephen Smalley | 3ba9012 | 2013-12-12 09:09:53 -0500 | [diff] [blame] | 27 | # GPU (used by most UI apps) |
Sandeep Bandaru | 702797d | 2024-09-20 14:55:25 +0000 | [diff] [blame] | 28 | type gpu_device, dev_type, mlstrustedobject, isolated_compute_allowed_device; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 29 | type graphics_device, dev_type; |
Alex Klyubin | 8d68831 | 2013-10-03 13:35:56 -0700 | [diff] [blame] | 30 | type hw_random_device, dev_type; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 31 | type input_device, dev_type; |
Max | c27c23f | 2016-12-04 15:11:29 -0800 | [diff] [blame] | 32 | type port_device, dev_type; |
Dan Cashman | 91d398d | 2017-09-26 12:58:29 -0700 | [diff] [blame] | 33 | type lowpan_device, dev_type; |
Stephen Smalley | c94e239 | 2012-01-06 10:25:53 -0500 | [diff] [blame] | 34 | type mtp_device, dev_type, mlstrustedobject; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 35 | type nfc_device, dev_type; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 36 | type ptmx_device, dev_type, mlstrustedobject; |
Alan Stokes | a0518b7 | 2020-10-27 11:28:00 +0000 | [diff] [blame] | 37 | type kmsg_device, dev_type, mlstrustedobject; |
Josh Gao | 94e2a92 | 2017-03-28 13:09:37 -0700 | [diff] [blame] | 38 | type kmsg_debug_device, dev_type; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 39 | type null_device, dev_type, mlstrustedobject; |
Stephen Smalley | cbc5279 | 2014-09-11 15:51:28 -0400 | [diff] [blame] | 40 | type random_device, dev_type, mlstrustedobject; |
Ruchi Kandoi | ea3cf00 | 2018-03-06 14:26:34 -0800 | [diff] [blame] | 41 | type secure_element_device, dev_type; |
Robert Craig | 65d4f44 | 2013-03-27 06:30:25 -0400 | [diff] [blame] | 42 | type sensors_device, dev_type; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 43 | type serial_device, dev_type; |
| 44 | type socket_device, dev_type; |
Stephen Smalley | 74ba8c8 | 2013-04-05 14:22:27 -0400 | [diff] [blame] | 45 | type owntty_device, dev_type, mlstrustedobject; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 46 | type tty_device, dev_type; |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 47 | type video_device, dev_type; |
Stephen Smalley | cbc5279 | 2014-09-11 15:51:28 -0400 | [diff] [blame] | 48 | type zero_device, dev_type, mlstrustedobject; |
Daichi Hirono | a20802d | 2015-12-02 13:43:46 +0900 | [diff] [blame] | 49 | type fuse_device, dev_type, mlstrustedobject; |
Robert Craig | f62af81 | 2013-01-30 13:17:14 -0500 | [diff] [blame] | 50 | type iio_device, dev_type; |
Charles Chen | 27a8f43 | 2023-04-20 16:38:30 +0000 | [diff] [blame] | 51 | type ion_device, dev_type, mlstrustedobject, isolated_compute_allowed_device; |
Hridya Valsaraju | 8c9cf62 | 2020-12-14 22:57:49 -0800 | [diff] [blame] | 52 | type dmabuf_heap_device, dmabuf_heap_device_type, dev_type, mlstrustedobject; |
Charles Chen | 27a8f43 | 2023-04-20 16:38:30 +0000 | [diff] [blame] | 53 | type dmabuf_system_heap_device, dmabuf_heap_device_type, dev_type, mlstrustedobject, isolated_compute_allowed_device; |
Hridya Valsaraju | 8c9cf62 | 2020-12-14 22:57:49 -0800 | [diff] [blame] | 54 | type dmabuf_system_secure_heap_device, dmabuf_heap_device_type, dev_type, mlstrustedobject; |
Bart Sears | dbca625 | 2024-08-04 23:06:24 +0000 | [diff] [blame] | 55 | type qtaguid_device, dev_type; |
rpcraig | bac9992 | 2012-12-03 06:07:45 -0500 | [diff] [blame] | 56 | type watchdog_device, dev_type; |
Christine Franks | 225fb93 | 2021-03-31 21:42:24 +0000 | [diff] [blame] | 57 | type uhid_device, dev_type, mlstrustedobject; |
Stephen Smalley | 9fc0d40 | 2014-03-26 15:37:54 -0400 | [diff] [blame] | 58 | type uio_device, dev_type; |
Robert Craig | 18b5f87 | 2013-01-07 09:21:18 -0500 | [diff] [blame] | 59 | type tun_device, dev_type, mlstrustedobject; |
Stephen Smalley | cbc5279 | 2014-09-11 15:51:28 -0400 | [diff] [blame] | 60 | type usbaccessory_device, dev_type, mlstrustedobject; |
| 61 | type usb_device, dev_type, mlstrustedobject; |
chrisweir | ccaaae4 | 2019-12-13 17:01:27 -0800 | [diff] [blame] | 62 | type usb_serial_device, dev_type; |
Alistair Delva | 1a3ee38 | 2020-03-16 15:35:49 -0700 | [diff] [blame] | 63 | type gnss_device, dev_type; |
Geremy Condra | c529c66 | 2013-02-28 17:33:16 -0800 | [diff] [blame] | 64 | type properties_device, dev_type; |
Tom Cherry | 949d7cb | 2015-12-01 16:58:27 -0800 | [diff] [blame] | 65 | type properties_serial, dev_type; |
Tom Cherry | 8b5433a | 2017-11-16 14:25:02 -0800 | [diff] [blame] | 66 | type property_info, dev_type; |
Daniel Norman | 4245d04 | 2023-11-30 23:28:04 +0000 | [diff] [blame] | 67 | type hidraw_device, dev_type; |
William Roberts | 7fa2f9e | 2012-05-31 09:40:12 -0400 | [diff] [blame] | 68 | |
| 69 | # All devices have a uart for the hci |
| 70 | # attach service. The uart dev node |
| 71 | # varies per device. This type |
| 72 | # is used in per device policy |
| 73 | type hci_attach_dev, dev_type; |
hqjiang | ee5f400 | 2012-07-11 11:21:05 -0700 | [diff] [blame] | 74 | |
Robert Craig | 65d4f44 | 2013-03-27 06:30:25 -0400 | [diff] [blame] | 75 | # All devices have a rpmsg device for |
hqjiang | ee5f400 | 2012-07-11 11:21:05 -0700 | [diff] [blame] | 76 | # achieving remoteproc and rpmsg modules |
| 77 | type rpmsg_device, dev_type; |
Robert Craig | dfef99a | 2014-02-19 20:16:13 -0500 | [diff] [blame] | 78 | |
| 79 | # Partition layout block device |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 80 | type root_block_device, dev_type; |
Andres Morales | d8447fd | 2014-07-09 15:18:32 -0700 | [diff] [blame] | 81 | |
dcashman | f37ce3f | 2014-09-08 13:11:01 -0700 | [diff] [blame] | 82 | # factory reset protection block device |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 83 | type frp_block_device, dev_type; |
Stephen Smalley | dd053a9 | 2014-09-11 08:50:04 -0400 | [diff] [blame] | 84 | |
Stephen Smalley | 206b1a6 | 2014-09-30 12:53:12 -0400 | [diff] [blame] | 85 | # System block device mounted on /system. |
Eric Biggers | 9bf0a0c | 2022-04-15 02:18:37 +0000 | [diff] [blame] | 86 | # Documented at https://source.android.com/devices/bootloader/partitions |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 87 | type system_block_device, dev_type; |
Stephen Smalley | 206b1a6 | 2014-09-30 12:53:12 -0400 | [diff] [blame] | 88 | |
| 89 | # Recovery block device. |
Eric Biggers | 9bf0a0c | 2022-04-15 02:18:37 +0000 | [diff] [blame] | 90 | # Documented at https://source.android.com/devices/bootloader/partitions |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 91 | type recovery_block_device, dev_type; |
Stephen Smalley | 206b1a6 | 2014-09-30 12:53:12 -0400 | [diff] [blame] | 92 | |
Nick Kralevich | a8e073c | 2015-02-27 17:39:09 -0800 | [diff] [blame] | 93 | # boot block device. |
Eric Biggers | 9bf0a0c | 2022-04-15 02:18:37 +0000 | [diff] [blame] | 94 | # Documented at https://source.android.com/devices/bootloader/partitions |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 95 | type boot_block_device, dev_type; |
Nick Kralevich | a8e073c | 2015-02-27 17:39:09 -0800 | [diff] [blame] | 96 | |
Seungjae Yoo | 1b2d9de | 2023-08-14 09:11:38 +0900 | [diff] [blame] | 97 | # dtbo block device, type used for getting DTBO information for AVF. |
| 98 | # Documented at https://source.android.com/docs/core/architecture/dto/partitions |
| 99 | type dtbo_block_device, dev_type; |
| 100 | |
Stephen Smalley | dd053a9 | 2014-09-11 08:50:04 -0400 | [diff] [blame] | 101 | # Userdata block device mounted on /data. |
Eric Biggers | 9bf0a0c | 2022-04-15 02:18:37 +0000 | [diff] [blame] | 102 | # Documented at https://source.android.com/devices/bootloader/partitions |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 103 | type userdata_block_device, dev_type; |
Stephen Smalley | dd053a9 | 2014-09-11 08:50:04 -0400 | [diff] [blame] | 104 | |
Jaegeuk Kim | b5f16b2 | 2023-01-15 19:35:34 -0800 | [diff] [blame] | 105 | # Zoned block device. |
| 106 | type zoned_block_device, dev_type; |
| 107 | |
Stephen Smalley | dd053a9 | 2014-09-11 08:50:04 -0400 | [diff] [blame] | 108 | # Cache block device mounted on /cache. |
Eric Biggers | 9bf0a0c | 2022-04-15 02:18:37 +0000 | [diff] [blame] | 109 | # Documented at https://source.android.com/devices/bootloader/partitions |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 110 | type cache_block_device, dev_type; |
Stephen Smalley | 8a0c25e | 2014-09-23 09:11:30 -0400 | [diff] [blame] | 111 | |
| 112 | # Block device for any swap partition. |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 113 | type swap_block_device, dev_type; |
Stephen Smalley | 273d7ea | 2014-09-30 11:37:51 -0400 | [diff] [blame] | 114 | |
Eric Biggers | 9bf0a0c | 2022-04-15 02:18:37 +0000 | [diff] [blame] | 115 | # Metadata block device mounted on /metadata, used for encryption metadata and |
| 116 | # various other purposes. |
| 117 | # Documented at https://source.android.com/devices/bootloader/partitions |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 118 | type metadata_block_device, dev_type; |
David Zeuthen | a10f789 | 2015-10-05 17:04:39 -0400 | [diff] [blame] | 119 | |
| 120 | # The 'misc' partition used by recovery and A/B. |
Eric Biggers | 9bf0a0c | 2022-04-15 02:18:37 +0000 | [diff] [blame] | 121 | # Documented at https://source.android.com/devices/bootloader/partitions |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 122 | type misc_block_device, dev_type; |
Hridya Valsaraju | 4ae8fe9 | 2018-08-17 11:07:09 -0700 | [diff] [blame] | 123 | |
| 124 | # 'super' partition to be used for logical partitioning. |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 125 | type super_block_device, super_block_device_type, dev_type; |
David Anderson | 6557d87 | 2019-03-15 16:41:15 -0700 | [diff] [blame] | 126 | |
| 127 | # sdcard devices; normally vold uses the vold_block_device label and creates a |
| 128 | # separate device node. gsid, however, accesses the original devide node |
| 129 | # created through uevents, so we use a separate label. |
Bart Van Assche | 4374a1f | 2021-10-08 09:30:42 -0700 | [diff] [blame] | 130 | type sdcard_block_device, dev_type; |
Randall Huang | 10d42ce | 2021-02-19 07:45:02 +0800 | [diff] [blame] | 131 | |
| 132 | # Userdata device file for filesystem tunables |
| 133 | type userdata_sysdev, dev_type; |
Jaegeuk Kim | be66c59 | 2022-03-06 00:47:06 -0800 | [diff] [blame] | 134 | |
| 135 | # Root disk file for disk tunables |
| 136 | type rootdisk_sysdev, dev_type; |
Inseob Kim | 825056d | 2023-08-01 11:00:49 +0900 | [diff] [blame] | 137 | |
| 138 | # vfio device |
| 139 | type vfio_device, dev_type; |
Inseob Kim | 09b27c7 | 2024-03-28 10:37:28 +0900 | [diff] [blame] | 140 | |
| 141 | # system/sepolicy/public is for vendor-facing type and attribute definitions. |
| 142 | # DO NOT ADD allow, neverallow, or dontaudit statements here. |
| 143 | # Instead, add such policy rules to system/sepolicy/private/*.te. |