Reputation: 310
I have download Android source code and flashed it to device. I have written LKM which reads/writes information to /proc/myFile. I want to write to /proc/myFiLE file from my android activity but using java code not native. I know in native code we can can use system( )
system call to write using echo command but i do not know that how to write from java code? Thanks in advance.
Upvotes: 0
Views: 1382
Reputation: 34145
Just treat them as normal files. You can use the usual File
and *Stream
objects to write what you need.
Upvotes: 2
Reputation: 4725
You can use something like this.
Runtime.getRuntime().exec("your command")
Upvotes: 0