美文网首页
android 8.0 以后 uiautomator 无法直接使

android 8.0 以后 uiautomator 无法直接使

作者: 辉色投像 | 来源:发表于2020-07-07 09:27 被阅读0次

android8.1以后sdk tools自带的uiautomator直接打开,截取不到设备界面信息。

可以使用以下方法手动截取。

首先操作设备定位到要分析的界面。

1.截取uix资源文件

adb shell uiautomator dump /sdcard/screen.uix

adb pull /sdcard/screen.uix D:/screen.uix

2.截取截图

adb shell screencap -p /sdcard/screen.png

adb pull /sdcard/screen.png D:/screen.png

运行sdk/tools目录下的uiautomatorviewer.bat,导入从设备获取的截图和资源文件

转载:https://www.cnblogs.com/copyworker/p/11043705.html

相关文章

网友评论

      本文标题:android 8.0 以后 uiautomator 无法直接使

      本文链接:https://www.haomeiwen.com/subject/msooqktx.html