uiautomatorviewer.bat 工具出现 Permission denied问题

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

SDK自带的uiautomatorviewer.bat 工具出现 Permission denied问题,解决方法。

adb shell uiautomator dump /sdcard/screen.uix
adb pull /sdcard/screen.uix C:\
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png C:\
pause

将上述代码编入一个bat文件,会在C:\生成对应的一个图片及uix文件,重新打开uiautomatorviewer.bat 工具点击open,依次打开

screen.png,screen.uix,即可获得元素

posted @ 2019-10-28 16:21  Gex  阅读(509)  评论(0编辑  收藏  举报