1# Bluetooth executables and script (bdAddrLoader, init.flo.bt.sh) 2type bluetooth_loader, domain; 3type bluetooth_loader_exec, exec_type, file_type; 4 5# Start bdAddrLoader from init 6init_daemon_domain(bluetooth_loader) 7 8# Run init.flo.bt.sh 9allow bluetooth_loader shell_exec:file rx_file_perms; 10allow bluetooth_loader bluetooth_loader_exec:file rx_file_perms; 11 12# init.flo.bt.sh needs /system/bin/log access 13allow bluetooth_loader devpts:chr_file rw_file_perms; 14 15# Run hci_qcomm_init from init.flo.bt.sh 16domain_auto_trans(bluetooth_loader, hci_attach_exec, hci_attach) 17allow hci_attach bluetooth_loader:fd use; 18 19# Read mac address from persist partition 20allow bluetooth_loader persist_file:dir search; 21r_dir_file(bluetooth_loader, persist_bluetooth_file) 22 23# Talk to init over the property socket 24unix_socket_connect(bluetooth_loader, property, init) 25# Set persist.service.bdroid.* and bluetooth.* property values 26allow { bluetooth bluetooth_loader } bluetooth_prop:property_service set; 27 28# Allow getprop/setprop for init.flo.bt.sh 29allow bluetooth_loader system_file:file execute_no_trans; 30