1type mtk_hal_bluetooth, domain;
2type mtk_hal_bluetooth_exec, exec_type, vendor_file_type, file_type;
3init_daemon_domain(mtk_hal_bluetooth)
4
5#r_dir_file(mtk_hal_bluetooth, system_file)
6# call into the Bluetooth process (callbacks)
7binder_call(mtk_hal_bluetooth, bluetooth)
8hwbinder_use(mtk_hal_bluetooth);
9
10wakelock_use(mtk_hal_bluetooth);
11
12# bluetooth factory file accesses.
13r_dir_file(mtk_hal_bluetooth, bluetooth_efs_file)
14
15allow mtk_hal_bluetooth { uhid_device hci_attach_dev }:chr_file rw_file_perms;
16
17# sysfs access.
18allow mtk_hal_bluetooth sysfs_bluetooth_writable:file rw_file_perms;
19allow mtk_hal_bluetooth self:capability2 wake_alarm;
20
21# Allow write access to bluetooth-specific properties
22set_prop(mtk_hal_bluetooth, bluetooth_prop)
23
24# /proc access (bluesleep etc.).
25allow mtk_hal_bluetooth proc_bluetooth_writable:file rw_file_perms;
26
27# VTS tests need to be able to toggle rfkill
28allow mtk_hal_bluetooth self:capability net_admin;
29
30# Purpose : Set to access stpbt driver & NVRAM
31allow mtk_hal_bluetooth stpbt_device:chr_file rw_file_perms;
32
33allow mtk_hal_bluetooth nvdata_file:dir search;
34allow mtk_hal_bluetooth nvdata_file:file rw_file_perms;
35allow mtk_hal_bluetooth nvram_data_file:lnk_file read;
36allow mtk_hal_bluetooth nvdata_file:lnk_file read;
37
38# Purpose: Allow to search /mnt/vendor/* for fstab when using NVM_Init()
39allow mtk_hal_bluetooth mnt_vendor_file:dir search;
40
41get_prop(mtk_hal_bluetooth, hwservicemanager_prop)
42
43#add_hwservice(hal_bluetooth, mtk_hal_bluetooth_hwservice)
44allow hal_bluetooth_client mtk_hal_bluetooth_hwservice:hwservice_manager find;
45
46hal_server_domain(mtk_hal_bluetooth,hal_bluetooth);
47
48# Purpose: Allow BT Driver to insmod
49allow mtk_hal_bluetooth wmt_prop:property_service set;
50