Systrace '/sys/kernel/debug/tracing/tracing_on' does not exist
Asked Answered
M

1

9

I'm trying to use the systrace tool on the command line on my non-rooted Nexus 4 device running Lollipop 5.1.1. It appears that when I try to run commands such as:

systrace.py --time=4 -o testtrace.html sched app freq idle load

I get the following error:

CRITICAL:root:(TimeoutThread-1-for-Thread-1) Exception on ReadFile(01a599f5919448ea,
/sys/kernel/debug/tracing/tracing_on, retries=3, timeout=30),
attempt 1 of 4: AdbCommandFailedError("(device: 01a599f5919448ea) adb pull 
/sys/kernel/debug/tracing/tracing_on /var/folders/dj/xq_jq3wx6hg9gzw5r9svkmr00000gn/T/tmpGxH9ji/tmp_ReadFileWithPull: 
failed with exit status 1 and output:\n- adb: error: remote object '/sys/kernel/debug/tracing/tracing_on' does not exist\n",)
...
...
- adb: error: remote object '/sys/kernel/debug/tracing/tracing_on' does not exist

However, when I use the adb command:

adb shell /sys/kernel/debug/tracing/

I can confirm that the file 'tracing_on' exists.

Although, the systrace tool does work fine on the Android Device Monitor. The reason I want to use the command line is because I would like to programatically call the tool to analyse my application.

When I tried running the exact same command on other devices such as Oneplus 3 or Samsung Galaxy s6, the tool works perfectly and it is able to generate the html file. It is just on this device and Samsung galaxy s4 which generates the same error.

Any help is appreciated.

Mages answered 17/7, 2017 at 16:33 Comment(0)
S
0

I had the same problem and restarted my adb session as root:

adb root

that did it for me.

Sequence answered 17/1, 2018 at 20:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.