display-dump: sepolicy for new primary display dump

Bug: 376426334
Test: adb bugreport
Test: adb shell /vendor/bin/dump/dump_*_display
Test: adb shell /vendor/bin/dump/dump_*_second_display
Flag: EXEMPT bugfix
Change-Id: I3b1d1f46ddea4882f028d9314cfd174371039925
This commit is contained in:
Hung-Yeh Lee
2024-12-26 14:00:58 +08:00
parent 33f5985af3
commit 19268ffb20
8 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# Display (dump for bugreport)
pixel_bugreport(dump_pixel_display)
allow dump_pixel_display sysfs_display:file r_file_perms;
allow dump_pixel_display vendor_displaycolor_service:service_manager find;
binder_call(dump_pixel_display, hal_graphics_composer_default)
allow dump_pixel_display vendor_dumpsys:file execute_no_trans;
allow dump_pixel_display vendor_shell_exec:file execute_no_trans;
userdebug_or_eng(`
allow dump_pixel_display vendor_dri_debugfs:dir r_dir_perms;
allow dump_pixel_display vendor_dri_debugfs:file r_file_perms;
')
vndbinder_use(dump_pixel_display)

View File

@@ -0,0 +1,11 @@
# Display eng/userdebug (dump for bugreport)
pixel_bugreport(dump_pixel_display_userdebug)
userdebug_or_eng(`
allow dump_pixel_display_userdebug vendor_toolbox_exec:file execute_no_trans;
allow dump_pixel_display_userdebug vendor_log_file:dir search;
allow dump_pixel_display_userdebug vendor_hwc_log_file:dir r_dir_perms;
allow dump_pixel_display_userdebug vendor_hwc_log_file:file r_file_perms;
allow dump_pixel_display_userdebug debugfs_tracing_instances:dir search;
allow dump_pixel_display_userdebug debugfs_tracing_instances:file r_file_perms;
')

View File

@@ -0,0 +1,3 @@
type vendor_hwc_log_file, file_type, data_file_type;
type vendor_dri_debugfs, fs_type, debugfs_type;

View File

@@ -0,0 +1,5 @@
/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_pixel_display_userdebug_exec:s0
/vendor/bin/dump/dump_pixel_display u:object_r:dump_pixel_display_exec:s0
/data/vendor/log/hwc(/.*)? u:object_r:vendor_hwc_log_file:s0

View File

@@ -0,0 +1,3 @@
genfscon debugfs /dri/0/crtc- u:object_r:vendor_dri_debugfs:s0
genfscon sysfs /module/drm/parameters/debug u:object_r:sysfs_display:s0

View File

@@ -0,0 +1,3 @@
allow hal_graphics_composer_default dump_pixel_display:fifo_file { append write };
allow hal_graphics_composer_default dump_pixel_display:fd use;

View File

@@ -0,0 +1,2 @@
type vendor_displaycolor_service, vndservice_manager_type;

View File

@@ -0,0 +1,2 @@
displaycolor u:object_r:vendor_displaycolor_service:s0