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

android 8.0 以后 uiautomator 无法直接使

作者: Roshan_ | 来源:发表于2020-12-18 15:07 被阅读0次

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

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

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

1.截取uix资源文件

adb shell uiautomator dump /sdcard/000/screen.uix

adb pull /sdcard/000/screen.uix D:/截图/screen.uix

2.截取截图

adb shell screencap -p /sdcard/000/screen.png

adb pull /sdcard/000/screen.png D:/截图/screen.png

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

相关文章

网友评论

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

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