Android adb命令打印activity堆栈
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