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