android 4.4 os app code run shell order:
Process p = Runtime.getRuntime().exec("/system/bin/sh");
OutputStream os = p.getOutputStream();
DataOutputStream dos = new DataOutputStream(os);
dos.writeBytes("system/bin/ifconfig usb0 down");
dos.writeBytes("exit\n");
dos.flush();
dos.close();
The network card usb0 is not closed. has not Exception.
at shell commande line is successed.
please what's the reason.