1type init_power, domain; 2type init_power_exec, exec_type, vendor_file_type, file_type; 3 4init_daemon_domain(init_power) 5 6allow init_power rootfs:file r_file_perms; 7allow init_power vendor_shell_exec:file rx_file_perms; 8allow init_power vendor_toolbox_exec:file rx_file_perms; 9 10# files are created in /sys as this script executes. Grant 11# access to all of /sys to make this robust. 12r_dir_file(init_power, sysfs_type) 13allow init_power sysfs:file { rw_file_perms relabelfrom }; 14allow init_power sysfs:dir { relabelfrom r_dir_perms }; 15allow init_power sysfs_devices_system_cpu:dir relabelto; 16allow init_power sysfs_devices_system_cpu:file { relabelto w_file_perms }; 17allow init_power sysfs_msm_subsys:file w_file_perms; 18allow init_power sysfs_thermal:file w_file_perms; 19allow init_power sysfs_power_management:file write; 20 21# write to files proc/sys/kernel/sched_* 22allow init_power proc_kernel_sched:file w_file_perms; 23 24# set sys.post_boot.parsed to 1 25set_prop(init_power, post_boot_prop) 26