adb shell 命令返回'grep' 不是内部或外部命令,也不是可运行的程序

C:\Users\Vicky>adb shell dumpsys window windows | grep mCurrent
'grep' 不是内部或外部命令,也不是可运行的程序或批处理文件。

解决方法:在adb shell 后面的内容加上双引号就不会报错啦

C:\Users\Vicky>adb shell "dumpsys window windows|grep mCurrent"
mCurrentFocus=Window{cd554b4 u0 com.alibaba.android.rimet/com.alibaba.android.rimet.biz.home.activity.HomeActivity}

猜你喜欢

转载自www.cnblogs.com/vicky94715/p/12052853.html