summaryrefslogtreecommitdiff
path: root/sepolicy/bluetooth_loader.te
blob: a86fbd5afd6eeb6393cdcd18ce5756bc5c312a9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Bluetooth executables and script (bdAddrLoader, init.flo.bt.sh)
type bluetooth_loader, domain, domain_deprecated;
type bluetooth_loader_exec, exec_type, file_type;

# Start bdAddrLoader from init
init_daemon_domain(bluetooth_loader)

# Run init.flo.bt.sh
allow bluetooth_loader shell_exec:file rx_file_perms;
allow bluetooth_loader bluetooth_loader_exec:file rx_file_perms;

# init.flo.bt.sh needs /system/bin/log access
allow bluetooth_loader devpts:chr_file rw_file_perms;

# Run hci_qcomm_init from init.flo.bt.sh
domain_auto_trans(bluetooth_loader, hci_attach_exec, hci_attach)
allow hci_attach bluetooth_loader:fd use;

# Read mac address from persist partition
allow bluetooth_loader persist_file:dir search;
r_dir_file(bluetooth_loader, persist_bluetooth_file)

# Set persist.service.bdroid.* and bluetooth.* property values
set_prop(bluetooth, bluetooth_prop)
set_prop(bluetooth_loader, bluetooth_prop)

# Allow getprop/setprop for init.flo.bt.sh
allow bluetooth_loader system_file:file execute_no_trans;
allow bluetooth_loader toolbox_exec:file rx_file_perms;