Give permissions to save usf stats and dump them in bugreports. am: 4b4afb2eea

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101-sepolicy/+/19672464

Change-Id: Iacf95664f2ba6bf126b82e2e2d73bddcddb70422
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Robb Glasser 2022-08-25 03:38:27 +00:00 committed by Automerger Merge Worker
commit 6ce1ff96e4
4 changed files with 16 additions and 0 deletions

View file

@ -10,3 +10,7 @@ type persist_sensor_reg_file, file_type, vendor_persist_type;
# end with "data_file". # end with "data_file".
type sensor_reg_data_file, file_type, data_file_type; type sensor_reg_data_file, file_type, data_file_type;
# Declare the sensor debug data file type. By convention, data file types
# end with "data_file".
type sensor_debug_data_file, file_type, data_file_type;

View file

@ -8,3 +8,5 @@
# Sensor registry data files. # Sensor registry data files.
/data/vendor/sensors/registry(/.*)? u:object_r:sensor_reg_data_file:s0 /data/vendor/sensors/registry(/.*)? u:object_r:sensor_reg_data_file:s0
# Sensor debug data files.
/data/vendor/sensors/debug(/.*)? u:object_r:sensor_debug_data_file:s0

View file

@ -12,6 +12,12 @@ r_dir_file(hal_sensors_default, persist_camera_file)
allow hal_sensors_default sensor_reg_data_file:dir rw_dir_perms; allow hal_sensors_default sensor_reg_data_file:dir rw_dir_perms;
allow hal_sensors_default sensor_reg_data_file:file create_file_perms; allow hal_sensors_default sensor_reg_data_file:file create_file_perms;
userdebug_or_eng(`
# Allow creation and writing of sensor debug data files.
allow hal_sensors_default sensor_debug_data_file:dir rw_dir_perms;
allow hal_sensors_default sensor_debug_data_file:file create_file_perms;
')
# Allow access to the AoC communication driver. # Allow access to the AoC communication driver.
allow hal_sensors_default aoc_device:chr_file rw_file_perms; allow hal_sensors_default aoc_device:chr_file rw_file_perms;

View file

@ -35,6 +35,10 @@ allow hal_dumpstate_default vendor_log_file:dir search;
allow hal_dumpstate_default vendor_usf_stats:file execute_no_trans; allow hal_dumpstate_default vendor_usf_stats:file execute_no_trans;
allow hal_dumpstate_default vendor_usf_reg_edit:file execute_no_trans; allow hal_dumpstate_default vendor_usf_reg_edit:file execute_no_trans;
allow hal_dumpstate_default vendor_dumpsys:file execute_no_trans; allow hal_dumpstate_default vendor_dumpsys:file execute_no_trans;
userdebug_or_eng(`
allow hal_dumpstate_default sensor_debug_data_file:dir r_dir_perms;
allow hal_dumpstate_default sensor_debug_data_file:file r_file_perms;
')
allow hal_dumpstate_default sscoredump_vendor_data_crashinfo_file:dir r_dir_perms; allow hal_dumpstate_default sscoredump_vendor_data_crashinfo_file:dir r_dir_perms;
allow hal_dumpstate_default sscoredump_vendor_data_crashinfo_file:file r_file_perms; allow hal_dumpstate_default sscoredump_vendor_data_crashinfo_file:file r_file_perms;