1init_daemon_domain(vendor_install_recovery)
2
3# service vendor_flash_recovery in
4# bootable/recovery/applypatch/vendor_flash_recovery.rc
5type vendor_install_recovery, domain;
6type vendor_install_recovery_exec, vendor_file_type, exec_type, file_type;
7
8# /vendor/bin/install-recovery.sh is a shell script.
9# Needs to execute /vendor/bin/sh
10allow vendor_install_recovery vendor_shell_exec:file rx_file_perms;
11
12# Execute /vendor/bin/applypatch
13allow vendor_install_recovery vendor_file:file rx_file_perms;
14not_full_treble(`allow vendor_install_recovery vendor_file:file rx_file_perms;')
15
16allow vendor_install_recovery vendor_toolbox_exec:file rx_file_perms;
17
18# Update the recovery block device based off a diff of the boot block device
19allow vendor_install_recovery block_device:dir search;
20allow vendor_install_recovery boot_block_device:blk_file r_file_perms;
21allow vendor_install_recovery recovery_block_device:blk_file rw_file_perms;
22
23# Write to /proc/sys/vm/drop_caches
24allow vendor_install_recovery proc_drop_caches:file w_file_perms;
25