80,337
社区成员
发帖
与我相关
我的任务
分享
String cmd = "screencap -p " + strFileFullPath;
LogUtil.d(TAG, "takeScreenshotByShell cmd: %s", cmd);
try {
File fileFolder = new File(CACHED_IMAGE_DIR);
if (!fileFolder.exists()) {
fileFolder.mkdirs();
}
process = Runtime.getRuntime().exec(cmd);
//......
}
需要su权限,或者root
运行命令需要权限的