diff --git a/device.te b/device.te index 9ff30d5bc043f6ba52037fb88496fed41f37f091..c155fcced3d4ad6c8c59ca4fa762ec11864df605 100644 --- a/device.te +++ b/device.te @@ -76,6 +76,9 @@ type system_block_device, dev_type; # Recovery block device. type recovery_block_device, dev_type; +# boot block device. +type boot_block_device, dev_type; + # Userdata block device mounted on /data. type userdata_block_device, dev_type; diff --git a/install_recovery.te b/install_recovery.te index 9155a2d4179059e993b0de2d4b70cca17dd78905..138522036e9c164ca19dc4d0c62f5485748ef576 100644 --- a/install_recovery.te +++ b/install_recovery.te @@ -13,8 +13,9 @@ allow install_recovery shell_exec:file rx_file_perms; # Execute /system/bin/applypatch allow install_recovery system_file:file rx_file_perms; -# Update the recovery block device +# Update the recovery block device based off a diff of the boot block device allow install_recovery block_device:dir search; +allow install_recovery boot_block_device:blk_file r_file_perms; allow install_recovery recovery_block_device:blk_file rw_file_perms; # Create and delete /cache/saved.file