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)
4
5hal_attribute_hwservice(hal_bluetooth, hal_bluetooth_hwservice)
6
7wakelock_use(hal_bluetooth);
8
9# The HAL toggles rfkill to power the chip off/on.
10allow hal_bluetooth self:global_capability_class_set net_admin;
11
12# bluetooth factory file accesses.
13r_dir_file(hal_bluetooth, bluetooth_efs_file)
14
15allow hal_bluetooth { uhid_device hci_attach_dev }:chr_file rw_file_perms;
16
17# sysfs access.
18r_dir_file(hal_bluetooth, sysfs_type)
19allow hal_bluetooth sysfs_bluetooth_writable:file rw_file_perms;
20allow hal_bluetooth self:global_capability2_class_set wake_alarm;
21
22# Allow write access to bluetooth-specific properties
23set_prop(hal_bluetooth, bluetooth_a2dp_offload_prop)
24set_prop(hal_bluetooth, bluetooth_audio_hal_prop)
25set_prop(hal_bluetooth, bluetooth_prop)
26set_prop(hal_bluetooth, exported_bluetooth_prop)
27
28# /proc access (bluesleep etc.).
29allow hal_bluetooth proc_bluetooth_writable:file rw_file_perms;
30
31# allow to run with real-time scheduling policy
32allow hal_bluetooth self:global_capability_class_set sys_nice;
33