Android adb截屏命令

adb 中screencap命令用来截屏 命令如下:

SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                        String date = simpleDateFormat.format(new Date(System.currentTimeMillis()));
 Runtime.getRuntime().exec("screencap -p /sdcard/" + date.replaceAll(" ", "-") + ".png");

你可能感兴趣的:(android)