1. 问题 adb shell查看进程提示grep不是内部命令或外部命令 2. 解决办法 把adb shell 后面的语句加上引号即可 adb shell "dumpsys activity | grep \"mFocusedActivity\""