Search code examples
androidshelladb

Can't use Android shell atrace command because of write access


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 !


Solution

  • 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,