码迷,mamicode.com
首页 > 其他好文 > 详细

查看activity task相关信息

时间:2015-09-24 14:32:34      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:

可以使用命令

adb shell dumpsys activity

 

查看的结果如下

ACTIVITY MANAGER PENDING INTENTS (dumpsys activity intents)
  * PendingIntentRecord{42deee60 com.android.systemui startActivity}
  * PendingIntentRecord{42eb97e0 com.miui.systemAdSolution broadcastIntent}
  * PendingIntentRecord{42f449b0 com.tencent.mobileqq broadcastIntent}
  * PendingIntentRecord{42dd5978 com.miui.securitycenter startService}
  * PendingIntentRecord{427d0fa8 android broadcastIntent}
  * PendingIntentRecord{42e21218 com.amazon.kindle startActivity}
  * PendingIntentRecord{42e0d6d8 com.cleanmaster.sdk broadcastIntent}
  * PendingIntentRecord{427796e0 com.tencent.mobileqq broadcastIntent}
  * PendingIntentRecord{42dc5660 com.miui.securitycenter startService}
  * PendingIntentRecord{429d5350 com.xiaomi.xmsf startService}
  * PendingIntentRecord{42cf74f0 android startActivity}
........

ACTIVITY MANAGER BROADCAST STATE (dumpsys activity broadcasts)
  Historical broadcasts [foreground]:
  #0: BroadcastRecord{430d3e20 u-1 android.intent.action.SCREEN_OFF}
    act=android.intent.action.SCREEN_OFF flg=0x50000010
  #1: BroadcastRecord{433c4ad8 u-1 android.intent.action.SCREEN_ON}
    act=android.intent.action.SCREEN_ON flg=0x50000010
  #2: BroadcastRecord{4344fa98 u-1 android.intent.action.TIME_TICK}
    act=android.intent.action.TIME_TICK flg=0x50000014 (has extras)
    extras: Bundle[{android.intent.extra.ALARM_COUNT=1}]
..........

ACTIVITY MANAGER CONTENT PROVIDERS (dumpsys activity providers)
  Published single-user content providers (by class):
  * ContentProviderRecord{42528fb0 u0 com.android.systemui/.statusbar.NotificationProvider}
    proc=ProcessRecord{42514e70 1015:com.android.systemui/1000}
    singleton=true
    authority=keyguard.notification
  * ContentProviderRecord{42d01b00 u0 com.android.phone/.IccProvider}
    proc=ProcessRecord{42cc9f18 1242:com.android.phone/1001}
    singleton=true
    authority=icc
  * ContentProviderRecord{42bc6ed0 u0 com.android.providers.settings/.SettingsProvider}
    proc=ProcessRecord{42617810 939:system/1000}
    singleton=true
    authority=settings
..........
ACTIVITY MANAGER SERVICES (dumpsys activity services)
  User 0 active services:
  * ServiceRecord{42dbc130 u0 com.android.mms/.transaction.SmsReportService}
    app=ProcessRecord{425256b0 27353:com.android.mms/u0a18}
    created=-17h0m47s339ms started=true connections=0
  * ServiceRecord{42f2bc38 u0 com.android.settings/.wifi.MiuiWifiService}
    app=ProcessRecord{42d3bc58 1066:com.android.settings/1000}
    created=-17h0m39s273ms started=true connections=0
  * ServiceRecord{42d84600 u0 com.qualcomm.location/com.qualcomm.lib.location.osagent.OsAgent}
    app=ProcessRecord{42617810 939:system/1000}
..........
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
  Stack #0:
    Task id #1
      TaskRecord{42d39920 #1 A=com.miui.home U=0 sz=1}
      Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10e00000 cmp=com.miui.home/.launcher.Launcher }
        Hist #0: ActivityRecord{42cf02f0 u0 com.miui.home/.launcher.Launcher t1}
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10800000 cmp=com.miui.home/.launcher.Launcher }
          ProcessRecord{42507930 1288:com.miui.home/u0a16}

    Running activities (most recent first):
      TaskRecord{42d39920 #1 A=com.miui.home U=0 sz=1}
        Run #0: ActivityRecord{42cf02f0 u0 com.miui.home/.launcher.Launcher t1}
..........

里面包含的是关于android 四大组件的相关信息。

如果我们想查询里面单独的一项,只需要执行每一项后面提示的名利就好了。如activity堆栈信息,我们就可以使用

ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)

adb shell dumpsys activity activities

查看activity task相关信息

标签:

原文地址:http://www.cnblogs.com/zhangshuli-1989/p/zhangshuli_dumpsys_15924133.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!