Adding allows for smlog and dumpstate

1. Adding allows for smlog and dumpstate
2. Moving log path to data/vendor

Bug: 37169733
Test: Verify modem logs in bugreport
Change-Id: Ifaef1976bc7b88afdd3ee2a7ef82a78853c5ee14
This commit is contained in:
Jie Song
2017-04-25 13:55:49 -07:00
parent b13737cc28
commit 85b1b4d5e1
5 changed files with 13 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
userdebug_or_eng(`
allow dumpstate smlog_dump_file:dir create_dir_perms;
allow dumpstate smlog_dump_file:file create_file_perms;
allow dumpstate modem_dump_file:dir create_dir_perms;
allow dumpstate modem_dump_file:file create_file_perms;
')

View File

@@ -13,9 +13,6 @@ type debugfs_rpm, debugfs_type, fs_type;
type debugfs_rmt_storage, debugfs_type, fs_type;
type debugfs_usb, debugfs_type, fs_type;
type smlog_dump_file, file_type, data_file_type;
# /proc
type proc_wifi_dbg, fs_type;
@@ -43,6 +40,7 @@ type nfc_vendor_data_file, file_type, data_file_type;
type radio_vendor_data_file, file_type, data_file_type, mlstrustedobject;
type cnss_vendor_data_file, file_type, data_file_type, mlstrustedobject;
type ramdump_vendor_data_file, file_type, data_file_type, mlstrustedobject;
type modem_dump_file, file_type, data_file_type;
type vendor_firmware_file, vendor_file_type, file_type;

View File

@@ -184,6 +184,7 @@
/vendor/bin/port-bridge u:object_r:port-bridge_exec:s0
/vendor/bin/qti u:object_r:qti_exec:s0
/vendor/bin/ramdump u:object_r:ramdump_exec:s0
/vendor/bin/smlog_dump u:object_r:smlog_dump_exec:s0
/vendor/bin/wcnss_filter u:object_r:wcnss_filter_exec:s0
/vendor/bin/loc_launcher u:object_r:location_exec:s0
/vendor/bin/lowi-server u:object_r:location_exec:s0
@@ -242,6 +243,7 @@
/data/vendor/radio(/.*)? u:object_r:radio_vendor_data_file:s0
/data/vendor/wifi(/.*)? u:object_r:cnss_vendor_data_file:s0
/data/vendor/ramdump(/.*)? u:object_r:ramdump_vendor_data_file:s0
/data/vendor/modem_dump(/.*)? u:object_r:modem_dump_file:s0
# /
/tombstones u:object_r:rootfs:s0

View File

@@ -11,8 +11,8 @@ allow hal_dumpstate_impl toolbox_exec:file rx_file_perms;
userdebug_or_eng(`
# smlog_dump
domain_auto_trans(hal_dumpstate_impl, smlog_dump_exec, smlog_dump)
allow hal_dumpstate_impl smlog_dump_file:dir create_dir_perms;
allow hal_dumpstate_impl smlog_dump_file:file create_file_perms;
allow hal_dumpstate_impl modem_dump_file:dir create_dir_perms;
allow hal_dumpstate_impl modem_dump_file:file create_file_perms;
allow hal_dumpstate_impl radio_data_file:dir r_dir_perms;
allow hal_dumpstate_impl radio_vendor_data_file:dir r_dir_perms;
allow hal_dumpstate_impl netmgr_data_file:dir r_dir_perms;

View File

@@ -2,8 +2,8 @@ type smlog_dump_exec, exec_type, vendor_file_type, file_type;
userdebug_or_eng(`
type smlog_dump, domain;
allow smlog_dump smlog_dump_file:dir r_dir_perms;
allow smlog_dump smlog_dump_file:file create_file_perms;
allow smlog_dump modem_dump_file:dir create_dir_perms;
allow smlog_dump modem_dump_file:file create_file_perms;
r_dir_file(smlog_dump, sysfs_uio)
r_dir_file(smlog_dump, sysfs_rmtfs)
@@ -12,6 +12,7 @@ userdebug_or_eng(`
allow smlog_dump rild:fd use;
allow smlog_dump rild:fifo_file { read write };
allow smlog_dump rild:unix_stream_socket { read write };
allow smlog_dump rild:netlink_generic_socket { read write };
allow smlog_dump self:socket create_socket_perms;
allowxperm smlog_dump self:socket ioctl msm_sock_ipc_ioctls;
allow smlog_dump sysfs:dir r_dir_perms;
@@ -20,4 +21,7 @@ userdebug_or_eng(`
allow smlog_dump sysfs_msm_subsys:lnk_file read;
allow smlog_dump sysfs_soc:dir search;
allow smlog_dump sysfs_soc:file r_file_perms;
allow smlog_dump dumpstate:fd use;
allow smlog_dump hal_dumpstate_impl:fd use;
allow smlog_dump uio_device:chr_file rw_file_perms;
')