[ALPS03997871] allow MobileLog exec logcat -L

Mobile_log_d exec logcat -L to get last Android Log

MTK-Commit-Id: e51d67ff3d1024ec236d26f66d5286a1aed6fb75

Change-Id: Id2f2aceb501a5324ff642f34455080ccbd54bf34
CR-Id: ALPS03997871
Feature: Mobile Log Tool
This commit is contained in:
Yuxian Xu 2020-01-18 10:04:04 +08:00 committed by Yuxian Xu (徐玉显)
parent 31c972041e
commit 000e69e1bc
2 changed files with 12 additions and 0 deletions

View File

@ -49,3 +49,9 @@ allow dumpstate sysfs_vibrator:file write;
# Purpose : Allow dumpstate self to sys_nice # Purpose : Allow dumpstate self to sys_nice
allow dumpstate self:capability sys_nice; allow dumpstate self:capability sys_nice;
# Date: W1826
# Purpose : mobile_log_d exec 'logcat -L' via dumpstate
allow dumpstate mobile_log_d:fd use;
allow dumpstate mobile_log_d:fifo_file write;
allow dumpstate mobile_log_d:unix_stream_socket { read write };

View File

@ -32,6 +32,12 @@ allow mobile_log_d system_file:file execute_no_trans;
#shell command #shell command
allow mobile_log_d shell_exec:file rx_file_perms; allow mobile_log_d shell_exec:file rx_file_perms;
# execute logcat command
allow mobile_log_d logcat_exec:file rx_file_perms;
# execute 'logcat -L' via dumpstate
domain_auto_trans(mobile_log_d, logcat_exec, dumpstate)
#general storage access #general storage access
allow mobile_log_d storage_file:dir create_dir_perms; allow mobile_log_d storage_file:dir create_dir_perms;
allow mobile_log_d storage_file:file create_file_perms; allow mobile_log_d storage_file:file create_file_perms;