Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting 'Permission denied (13)' when trying to use systrace on Moto X with KitKat

I'm following http://developer.android.com/tools/debugging/systrace.html but can't run systrace on my Moto X (KitKat). Any ideas?

$ python systrace.py --time=10 -o mynewtrace.html gfx view wm


error opening /sys/kernel/debug/tracing/options/overwrite: Permission denied (13)
error opening /sys/kernel/debug/tracing/buffer_size_kb: Permission denied (13)
error opening /sys/kernel/debug/tracing/trace_clock: Permission denied (13)
error opening /sys/kernel/debug/tracing/tracing_on: Permission denied (13)
error opening /sys/kernel/debug/tracing/tracing_on: Permission denied (13)
unable to start tracing
error opening /sys/kernel/debug/tracing/options/overwrite: Permission denied (13)
error opening /sys/kernel/debug/tracing/buffer_size_kb: Permission denied (13)
error opening /sys/kernel/debug/tracing/trace_clock: Permission denied (13)
No data was captured.  Output file was not written.
like image 988
Foxichu Avatar asked Dec 11 '13 22:12

Foxichu


1 Answers

Certain OEMs have disabled systrace without root permissions in several android versions. Samsung has done this with android 4.3 on the Exynos Galaxy S4. No word on why or if it'll be resolved.

You will need to root your device to access this.

EDIT:

As a further answer to this - many devices with Mediatek chipsets have not enabled systrace in the kernel options. This is due to the fact that Mediatek provides a turn-key solution to OEMs with systrace unchecked. Many OEMs do not change this setting when they receive the pre-configuration.

like image 138
Xarus Avatar answered Sep 16 '22 16:09

Xarus