3

If I try atrace tool from adb shell in emulator:

# atrace
atrace
error opening /sys/kernel/debug/tracing/options/overwrite: No such file or direc
tory (2)

If I do :

#mount -t debugfs nodev /sys/kernel/debug
#mount: No such file or directory

If I try to make the folder :

#mkdir -p /sys/kernel/debug
#mkdir failed for /sys/kernel/debug/, No such file or directory

So apparently I don't have write access even if I'm root....

Edit:

I can create folder in /data/ path but no in /sys/ path...

Has anybody be able to create folder in /sys/ path in emulator environment?

Any help ?

Thanks !

Rodmar Conde
  • 956
  • 1
  • 12
  • 24
  • 2
    I suspect that atrace requires a kernel option that is not available in the emulator build. "No such file or directory" should really mean does not exist. "Permission denied" would be the case that requires permissions. You also can't create directories in the sys-fs. It is an interface provided by the kernel, not a "real" filesystem – zapl Nov 22 '12 at 15:51
  • Thank you! I've created some folders in /data folder but I can't create folders in /sys folder... Do you know if it is a "emulator configuration" problem or I will need to recompile Android's Platform Code in order to have this option available? – Rodmar Conde Nov 28 '12 at 09:34
  • 1
    Yes, it is a configuration problem. `atrace` seems to be intended for device manufacturers, linux kernel developers, ... but not app developer. So atrace support is not enabled in the emulator. You would need to recompile the platform and specifically the kernel. The kernel can be compiled with different configurations and you need to enable some debug options. http://lwn.net/Articles/365835/ is very similar – zapl Nov 28 '12 at 10:23
  • show the output of 'mount' command. – Alex P. Feb 15 '13 at 20:56

1 Answers1

4

In the provided emulator this is not possible because Linux kernel compilation was done without activating TRACING OPTIONS.

In order to be able, it is necessarily to recompile Linux kernel activating the required options.

Steps can be found here:

http://www.linuxforu.com/2010/11/kernel-tracing-with-ftrace-part-1/

P.S. Thanks to @zapl and other involved guys.

Regards,

Rodmar Conde
  • 956
  • 1
  • 12
  • 24