Android 编程使用shell命令

                sh = Runtime.getRuntime().exec("su");
                OutputStream os = sh.getOutputStream();
                os.write("xxxx\n".getBytes("ASCII"));

使用root权限,执行shell命令(如上面举例的xxxx)。

posted on 2012-05-10 22:05  爱老婆_爱工作  阅读(468)  评论(0)    收藏  举报

导航