开发者

Starting shell from android app to run separate executable

I want to start shell from android application because i want to run an executable file and pass few arguments and expect output.

I tried ProcessBuilder and process and run at runtime listenin开发者_运维知识库g to their io stream but android app does not allowing me to start shell is this permission issue??

I am getting all the time

runCommand error: Error running exec(). Command: [su] Working Directory: null Environment: null

Is there a way to run shell as an interface between running app as a process and process will be started from shell?

Shed some light on this issue thanks


Actually, when you use the "su" hack what you are getting is a shell that runs as root (if the device has been modified to support that)

If you don't want a root shell but an ordinary one running as your application's userid, you could presumably run /system/bin/sh or whatever it is on your device instead of su.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜