문제

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.
도움이 되었습니까?

해결책

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.

다른 팁

Use these commands, it will work

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top