Running Android systrace on device
Asked Answered
E

3

2

I'm unable to run the Android SDK tool called systrace.pl because I get errors like:

error opening /sys/kernel/debug/tracing/options/overwrite: No such file or directory 

And indeed the /sys/kernel/debug/tracing directory doesn't even exist.

A little research showed I need to enable debugfs with the following command:

mount -o rw,remount -t debugfs none /sys/kernel/debug

Running mount there afterwards indicates the debugfs is running:

#mount
...
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
...

And I have trace enabled (all items) in the developer settings menu. I'm using the stock ROM 4.1.1 on a Samsung Galaxy S3.

There's a lot of articles out there on systrace for Android but nothing seems to solve the problem of no files actually being generated in /sys/kernel/debug/tracing...

Enthronement answered 20/6, 2013 at 7:36 Comment(5)
Does $ adb shell atrace --list-categories work?Steamtight
with my configuration works but from Eclipse I get same errorShoeblack
@dtmilano atrace: unrecognized option `--list-categories'Butler
'$adb shell atrace --help' ?Steamtight
It's just a typo. The command is $ adb shell atrace --list_categoriesMedorra
P
1

Take a look at this document:

Tracing on Android 4.3 and higher

To run a trace on Android 4.3 and higher devices:

Make sure the device is connected through a USB cable and is enabled for debugging.

I think that systrace must be run on a device, not an emulator. I'm getting the same error in my emulator.

Propylaeum answered 30/11, 2013 at 9:27 Comment(1)
Why would this not be allowed to run on an emulator? I don't get it - what were the engineers thinking in creating this limitation...Butler
U
1

Answered the same question below:

Make Systrace work with 4.1.2 device on Mac

Looks like your systrace is not enabled on the kernel your device is running, you need to replace your boot.img with one that has systrace support.

Usurp answered 17/4, 2014 at 22:9 Comment(0)
R
0

You don't have access to that categories that you have selected.

use following command to check what all categories that current device can support.

$python systrace.py -l 

     gfx - Graphics
   input - Input
    view - View System
 webview - WebView
      wm - Window Manager
      am - Activity Manager
      sm - Sync Manager
   audio - Audio
   video - Video
  camera - Camera
     hal - Hardware Modules
     app - Application
     res - Resource Loading
  dalvik - Dalvik VM
      rs - RenderScript
  bionic - Bionic C Library
   power - Power Management

root and remount the device before running above command.

adb root
adb remount
Rustie answered 22/5, 2015 at 17:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.