2013-03-29 136 views

回答

0
adb shell /system/bin/screencap -p /sdcard/img.png this is a shell command take screenshot simple and fast 

Try this 

Process sh = Runtime.getRuntime().exec("su", null,null); 
OutputStream os = sh.getOutputStream(); 
os.write(("/system/bin/screencap -p " + "/sdcard/img.png").getBytes("ASCII")); 
      os.flush(); 
      os.close(); 
      sh.waitFor(); 
+0

我已经实现了相同的代码,但得到空白屏幕的问题 – user2211088