blob: 373dbec6bf6829f803db996b01467209c95d57fd [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
Jaekyun Seok224921d2018-04-09 12:07:32 +090024set_prop(hal_bluetooth, bluetooth_a2dp_offload_prop)
Andre Eisenbachbe27f922016-10-12 14:49:56 -070025set_prop(hal_bluetooth, bluetooth_prop)
Jaekyun Seok224921d2018-04-09 12:07:32 +090026set_prop(hal_bluetooth, exported_bluetooth_prop)
Andre Eisenbach6e3a5d02017-02-07 20:30:40 -080027
28# /proc access (bluesleep etc.).
29allow hal_bluetooth proc_bluetooth_writable:file rw_file_perms;
Martijn Coenen0d1f7d22017-05-09 09:53:46 -070030
31# allow to run with real-time scheduling policy
Benjamin Gordon9b2e0cb2017-11-09 15:51:26 -070032allow hal_bluetooth self:global_capability_class_set sys_nice;