AnsweredAssumed Answered

exec shell failed

Question asked by shi shui on Dec 27, 2018
Latest reply on Jan 16, 2019 by shi shui

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.

Outcomes