From a7774c2cbacdc35d6b583cab01c261a1ee140221 Mon Sep 17 00:00:00 2001 From: Jiakai Zhang Date: Mon, 30 Jan 2023 09:31:43 +0000 Subject: [PATCH] Allow installd to kill profman. installd needs to kill profman if profman times out. Bug: 242352919 Test: - 1. Add an infinate loop to profman. 2. Run `adb shell pm compile -m speed-profile com.android.chrome` 3. See profman being killed after 1 minute. Change-Id: I71761eaab027698de0339d855b9a436b56580ed8 --- private/installd.te | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/private/installd.te b/private/installd.te index 9673cfd74..7615c9286 100644 --- a/private/installd.te +++ b/private/installd.te @@ -47,7 +47,10 @@ get_prop(installd, odsign_prop) allow installd staging_data_file:file unlink; allow installd staging_data_file:dir { open read remove_name rmdir search write getattr }; -allow installd { dex2oat dexoptanalyzer }:process { sigkill signal }; +allow installd { dex2oat dexoptanalyzer }:process signal; + +# installd kills subprocesses if they time out. +allow installd { dex2oat dexoptanalyzer profman }:process sigkill; # Allow installd manage dirs in /data/misc_ce/0/sdksandbox allow installd sdk_sandbox_system_data_file:dir { create_dir_perms relabelfrom };