From 5b30dbfbb3e1f4bcd599c27fb3fe85b6d8e80dbf Mon Sep 17 00:00:00 2001 From: Wilson Sung Date: Tue, 26 Dec 2023 19:13:52 +0800 Subject: [PATCH] Allow SysUI to write protolog file This is enabled on debuggable builds only, includes - Grant mlstrustedsubject typeattribute to wm_trace_data_file - Grant systemui_app the write access to wm_trace_data_file Bug: 251513116 Fix: 288049075 Test: make sepolicy Change-Id: Ifa5a5281c6e8c7ecedcd601fc8cc58c4be6bdc3b --- system_ext/private/systemui_app.te | 5 +++++ tracking_denials/bug_map | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system_ext/private/systemui_app.te b/system_ext/private/systemui_app.te index 074f500f..5a5f9d28 100644 --- a/system_ext/private/systemui_app.te +++ b/system_ext/private/systemui_app.te @@ -20,3 +20,8 @@ get_prop(systemui_app, keyguard_config_prop) set_prop(systemui_app, bootanim_system_prop) get_prop(systemui_app, qemu_hw_prop) +# Allow writing and removing wmshell protolog in /data/misc/wmtrace. +userdebug_or_eng(` + allow systemui_app wm_trace_data_file:dir rw_dir_perms; + allow systemui_app wm_trace_data_file:file create_file_perms; +') diff --git a/tracking_denials/bug_map b/tracking_denials/bug_map index 5f2ea8df..1114e82e 100644 --- a/tracking_denials/bug_map +++ b/tracking_denials/bug_map @@ -16,7 +16,6 @@ rild default_prop file b/315720874 surfaceflinger selinuxfs file b/313804706 system_server sysfs_batteryinfo file b/294967729 system_suspend sysfs_batteryinfo dir b/317316633 -systemui_app wm_trace_data_file dir b/288049075 twoshay chre_socket sock_file b/315104508 twoshay chre_socket sock_file b/315104941 vendor_init default_prop file b/315104235