Skip to content
Snippets Groups Projects
Commit 5beeb81e authored by Nick Kralevich's avatar Nick Kralevich
Browse files

init.te: allow writing to /sys/kernel/debug/tracing/tracing_on

Needed to disable tracing. See frameworks/native/cmds/atrace/atrace.rc

Also allow shell getattr access to the tracing file. That way
"ls -la" returns something meaningful.

Bug: 26217098
Change-Id: I4eee1aff1127db8945612133c8ae16c34cfbb786
parent d48773ab
No related branches found
No related tags found
No related merge requests found
...@@ -108,6 +108,9 @@ allow init { sysfs_type debugfs_type }:{ dir file lnk_file } relabelto; ...@@ -108,6 +108,9 @@ allow init { sysfs_type debugfs_type }:{ dir file lnk_file } relabelto;
allow init dev_type:dir create_dir_perms; allow init dev_type:dir create_dir_perms;
allow init dev_type:lnk_file create; allow init dev_type:lnk_file create;
# Disable tracing by writing to /sys/kernel/debug/tracing/tracing_on
allow init debugfs_tracing:file w_file_perms;
# chown/chmod on pseudo files. # chown/chmod on pseudo files.
allow init { fs_type -contextmount_type -sdcard_type -rootfs }:file { open read setattr }; allow init { fs_type -contextmount_type -sdcard_type -rootfs }:file { open read setattr };
allow init { fs_type -contextmount_type -sdcard_type -rootfs }:dir { open read setattr search }; allow init { fs_type -contextmount_type -sdcard_type -rootfs }:dir { open read setattr search };
......
...@@ -71,6 +71,7 @@ set_prop(shell, powerctl_prop) ...@@ -71,6 +71,7 @@ set_prop(shell, powerctl_prop)
# systrace support - allow atrace to run # systrace support - allow atrace to run
allow shell debugfs_tracing:dir r_dir_perms; allow shell debugfs_tracing:dir r_dir_perms;
allow shell debugfs_tracing:file rw_file_perms; allow shell debugfs_tracing:file rw_file_perms;
allow shell debugfs_trace_marker:file getattr;
allow shell atrace_exec:file rx_file_perms; allow shell atrace_exec:file rx_file_perms;
userdebug_or_eng(` userdebug_or_eng(`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment