• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ==============================================
2# MTK Policy Rule
3# ==============================================
4
5# AED start: /dev/block/expdb
6allow crash_dump block_device:dir search;
7
8# aee db dir and db files
9allow crash_dump sdcard_type:dir create_dir_perms;
10allow crash_dump sdcard_type:file create_file_perms;
11
12#data/anr
13allow crash_dump anr_data_file:dir create_dir_perms;
14allow crash_dump anr_data_file:file create_file_perms;
15
16allow crash_dump domain:process { getattr getsched };
17allow crash_dump domain:lnk_file getattr;
18
19#core-pattern
20allow crash_dump usermodehelper:file r_file_perms;
21
22#suid_dumpable. this is neverallow
23#allow crash_dump proc_security:file r_file_perms;
24
25#allow crash_dump call binaries labeled "system_file" under /system/bin/
26allow crash_dump system_file:file execute_no_trans;
27
28allow crash_dump init:process getsched;
29allow crash_dump kernel:process getsched;
30
31# Date: W15.34
32# Operation: Migration
33# Purpose: For pagemap & pageflags information in NE DB
34userdebug_or_eng(`allow crash_dump self:capability sys_admin;')
35
36# Purpose: allow crash_dump to access toolbox
37allow crash_dump toolbox_exec:file rx_file_perms;
38
39# Purpose: mnt/user/*
40allow crash_dump mnt_user_file:dir search;
41allow crash_dump mnt_user_file:lnk_file read;
42
43allow crash_dump storage_file:dir search;
44allow crash_dump storage_file:lnk_file read;
45
46# Date : WK17.09
47# Operation : AEE UT for Android O
48# Purpose : for AEE module to dump files
49domain_auto_trans(crash_dump, dumpstate_exec, dumpstate)
50
51# Purpose : crash_dump communicate with aee_core_forwarder
52# allow crash_dump aee_core_forwarder:dir search;
53# allow crash_dump aee_core_forwarder:file { read getattr open };
54
55userdebug_or_eng(`
56  allow crash_dump su:dir {search read open };
57  allow crash_dump su:file { read getattr open };
58')
59
60# /data/tombstone
61allow crash_dump tombstone_data_file:dir w_dir_perms;
62allow crash_dump tombstone_data_file:file create_file_perms;
63
64# /proc/pid/
65allow crash_dump self:capability { fowner chown fsetid sys_nice sys_resource net_admin sys_module setgid setuid kill };
66
67# system(cmd) aee_dumpstate aee_archive
68allow crash_dump shell_exec:file rx_file_perms;
69
70# PROCESS_FILE_STATE
71allow crash_dump dumpstate:unix_stream_socket { read write ioctl };
72allow crash_dump dumpstate:dir search;
73allow crash_dump dumpstate:file r_file_perms;
74
75allow crash_dump logdr_socket:sock_file write;
76allow crash_dump logd:unix_stream_socket connectto;
77#allow crash_dump system_ndebug_socket:sock_file write;
78
79# vibrator
80allow crash_dump sysfs_vibrator:file w_file_perms;
81
82# Data : 2017/03/22
83# Operation : add NE flow rule for Android O
84# Purpose : make crash_dump can get specific process NE info
85allow crash_dump domain:dir r_dir_perms;
86allow crash_dump domain:{ file lnk_file } r_file_perms;
87
88allow crash_dump dalvikcache_data_file:dir r_dir_perms;
89#allow crash_dump zygote_exec:file r_file_perms;
90#allow crash_dump init_exec:file r_file_perms;
91
92# Data : 2017/04/06
93# Operation : add selinux rule for crash_dump notify crash_dump
94# Purpose : make crash_dump can get notify from crash_dump
95allow crash_dump crash_dump:dir search;
96allow crash_dump crash_dump:file r_file_perms;
97
98# Purpose : allow crash_dump to read /proc/version
99allow crash_dump proc_version:file { read open };
100
101# Purpose : allow crash_dump self to sys_nice/chown/kill
102allow crash_dump self:capability { sys_nice chown fowner kill };
103
104# Purpose: Allow crash_dump to write /sys/kernel/debug/tracing/snapshot
105userdebug_or_eng(`allow crash_dump debugfs_tracing_debug:file { write open };')
106
107# Purpose: Allow crash_dump to read/write /sys/kernel/debug/tracing/tracing_on
108#userdebug_or_eng(` allow crash_dump debugfs_tracing:file { r_file_perms write };')
109
110# Purpose: receive dropbox message
111allow crash_dump dropbox_data_file:file {getattr read};
112allow crash_dump dropbox_service:service_manager find;
113allow crash_dump servicemanager:binder call;
114allow crash_dump system_server:binder call;
115
116# Purpose: allow crash_dump to read packages.list
117allow crash_dump packages_list_file:file r_file_perms;
118
119# Purpose: Allow crash_dump to read /proc/*/exe
120allow crash_dump system_file_type:file r_file_perms;
121