我想用下面的代码来截取我的设备屏幕截图,也就是根屏幕:
process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(process.getOutputStream());
os.writeBytes("/system/bin/screencap -p " + path + "; \n"); 这段代码在Motorola Zoom上运行良好,因为Zoom在/ system/bin /screencap路径下有截屏,但在android 2.3.6的华为ascend上,system/bin中没有截屏文件,所以我无法在华为上截屏。请建议我,如何在我的华为设备上截图。
发布于 2013-03-26 18:41:10
如果这些设备基于相同的CPU系列,你可以尝试从你的Zoom中提取录屏二进制文件,并将其推送到你的Ascend。
或者,你也可以自己构建录屏工具(或者一些做同样事情的程序)。我是open source after all。
https://stackoverflow.com/questions/15634610
复制相似问题