View activity stack in Android
30,761
To display the activity stack, run the following command :
adb shell dumpsys activity activities
Author by
hpique
iOS, Android & Mac developer. Founder of Robot Media. @hpique
Updated on July 05, 2022Comments
-
hpique almost 2 years
Is it possible to view the activity stack in Android for debugging purposes?
-
Kevin McMahon over 11 yearsand 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. -
loeschg over 11 yearsBuilding off this, this piped command is quite handy (from another SO thread)
adb shell dumpsys activity | grep -i run
-
Gagandeep Singh over 8 yearsadb shell dumpsys activity | grep -i 'run' | grep -i 'com.example.package'
-
Nathan H about 8 yearsis there a way to watch it live and not a snapshot? Things are happening too fast...
-
Mr. Bungle almost 8 years@Nathan H - assuming you are on linux, you can use the watch command:
watch -n 1 "adb shell dumpsys activity | grep -i com.yourapp"
-
Vikas Pandey over 7 yearswhere do i run this command?