1 # uncrypt 2 type uncrypt, domain; 3 type uncrypt_exec, exec_type, file_type; 4 5 init_daemon_domain(uncrypt) 6 7 allow uncrypt self:capability dac_override; 8 9 # Read OTA zip file from /data/data/com.google.android.gsf/app_download 10 r_dir_file(uncrypt, app_data_file) 11 12 userdebug_or_eng(` 13 # For debugging, allow /data/local/tmp access 14 r_dir_file(uncrypt, shell_data_file) 15 ') 16 17 # Create tmp file /cache/recovery/command.tmp 18 # Read /cache/recovery/command 19 # Rename /cache/recovery/command.tmp to /cache/recovery/command 20 allow uncrypt cache_file:dir rw_dir_perms; 21 allow uncrypt cache_file:file create_file_perms; 22 23 # Set a property to reboot the device. 24 unix_socket_connect(uncrypt, property, init) 25 allow uncrypt powerctl_prop:property_service set; 26 27 # Raw writes to block device 28 allow uncrypt self:capability sys_rawio; 29 allow uncrypt block_device:blk_file w_file_perms; 30 allow uncrypt block_device:dir r_dir_perms; 31