diff --git a/device.te b/device.te
index abe5daaf90c0ebb68252393df8b5f81f358a7a1a..c1f3d283cd07ca4d7be62fed1f19ec8d0d586dfc 100644
--- a/device.te
+++ b/device.te
@@ -68,6 +68,12 @@ type root_block_device, dev_type;
 # factory reset protection block device
 type frp_block_device, dev_type;
 
+# System block device mounted on /system.
+type system_block_device, dev_type;
+
+# Recovery block device.
+type recovery_block_device, dev_type;
+
 # Userdata block device mounted on /data.
 type userdata_block_device, dev_type;
 
diff --git a/domain.te b/domain.te
index 8e9d8c44696fe4a2244554d71ee038831e6022c8..86aeb07d8fc2963889c65e50902a87aace0a304b 100644
--- a/domain.te
+++ b/domain.te
@@ -318,3 +318,9 @@ neverallow domain default_android_service:service_manager add;
 neverallow { domain -init } default_prop:property_service set;
 
 neverallow { domain -init -recovery -system_server } frp_block_device:blk_file rw_file_perms;
+
+# No domain other than recovery can write to system.
+neverallow { domain -recovery } system_block_device:blk_file write;
+
+# No domains other than install_recovery or recovery can write to recovery.
+neverallow { domain -install_recovery -recovery } recovery_block_device:blk_file write;
diff --git a/install_recovery.te b/install_recovery.te
index 138134ae5ff6a59eb398005139ca4a3e2130027d..52326859a2396ae3c3f5bfacf4031285ff31c8d0 100644
--- a/install_recovery.te
+++ b/install_recovery.te
@@ -18,6 +18,8 @@ allow install_recovery system_file:file rx_file_perms;
 # create an appropriate label for it.
 allow install_recovery block_device:dir search;
 allow install_recovery block_device:blk_file rw_file_perms;
+auditallow install_recovery block_device:blk_file rw_file_perms;
+allow install_recovery recovery_block_device:blk_file rw_file_perms;
 
 # Create and delete /cache/saved.file
 allow install_recovery cache_file:dir rw_dir_perms;