blob: 24819c2ea414c78f1052174c574ce5bb59fdb002 [file] [log] [blame]
Nick Kralevich9f6af082014-07-02 16:18:16 -07001# service flash_recovery in init.rc
Nick Kralevich0c8101b2017-01-06 16:54:25 -08002type install_recovery, domain;
Nick Kralevich9f6af082014-07-02 16:18:16 -07003type install_recovery_exec, exec_type, file_type;
4
Benjamin Gordon342362a2018-09-06 16:19:40 -06005allow install_recovery self:global_capability_class_set { dac_override dac_read_search };
Nick Kralevich9f6af082014-07-02 16:18:16 -07006
7# /system/bin/install-recovery.sh is a shell script.
8# Needs to execute /system/bin/sh
9allow install_recovery shell_exec:file rx_file_perms;
10
11# Execute /system/bin/applypatch
12allow install_recovery system_file:file rx_file_perms;
Jeff Vander Stoep2db1cd42017-04-21 09:33:39 -070013not_full_treble(`allow install_recovery vendor_file:file rx_file_perms;')
Nick Kralevich9f6af082014-07-02 16:18:16 -070014
Stephen Smalleya3c97a72015-08-25 11:38:29 -040015allow install_recovery toolbox_exec:file rx_file_perms;
Stephen Smalleya3c97a72015-08-25 11:38:29 -040016
Nick Kralevicha8e073c2015-02-27 17:39:09 -080017# Update the recovery block device based off a diff of the boot block device
Nick Kralevich9f6af082014-07-02 16:18:16 -070018allow install_recovery block_device:dir search;
Nick Kralevicha8e073c2015-02-27 17:39:09 -080019allow install_recovery boot_block_device:blk_file r_file_perms;
Stephen Smalley206b1a62014-09-30 12:53:12 -040020allow install_recovery recovery_block_device:blk_file rw_file_perms;
Nick Kralevich9f6af082014-07-02 16:18:16 -070021
22# Create and delete /cache/saved.file
Nick Kralevichff2bf402016-03-29 09:20:41 -070023allow install_recovery cache_file:dir rw_dir_perms;
24allow install_recovery cache_file:file create_file_perms;
Nick Kralevich9f6af082014-07-02 16:18:16 -070025
26# Write to /proc/sys/vm/drop_caches
Jeff Sharkeyc9605962015-05-14 20:55:31 -070027allow install_recovery proc_drop_caches:file w_file_perms;