手动获取截图和uix文件到 UI Automator Viewer 解析

来源:互联网 发布:天津市软件协会 编辑:程序博客网 时间:2024/06/17 02:36

在ubuntu环境开发,没找到UI Automator Viewer

想到UI Automator Viewer支持导入 xml资源 和 截图
同时该方法也适用于 即时获取设备截图时报错的情况

dump资源文件 再导出到本地

adb shell uiautomator dump /data/local/tmp/app.uixadb pull /data/local/tmp/app.uix /home/xd/geather/app.uix

获取截图 导出

adb shell screencap -p /data/local/tmp/app.pngadb pull /data/local/tmp/app.png /home/xd/geather/app.png

传到Window里,有了截图文件和资源文件,点击UI Automator Viewer菜单栏第一个图标即可导入解析,分析UI

原创粉丝点击