From 8b9d2ccbb80e669fb6ba402dc955bc6df6a90843 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Tue, 17 Oct 2023 06:55:37 +0200 Subject: [PATCH] common: Allow flashing vbmeta in fastbootd Change-Id: I4bad3d7ae9c92394736a7ff5aec94c7623c5ddf9 --- common/vendor/device.te | 1 + common/vendor/fastbootd.te | 1 + common/vendor/file_contexts | 1 + common/vendor/init.te | 2 ++ 4 files changed, 5 insertions(+) diff --git a/common/vendor/device.te b/common/vendor/device.te index 8397462..fca071f 100644 --- a/common/vendor/device.te +++ b/common/vendor/device.te @@ -9,6 +9,7 @@ type modem_block_device, dev_type; type omr_block_device, dev_type; type radio_block_device, dev_type; type sec_efs_block_device, dev_type; +type vbmeta_block_device, dev_type; type bbd_device, dev_type; type cpu_dma_device, dev_type; diff --git a/common/vendor/fastbootd.te b/common/vendor/fastbootd.te index 5435c6c..f14e251 100644 --- a/common/vendor/fastbootd.te +++ b/common/vendor/fastbootd.te @@ -4,4 +4,5 @@ allow fastbootd { boot_block_device dtbo_block_device recovery_block_device + vbmeta_block_device }:blk_file rw_file_perms; diff --git a/common/vendor/file_contexts b/common/vendor/file_contexts index 857e0a8..191f94e 100644 --- a/common/vendor/file_contexts +++ b/common/vendor/file_contexts @@ -33,6 +33,7 @@ /dev/block/platform/.+/by-name/(system|SYSTEM) u:object_r:system_block_device:s0 /dev/block/platform/.+/by-name/(userdata|USERDATA) u:object_r:userdata_block_device:s0 /dev/block/platform/.+/by-name/(vendor|VENDOR) u:object_r:system_block_device:s0 +/dev/block/platform/.+/by-name/vbmeta u:object_r:vbmeta_block_device:s0 /dev/esfp[0-9] u:object_r:fp_sensor_device:s0 /dev/batch_io u:object_r:io_device:s0 diff --git a/common/vendor/init.te b/common/vendor/init.te index 490913e..aca06f4 100644 --- a/common/vendor/init.te +++ b/common/vendor/init.te @@ -1,3 +1,5 @@ # init.te allow init proc_last_kmsg:file setattr; + +allow init vbmeta_block_device:lnk_file relabelto; -- 2.20.1