From f63fe7214224fc850effecea026fd1e65e909b0f Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Fri, 15 Feb 2019 14:32:10 -0800 Subject: [PATCH] Allow postinstall scripts to trigger F2FS GC Test: Add checkpoint_gc to postinstall scripts Bug: 123367711 Change-Id: I24a0bd1c2c2086545f1587765bb9814da24ec7f2 --- public/postinstall.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/postinstall.te b/public/postinstall.te index 2ef68bdff..bcea2dcbf 100644 --- a/public/postinstall.te +++ b/public/postinstall.te @@ -35,6 +35,10 @@ binder_call(postinstall, system_server) # Need to talk to the otadexopt service. allow postinstall otadexopt_service:service_manager find; +# Allow postinstall scripts to trigger f2fs garbage collection +allow postinstall sysfs_fs_f2fs:file rw_file_perms; +allow postinstall sysfs_fs_f2fs:dir r_dir_perms; + # No domain other than update_engine and recovery (via update_engine_sideload) # should transition to postinstall, as it is only meant to run during the # update.