Pregunta

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.
¿Fue útil?

Solución

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.

Otros consejos

Use these commands, it will work

adb root adb wait-for-device remount adb shell su root setenforce 0

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top