Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e020de1a authored by Felipe Leme's avatar Felipe Leme
Browse files

Improvements on dumpsys activity:

- Fixed missing return on invalid option
- Added displayId to TASK lines
- Added --verbose option, which shows displayId/type, uid, and userId
  to ACTIVITY lines
- Added -d option to filter by display id
- Fixed missing help (for `activity users`)

Examples:

$ adb shell dumpsys activity --doh
Unknown argument: --doh; use -h for help

$ adb shell dumpsys activity top | grep TASK
TASK 10174:com.android.systemui id=1000031 userId=0 displayId=2(type=INTERNAL)
TASK 1410158:com.google.android.car.setupwizard id=1000033 userId=14 displayId=2(type=INTERNAL)
TASK 1000:com.android.car.settings id=3 userId=0 displayId=0(type=INTERNAL)
TASK 1010110:com.android.car.carlauncher id=1000002 userId=10 displayId=0(type=INTERNAL)
TASK 1010096:com.android.car.multidisplay id=1000034 userId=10 displayId=0(type=INTERNAL)

$ adb shell dumpsys activity --verbose top | grep ACTIVITY
  ACTIVITY com.android.systemui/.car.userpicker.UserPickerActivity 80de779 pid=31900 userId=0 uid=10174 displayId=2(type=INTERNAL)
  ACTIVITY com.google.android.car.setupwizard/.welcome.WelcomeActivity 318894d pid=6945 userId=14 uid=1410158 displayId=2(type=INTERNAL)
  ACTIVITY com.android.car.settings/.FallbackHome 6d79487 pid=31522 userId=0 uid=1000 displayId=0(type=INTERNAL)
  ACTIVITY com.android.car.carlauncher/.CarLauncher b7890fd pid=1106 userId=10 uid=1010110 displayId=0(type=INTERNAL)
  ACTIVITY com.android.car.multidisplay/.launcher.LauncherActivity b37ab52 pid=7554 userId=10 uid=1010096 displayId=0(type=INTERNAL)

$ adb shell dumpsys activity a | grep 'Display #'
Display #2 (activities from top to bottom):
Display #0 (activities from top to bottom):

$ adb shell dumpsys activity -d 2 a | grep 'Display #'
Display #2 (activities from top to bottom):

$ adb shell dumpsys activity -d 42 visible
ACTIVITY MANAGER VISIBLE ACTIVITIES (dumpsys activity visible)
(nothing)

Test: see examples above
Fixes: 143499144

Change-Id: Ib662f8d1b4ff915ac7dae1713dd1890670561251
parent 627b877c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment