ubuntu系統:
adb shell dumpsys activity activities | sed -En -e '/Running activities/,/Run #0/p'
window系統:
方法一:
adb shell 進入,然后執行:
dumpsys activity activities | sed -En -e '/Running activities/,/Run #0/p'
方法二:添加引號
adb shell "dumpsys activity activities | sed -En -e '/Running activities/,/Run #0/p'"
方法三:
adb shell dumpsys activity | findstr Run