common: Allow flashing vbmeta in fastbootd
authorTim Zimmermann <tim@linux4.de>
Tue, 17 Oct 2023 04:55:37 +0000 (06:55 +0200)
committerTim Zimmermann <tim@linux4.de>
Sun, 21 Jan 2024 05:16:28 +0000 (06:16 +0100)
Change-Id: I4bad3d7ae9c92394736a7ff5aec94c7623c5ddf9

common/vendor/device.te
common/vendor/fastbootd.te
common/vendor/file_contexts
common/vendor/init.te

index 8397462e7b274229e1ae5df5d21e01ca7d148a41..fca071fcad94c1194780ddd9f5cbcd9ec2d0e946 100644 (file)
@@ -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;
index 5435c6c35ae9f49d31057d55511e91cd9df622e8..f14e2513cabcaac4c48a6c22b89ec14234b4d5aa 100644 (file)
@@ -4,4 +4,5 @@ allow fastbootd {
     boot_block_device
     dtbo_block_device
     recovery_block_device
+    vbmeta_block_device
 }:blk_file rw_file_perms;
index 857e0a884f59ebf54dc11da202235c70035ebf97..191f94ee59906261ad32bf3e5289c9252a6c479e 100644 (file)
@@ -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
index 490913e1530c9aaddc768d5944b7112cdeaf4963..aca06f4630bfbbfdb5a95101d8d467014cc9a1c9 100644 (file)
@@ -1,3 +1,5 @@
 # init.te
 
 allow init proc_last_kmsg:file setattr;
+
+allow init vbmeta_block_device:lnk_file relabelto;