adb shell 用 uiautomator 获取微信页面的问题报错

var shell = require('shelljs');

shell.exec('adb shell uiautomator dump /sdcard/dump.xml');

在执行:'adb shell uiautomator dump /sdcard/dump.xml' 这个命令时有一定几率报错,

错误信息如下:ERROR: null root node returned by UiTestAutomationBridge.

手机系统是 MIUI11

有没有大佬懂的,帮忙看看。谢谢!

adb shell uiautomator dump /data/local/tmp/uidump.xml