I am trying to figure out some code that I was given. Can someone tell me what this means?
process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
Especially the su.
Thanks!
I am trying to figure out some code that I was given. Can someone tell me what this means?
process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
Especially the su.
Thanks!
Used without any other kind of parameter, su changes the user ID to 0 (superuser) but does not change current path or environment.
It's a Unix command. It is used to switch active users. See for instance this manual page for details on what the command does. The Wikipedia page has some discussion about what the command name is believed to mean. I thought it was "switch user", but it wasn't that simple.