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
This commit is contained in:
Wilson Sung 2023-12-26 19:13:52 +08:00
parent 569134db41
commit 5b30dbfbb3
2 changed files with 5 additions and 1 deletions

View file

@ -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;
')