From 99c65df3eded0725a14f7f741fd2721510dc0ab5 Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Tue, 2 Jan 2018 16:12:22 -0800 Subject: [PATCH] init: allow read of /sys/devices/virtual/block/zram Commit erroneously 55039509 removed init's read access to /sys/devices/virtual/block/zram*. Restore access. Test: cat /proc/meminfo ... SwapTotal: 524284 kB SwapFree: 524284 kB ... Bug: 71510938 Change-Id: I20268168caa541a7dafa1e32339641095e1e524b --- public/init.te | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/init.te b/public/init.te index 80e9e7710..ad3ef4998 100644 --- a/public/init.te +++ b/public/init.te @@ -305,13 +305,16 @@ allow init { sysfs_android_usb sysfs_leds sysfs_power - sysfs_zram }:file w_file_perms; allow init { sysfs_dt_firmware_android }:file r_file_perms; +allow init { + sysfs_zram +}:file rw_file_perms; + # init chmod/chown access to /sys files. allow init { sysfs_android_usb