Is it possible to view the activity stack in Android for debugging purposes?
Asked
Active
Viewed 3.1k times
72
-
this is a duplicate of http://stackoverflow.com/questions/2442713/view-the-tasks-activity-stack – andr Dec 07 '12 at 06:16
1 Answers
131
To display the activity stack, run the following command :
adb shell dumpsys activity activities
Dalmas
- 26,011
- 9
- 66
- 78
-
5and if you do `adb shell dumpsys activity activities` you'll get a smaller amount of info which includes the running tasks, activities and recent tasks. – Kevin McMahon Nov 16 '12 at 01:39
-
48Building off this, this piped command is quite handy (from another SO thread) `adb shell dumpsys activity | grep -i run` – loeschg Dec 03 '12 at 21:03
-
adb shell dumpsys activity | grep -i 'run' | grep -i 'com.example.package' – Gagandeep Singh Jan 08 '16 at 10:02
-
2is there a way to watch it live and not a snapshot? Things are happening too fast... – Nathan H Apr 06 '16 at 10:40
-
6@Nathan H - assuming you are on linux, you can use the watch command: `watch -n 1 "adb shell dumpsys activity | grep -i com.yourapp"` – Mr. Bungle May 31 '16 at 10:09
-
2