《Android uiautomatorviewer不能截图》

Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Permission denied

自家应用还老出问题。也是崩溃了。

《Android uiautomatorviewer不能截图》

uiautomator 提供对应命令可以dump界面信息。
编写对应脚本文件,执行就完事了。
再给该脚本起个命名,方便使用。

#!/bin/sh

builddate=`date '+%Y%m%d%H%M'`

adb shell uiautomator dump /sdcard/app.uix
adb pull /sdcard/app.uix ./app${builddate}.uix
#存到E盘的app.uix文件中,在E盘新建一个文本文档改成app.uix
adb shell screencap -p /sdcard/app.png
adb pull /sdcard/app.png ./app${builddate}.png

相关文章:

  • 2022-12-23
  • 2021-09-04
  • 2021-08-28
  • 2021-04-15
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
猜你喜欢
  • 2022-01-26
  • 2021-07-20
  • 2021-08-14
  • 2022-12-23
  • 2021-09-05
  • 2021-11-16
  • 2022-02-01
相关资源
相似解决方案