Add GSA logs policy

This adds a label to the sysfs files for GSA logs to allow dumpstate to
read them during a bugreport.

(cherry picked from commit 076591d107)

Bug: 271125313
Test: adb shell dumpstate
Change-Id: I8842c0bec972c4cfad15ca689f8e4ae7fa99e179
Merged-In: I8842c0bec972c4cfad15ca689f8e4ae7fa99e179
This commit is contained in:
Kenny Root 2023-02-27 17:32:51 -08:00
parent 05abdf9f26
commit 7be3a71942
4 changed files with 12 additions and 0 deletions

6
vendor/dump_gsa.te vendored Normal file
View file

@ -0,0 +1,6 @@
pixel_bugreport(dump_gsa)
userdebug_or_eng(`
allow dump_gsa vendor_toolbox_exec:file execute_no_trans;
allow dump_gsa sysfs_gsa_log:file r_file_perms;
')

1
vendor/file.te vendored
View file

@ -50,3 +50,4 @@ type sysfs_fabric, sysfs_type, fs_type;
type sysfs_em_profile, sysfs_type, fs_type; type sysfs_em_profile, sysfs_type, fs_type;
type sysfs_ota, sysfs_type, fs_type; type sysfs_ota, sysfs_type, fs_type;
type sysfs_ospm, sysfs_type, fs_type; type sysfs_ospm, sysfs_type, fs_type;
type sysfs_gsa_log, sysfs_type, fs_type;

View file

@ -16,6 +16,7 @@
/vendor/bin/hw/google\.hardware\.media\.c2@2\.0-service u:object_r:mediacodec_google_exec:s0 /vendor/bin/hw/google\.hardware\.media\.c2@2\.0-service u:object_r:mediacodec_google_exec:s0
/vendor/bin/dump/dump_wlan\.sh u:object_r:dump_wlan_exec:s0 /vendor/bin/dump/dump_wlan\.sh u:object_r:dump_wlan_exec:s0
/vendor/bin/dump/dump_cma\.sh u:object_r:dump_cma_exec:s0 /vendor/bin/dump/dump_cma\.sh u:object_r:dump_cma_exec:s0
/vendor/bin/dump/dump_gsa\.sh u:object_r:dump_gsa_exec:s0
/vendor/bin/dump/dump_power\.sh u:object_r:dump_power_exec:s0 /vendor/bin/dump/dump_power\.sh u:object_r:dump_power_exec:s0
/vendor/bin/rlsservice u:object_r:rlsservice_exec:s0 /vendor/bin/rlsservice u:object_r:rlsservice_exec:s0
/vendor/bin/tcpdump_logger u:object_r:tcpdump_logger_exec:s0 /vendor/bin/tcpdump_logger u:object_r:tcpdump_logger_exec:s0

View file

@ -465,3 +465,7 @@ genfscon sysfs /devices/platform/17000000.aoc/control/memory_votes_ff1 u:ob
# OTA # OTA
genfscon sysfs /devices/platform/13200000.ufs/pixel/boot_lun_enabled u:object_r:sysfs_ota:s0 genfscon sysfs /devices/platform/13200000.ufs/pixel/boot_lun_enabled u:object_r:sysfs_ota:s0
# GSA logs
genfscon sysfs /devices/platform/16490000.gsa-ns/log_main u:object_r:sysfs_gsa_log:s0
genfscon sysfs /devices/platform/16490000.gsa-ns/log_intermediate u:object_r:sysfs_gsa_log:s0