diff --git a/file.te b/file.te
index 2dcce5a470c744f3b6cd066df1f4ce2ab71cd92a..15ed5361ac18a4bfec23c5298d38e9bb5f483536 100644
--- a/file.te
+++ b/file.te
@@ -25,6 +25,7 @@ type sysfs, fs_type, sysfs_type, mlstrustedobject;
 type sysfs_writable, fs_type, sysfs_type, mlstrustedobject;
 type sysfs_batteryinfo, fs_type, sysfs_type;
 type sysfs_bluetooth_writable, fs_type, sysfs_type, mlstrustedobject;
+type sysfs_hwrandom, fs_type, sysfs_type;
 type sysfs_nfc_power_writable, fs_type, sysfs_type, mlstrustedobject;
 type sysfs_wake_lock, fs_type, sysfs_type;
 type sysfs_mac_address, fs_type, sysfs_type;
diff --git a/file_contexts b/file_contexts
index c06fcbd034aedac92ba98eaed67835149d3f4888..785dc9e0c65bd0379170b1b8d711a0ee0b27f67c 100644
--- a/file_contexts
+++ b/file_contexts
@@ -327,6 +327,7 @@
 /sys/devices/system/cpu(/.*)?    u:object_r:sysfs_devices_system_cpu:s0
 /sys/devices/virtual/block/zram\d+(/.*)?     u:object_r:sysfs_zram:s0
 /sys/devices/virtual/block/zram\d+/uevent    u:object_r:sysfs_zram_uevent:s0
+/sys/devices/virtual/misc/hw_random(/.*)?    u:object_r:sysfs_hwrandom:s0
 /sys/power/wake_lock -- u:object_r:sysfs_wake_lock:s0
 /sys/power/wake_unlock -- u:object_r:sysfs_wake_lock:s0
 /sys/kernel/uevent_helper --	u:object_r:usermodehelper:s0
diff --git a/ueventd.te b/ueventd.te
index 003b0e69fa90485d8b00612b68501f07e1e6d568..f67c0db8655ed0fcbf9a52927d76d0fa4cf4f76f 100644
--- a/ueventd.te
+++ b/ueventd.te
@@ -13,6 +13,7 @@ allow ueventd self:capability { chown mknod net_admin setgid fsetid sys_rawio da
 allow ueventd device:file create_file_perms;
 allow ueventd device:chr_file rw_file_perms;
 allow ueventd sysfs:file rw_file_perms;
+allow ueventd sysfs_hwrandom:file w_file_perms;
 allow ueventd sysfs_zram_uevent:file w_file_perms;
 allow ueventd sysfs_type:{ file lnk_file } { relabelfrom relabelto setattr getattr };
 allow ueventd sysfs_type:dir { relabelfrom relabelto setattr r_dir_perms };
diff --git a/untrusted_app.te b/untrusted_app.te
index 9c2855dee97af5e372cf2ceb75fe7b904a9d408a..69796517003a0da7d13c5e7319aa0190b508f7df 100644
--- a/untrusted_app.te
+++ b/untrusted_app.te
@@ -95,6 +95,10 @@ allow untrusted_app proc_meminfo:file r_file_perms;
 # access /proc/net/xt_qtguid/stats
 r_dir_file(untrusted_app, proc_net)
 
+# Cts: HwRngTest
+allow untrusted_app sysfs_hwrandom:dir search;
+allow untrusted_app sysfs_hwrandom:file r_file_perms;
+
 ###
 ### neverallow rules
 ###