2c8ca45d2d
This changes tracefs files to be default-enabled in debug mode, but default-disabled with specific files enabled in user mode. Bug: 64762598 Test: Successfully took traces in user mode. Change-Id: I572ea22253e0c1e42065fbd1d2fd7845de06fceb
28 lines
883 B
Text
28 lines
883 B
Text
# Domain for atrace process spawned by boottrace service.
|
|
|
|
type atrace_exec, exec_type, file_type;
|
|
|
|
userdebug_or_eng(`
|
|
type atrace, domain, coredomain;
|
|
|
|
init_daemon_domain(atrace)
|
|
|
|
# boottrace services uses /data/misc/boottrace/categories
|
|
allow atrace boottrace_data_file:dir search;
|
|
allow atrace boottrace_data_file:file r_file_perms;
|
|
|
|
# Allow atrace to access tracefs.
|
|
allow atrace debugfs_tracing:dir r_dir_perms;
|
|
allow atrace debugfs_tracing:file rw_file_perms;
|
|
allow atrace debugfs_tracing_debug:dir r_dir_perms;
|
|
allow atrace debugfs_tracing_debug:file rw_file_perms;
|
|
allow atrace debugfs_trace_marker:file getattr;
|
|
|
|
# atrace sets debug.atrace.* properties
|
|
set_prop(atrace, debug_prop)
|
|
|
|
# atrace pokes all the binder-enabled processes at startup.
|
|
binder_use(atrace)
|
|
allow atrace healthd:binder call;
|
|
allow atrace surfaceflinger:binder call;
|
|
')
|