android sysytem/bin/input

东九的鸟 发布于 2013/09/05 19:48
阅读 361
收藏 0

input tap 200 200在pc shell里面执行可以模拟屏幕点击,写入代码后就不行了,求各位高人看看有啥错误=。=

String cmd = "chmod 777 /system/bin/input "; 

String[] command = new String[]{"su","input tap 200 200"}; 
process1 = Runtime.getRuntime().exec(command); 

os = new DataOutputStream(process1.getOutputStream()); 

//byte[] by = new byte[1024]; 

//os.write(by); 
os.writeBytes(cmd+"\n"); 
//Log.d("打印流",String.valueOf(by)); 
Log.d("进入了命令command", "进入"); 
os.writeBytes("exit\n"); 
os.flush(); 
process1.waitFor(); 
加载中
返回顶部
顶部