1 2 type tcmd, domain; 3 type tcmd_exec, exec_type, file_type; 4 5 init_daemon_domain(tcmd) 6 7 # Uses network sockets. 8 net_domain(tcmd) 9 10 # Set property. 11 unix_socket_connect(tcmd, property, init) 12 13 # Allow restart, fastboot, power off 14 allow tcmd powerctl_prop:property_service set; 15 16 # Uses /dev/ttydiag2 17 allow tcmd diag_device:chr_file rw_file_perms; 18 19 # Uses raw socket 20 allow tcmd self:capability net_raw; 21 22 # To allow read telephony.db 23 allow tcmd radio_data_file:dir r_dir_perms; 24 allow tcmd radio_data_file:file r_file_perms; 25 26 # To allow read/write /persist 27 allow tcmd persist_file:dir search; 28 allow tcmd persist_hiddenmenu_file:dir rw_dir_perms; 29 allow tcmd persist_hiddenmenu_file:file create_file_perms; 30