1# These are the permissions required to use the boot_control HAL implemented
2# here: hardware/qcom/bootctrl/boot_control.c
3
4# Getting and setting GPT attributes for the bootloader iterates over all the
5# partition names in the block_device directory /dev/block/.../by-name
6allow hal_bootctl_default block_device:dir r_dir_perms;
7
8# Edit the attributes stored in the GPT.
9allow hal_bootctl_default boot_block_device:blk_file rw_file_perms;
10allow hal_bootctl_default gpt_block_device:blk_file rw_file_perms;
11allow hal_bootctl_default custom_ab_block_device:blk_file getattr;
12allow hal_bootctl_default modem_block_device:blk_file getattr;
13allow hal_bootctl_default dp_block_device:blk_file getattr;
14
15# Access /dev/sgN devices (generic SCSI) to write the
16# A/B slot selection for the XBL partition. Allow also to issue a
17# UFS_IOCTL_QUERY ioctl.
18allow hal_bootctl_default sg_device:chr_file rw_file_perms;
19
20allow hal_bootctl_default sysfs_scsi_devices_0000:dir r_dir_perms;
21
22# Write to the XBL devices.
23allow hal_bootctl_default xbl_block_device:blk_file rw_file_perms;
24
25# We never apply OTAs when GSI is running
26dontaudit hal_bootctl_default gsi_metadata_file:dir search;
27
28# Allow bootctl HAL to read ro.boot.hardware.platform
29get_prop(hal_bootctl_default, vendor_hw_plat_prop)
30