blob: 752124ddb4ce30f6961bdb5d066bcf1b115ff4ed [file] [log] [blame]
Nick Kralevich96eeb1e2014-02-19 13:33:32 -08001# uncrypt
Nick Kralevicheb4e2ab2015-01-05 15:03:43 -08002type uncrypt, domain, mlstrustedsubject;
Nick Kralevich96eeb1e2014-02-19 13:33:32 -08003type uncrypt_exec, exec_type, file_type;
4
5init_daemon_domain(uncrypt)
Nick Kralevich96eeb1e2014-02-19 13:33:32 -08006
7allow uncrypt self:capability dac_override;
8
9# Read OTA zip file from /data/data/com.google.android.gsf/app_download
10r_dir_file(uncrypt, app_data_file)
11
Nick Kralevichaf99ed82014-02-20 11:47:00 -080012userdebug_or_eng(`
13 # For debugging, allow /data/local/tmp access
14 r_dir_file(uncrypt, shell_data_file)
15')
16
Nick Kralevich96eeb1e2014-02-19 13:33:32 -080017# Read /cache/recovery/command
Tao Bao70c6dbf2015-05-20 16:29:42 -070018# Read /cache/recovery/uncrypt_file
19# Write to pipe file /cache/recovery/uncrypt_status
Nick Kralevich96eeb1e2014-02-19 13:33:32 -080020allow uncrypt cache_file:dir rw_dir_perms;
21allow uncrypt cache_file:file create_file_perms;
Tao Bao70c6dbf2015-05-20 16:29:42 -070022allow uncrypt cache_file:fifo_file w_file_perms;
Nick Kralevich96eeb1e2014-02-19 13:33:32 -080023
24# Set a property to reboot the device.
William Roberts2f5a6a92015-05-04 18:22:45 -070025set_prop(uncrypt, powerctl_prop)
Nick Kralevich96eeb1e2014-02-19 13:33:32 -080026
27# Raw writes to block device
28allow uncrypt self:capability sys_rawio;
29allow uncrypt block_device:blk_file w_file_perms;
Nick Kralevich0a5f5612014-02-27 17:24:43 -080030allow uncrypt block_device:dir r_dir_perms;
Stephen Smalleydd053a92014-09-11 08:50:04 -040031
32# Access userdata block device.
Nick Kralevicheb4e2ab2015-01-05 15:03:43 -080033allow uncrypt userdata_block_device:blk_file w_file_perms;