Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0bfea66 authored by Primiano Tucci's avatar Primiano Tucci
Browse files

Enable to access the set_event interface on userdebug

On userdebug we need to access all ftrace events
from non-root (perfetto runs as non-root).
Conversely to the "user" case, a whitelist doesn't
suffice here because in many cases the events are
device-specific and cannot possibly be known upfron
by the platform.

Bug: 122609457
Test: manual
Change-Id: I24b5f04e0c651045e04e62e96be7373ffcdaa7f7
parent 4ffbaac8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5,6 +5,12 @@
# Access control to these files is now entirely in selinux policy.

on post-fs
    # On userdebug allow to enable any event via the generic
    # set_event interface:
    # echo sched/foo > set_event == echo 1 > events/sched/foo/enable.
    chmod 0666 /sys/kernel/tracing/set_event
    chmod 0666 /sys/kernel/debug/tracing/set_event

    chmod 0666 /sys/kernel/tracing/events/workqueue/enable
    chmod 0666 /sys/kernel/debug/tracing/events/workqueue/enable
    chmod 0666 /sys/kernel/tracing/events/regulator/enable