exec shell failed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

exec shell failed

547 Views
shishui
Contributor I

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.

Labels (1)
0 Kudos
2 Replies

424 Views
jimmychan
NXP TechSupport
NXP TechSupport

which i.MX chip are you using?

which board are you using?

Android 4.4 is too old. I would suggest you to use the latest BSP.

0 Kudos

424 Views
shishui
Contributor I

i.mx chip :im6q.

board :sabresd_6dq .

Android 4.4 has no official maintenance yet. 

0 Kudos