xref: /aosp_15_r20/system/sepolicy/private/hal_bluetooth.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1# HwBinder IPC from clients into server, and callbacks
2binder_call(hal_bluetooth_client, hal_bluetooth_server)
3binder_call(hal_bluetooth_server, hal_bluetooth_client)
4binder_call(hal_bluetooth_server, servicemanager)
5
6hal_attribute_hwservice(hal_bluetooth, hal_bluetooth_hwservice)
7hal_attribute_service(hal_bluetooth, hal_bluetooth_service)
8
9wakelock_use(hal_bluetooth);
10
11# The HAL toggles rfkill to power the chip off/on.
12allow hal_bluetooth self:global_capability_class_set net_admin;
13
14# bluetooth factory file accesses.
15r_dir_file(hal_bluetooth, bluetooth_efs_file)
16
17allow hal_bluetooth { uhid_device hci_attach_dev }:chr_file rw_file_perms;
18
19# sysfs access.
20r_dir_file(hal_bluetooth, sysfs_type)
21allow hal_bluetooth sysfs_bluetooth_writable:file rw_file_perms;
22allow hal_bluetooth self:global_capability2_class_set wake_alarm;
23
24# Allow write access to bluetooth-specific properties
25set_prop(hal_bluetooth, bluetooth_a2dp_offload_prop)
26set_prop(hal_bluetooth, bluetooth_audio_hal_prop)
27set_prop(hal_bluetooth, bluetooth_finder_prop)
28set_prop(hal_bluetooth, bluetooth_prop)
29set_prop(hal_bluetooth, exported_bluetooth_prop)
30
31# /proc access (bluesleep etc.).
32allow hal_bluetooth proc_bluetooth_writable:file rw_file_perms;
33
34# allow to run with real-time scheduling policy
35allow hal_bluetooth self:global_capability_class_set sys_nice;
36