Allow system server to access zram sysfs
This patch allows
- System server needs write access to zram sysfs
directory to be able to trigger writeback to disk.
- init should be able to change attrs on zram to make
them writeable by system_server.
- Vendor init scripts should be able to set zram properties.
Bug: 117682284
Bug: 122674343
Test: Test writeback on go ref device
Change-Id: I308e48210f34894204992043eced5f276d736baf
diff --git a/private/system_server.te b/private/system_server.te
index 67d7cb5..bda0d92 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -661,7 +661,7 @@
# /sys access
allow system_server sysfs_zram:dir search;
-allow system_server sysfs_zram:file r_file_perms;
+allow system_server sysfs_zram:file rw_file_perms;
add_service(system_server, system_server_service);
allow system_server audioserver_service:service_manager find;