blob: 461523bdca988a6c132c5d909bfff8ec462adf03 [file] [log] [blame]
Alex Klyubin168435f2017-02-16 20:14:56 -08001# HwBinder IPC from clients into server, and callbacks
2binder_call(hal_bluetooth_client, hal_bluetooth_server)
3binder_call(hal_bluetooth_server, hal_bluetooth_client)
Andre Eisenbachbe27f922016-10-12 14:49:56 -07004
Alex Klyubin53656c12017-04-13 19:05:27 -07005add_hwservice(hal_bluetooth_server, hal_bluetooth_hwservice)
6allow hal_bluetooth_client hal_bluetooth_hwservice:hwservice_manager find;
7
Andre Eisenbachbe27f922016-10-12 14:49:56 -07008wakelock_use(hal_bluetooth);
9
Myles Watson20b8d6b2017-02-22 11:50:20 -080010# The HAL toggles rfkill to power the chip off/on.
Benjamin Gordon9b2e0cb2017-11-09 15:51:26 -070011allow hal_bluetooth self:global_capability_class_set net_admin;
Myles Watson20b8d6b2017-02-22 11:50:20 -080012
Andre Eisenbachbe27f922016-10-12 14:49:56 -070013# bluetooth factory file accesses.
14r_dir_file(hal_bluetooth, bluetooth_efs_file)
15
16allow hal_bluetooth { uhid_device hci_attach_dev }:chr_file rw_file_perms;
17
Andre Eisenbachbe27f922016-10-12 14:49:56 -070018# sysfs access.
19r_dir_file(hal_bluetooth, sysfs_type)
20allow hal_bluetooth sysfs_bluetooth_writable:file rw_file_perms;
Benjamin Gordon9b2e0cb2017-11-09 15:51:26 -070021allow hal_bluetooth self:global_capability2_class_set wake_alarm;
Andre Eisenbachbe27f922016-10-12 14:49:56 -070022
23# Allow write access to bluetooth-specific properties
24set_prop(hal_bluetooth, bluetooth_prop)
Andre Eisenbach6e3a5d02017-02-07 20:30:40 -080025
26# /proc access (bluesleep etc.).
27allow hal_bluetooth proc_bluetooth_writable:file rw_file_perms;
Martijn Coenen0d1f7d22017-05-09 09:53:46 -070028
29# allow to run with real-time scheduling policy
Benjamin Gordon9b2e0cb2017-11-09 15:51:26 -070030allow hal_bluetooth self:global_capability_class_set sys_nice;