0

I'm logged into an android device via ADB wireless and I'm root. I'm in /sys/devices/platform/musb_hdrc/ trying to modify a file called mode. When I pipe something into the file, it returns without error, but the file is unmodified. And when I pipe something into a new file, I get "directory nonexistent". What's going on?

# ls -l mode
-rwxrwxrwx root     root         4096 2012-11-11 14:39 mode
# cat mode
b_peripheral
# echo foobar
foobar
# echo foobar > mode
# cat mode
b_peripheral
# echo foobar > myfile
cannot create myfile: directory nonexistent
# 
Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
themirror
  • 9,963
  • 7
  • 46
  • 79

1 Answers1

1

/sys is not a real directory with real files, it's the convenient interface to the kernel functions, exported as file system. some files are writable, but most of them are read-only and you're not supposed to create any files there yourself because, once again, it's not a real file system.

lenik
  • 23,228
  • 4
  • 34
  • 43