Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> 關於Android編程 >> Android系統getprop、dumpsys等相關命令的理解

Android系統getprop、dumpsys等相關命令的理解

編輯:關於Android編程

通過上一篇理解及使用adb知道通過adb 工具來調試android 程序。

這裡講一下,用android提供的一些命令來調試android程序。

getprop

此命令的原理很簡單,就是從系統的各種配置文件中讀取信息。那麼這些文件在你用adb shell進入設備內部後很容易找到,它們是:

init.rc

default.prop

/system/build.prop

在android studio 中就有終端這個窗口直接執行命令就行。標注的三個文件可以通過adb pull命令拷貝到本地直接查看。

在命令行執行getprop命令,則會輸出很多系統信息:

root@generic_x86_64:/ # getprop                                                
[dalvik.vm.dex2oat-Xms]: [64m]
[dalvik.vm.dex2oat-Xmx]: [512m]
[dalvik.vm.heapsize]: [384m]
[dalvik.vm.image-dex2oat-Xms]: [64m]
[dalvik.vm.image-dex2oat-Xmx]: [64m]
[dalvik.vm.isa.x86.features]: [default]
[dalvik.vm.isa.x86_64.features]: [default]
[dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
[debug.force_rtl]: [0]
[dev.bootcomplete]: [1]
[gsm.current.phone-type]: [1]
[gsm.defaultpdpcontext.active]: [true]
[gsm.network.type]: [LTE]
[gsm.nitz.time]: [1475979333788]
[gsm.operator.alpha]: [Android]
[gsm.operator.iso-country]: [us]
[gsm.operator.isroaming]: [false]
[gsm.operator.numeric]: [310260]
[gsm.sim.operator.alpha]: [Android]
[gsm.sim.operator.iso-country]: [us]
[gsm.sim.operator.numeric]: [310260]
[gsm.sim.state]: [READY]
[gsm.version.ril-impl]: [android reference-ril 1.0]
[init.svc.adbd]: [running]
[init.svc.bootanim]: [stopped]
[init.svc.console]: [running]
[init.svc.debuggerd64]: [running]
[init.svc.debuggerd]: [running]
[init.svc.drm]: [running]
[init.svc.fuse_sdcard]: [running]
[init.svc.goldfish-logcat]: [stopped]
[init.svc.goldfish-setup]: [stopped]
[init.svc.healthd]: [running]
[init.svc.installd]: [running]
[init.svc.keystore]: [running]
[init.svc.lmkd]: [running]
[init.svc.logd]: [running]
[init.svc.media]: [running]
[init.svc.netd]: [running]
[init.svc.qemu-props]: [stopped]
[init.svc.ril-daemon]: [running]
[init.svc.servicemanager]: [running]
[init.svc.surfaceflinger]: [running]
[init.svc.ueventd]: [running]
[init.svc.vold]: [running]
[init.svc.zygote]: [running]
[init.svc.zygote_secondary]: [running]
[net.bt.name]: [Android]
[net.change]: [net.dns1]
[net.dns1]: [10.0.2.3]
[net.eth0.dns1]: [10.0.2.3]
[net.eth0.gw]: [10.0.2.2]
[net.gprs.local-ip]: [10.0.2.15]
[net.hostname]: [android-93d1c81711d80225]
[net.qtaguid_enabled]: [0]
[net.tcp.default_init_rwnd]: [60]
[persist.sys.country]: [US]
[persist.sys.dalvik.vm.lib.2]: [libart.so]
[persist.sys.language]: [en]
[persist.sys.localevar]: []
[persist.sys.profiler_ms]: [0]
[persist.sys.timezone]: [GMT]
[persist.sys.usb.config]: [adb]
[qemu.gles]: [1]
[qemu.hw.mainkeys]: [0]
[qemu.sf.fake_camera]: [none]
[qemu.sf.lcd_density]: [420]
[rild.libargs]: [-d /dev/ttyS0]
[rild.libpath]: [/system/lib/libreference-ril.so]
[ro.allow.mock.location]: [1]
[ro.baseband]: [unknown]
[ro.board.platform]: []
[ro.boot.hardware]: [ranchu]
[ro.bootloader]: [unknown]
[ro.bootmode]: [unknown]
[ro.build.characteristics]: [default]
[ro.build.date.utc]: [1469057378]
[ro.build.date]: [Wed Jul 20 23:29:38 UTC 2016]
[ro.build.description]: [sdk_google_phone_x86_64-eng 5.0.2 LSY66K 3079185 test-keys]
[ro.build.display.id]: [sdk_google_phone_x86_64-eng 5.0.2 LSY66K 3079185 test-keys]
[ro.build.fingerprint]: [generic_x86_64/sdk_google_phone_x86_64/generic_x86_64:5.0.2/LSY66K/3079185:eng/test-keys]
[ro.build.host]: [vpba16.mtv.corp.google.com]
[ro.build.id]: [LSY66K]
[ro.build.product]: [generic_x86_64]
[ro.build.tags]: [test-keys]
[ro.build.type]: [eng]
[ro.build.user]: [android-build]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [3079185]
[ro.build.version.release]: [5.0.2]
[ro.build.version.sdk]: [21]
[ro.com.google.locationfeatures]: [1]
[ro.config.alarm_alert]: [Alarm_Classic.ogg]
[ro.config.nocheckin]: [yes]
[ro.config.notification_sound]: [OnTheHunt.ogg]
[ro.crypto.state]: [unencrypted]
[ro.dalvik.vm.native.bridge]: [0]
[ro.debuggable]: [1]
[ro.factorytest]: [0]
[ro.hardware.audio.primary]: [goldfish]
[ro.hardware]: [ranchu]
[ro.kernel.android.checkjni]: [1]
[ro.kernel.android.qemud]: [1]
[ro.kernel.androidboot.hardware]: [ranchu]
[ro.kernel.clocksource]: [pit]
[ro.kernel.console]: [0]
[ro.kernel.qemu.gles]: [1]
[ro.kernel.qemu]: [1]
[ro.opengles.version]: [131072]
[ro.product.board]: []
[ro.product.brand]: [generic_x86_64]
[ro.product.cpu.abi]: [x86_64]
[ro.product.cpu.abilist32]: [x86]
[ro.product.cpu.abilist64]: [x86_64]
[ro.product.cpu.abilist]: [x86_64,x86]
[ro.product.device]: [generic_x86_64]
[ro.product.locale.language]: [en]
[ro.product.locale.region]: [US]
[ro.product.manufacturer]: [unknown]
[ro.product.model]: [Android SDK built for x86_64]
[ro.product.name]: [sdk_google_phone_x86_64]
[ro.radio.use-ppp]: [no]
[ro.revision]: [0]
[ro.runtime.firstboot]: [1475979331905]
[ro.secure]: [0]
[ro.serialno]: []
[ro.wifi.channels]: []
[ro.zygote]: [zygote64_32]
[selinux.reload_policy]: [1]
[service.bootanim.exit]: [1]
[status.battery.level]: [5]
[status.battery.level_raw]: [50]
[status.battery.level_scale]: [9]
[status.battery.state]: [Slow]
[sys.boot_completed]: [1]
[sys.sysctl.extra_free_kbytes]: [24300]
[sys.sysctl.tcp_def_init_rwnd]: [60]
[sys.usb.config]: [adb]
[sys.usb.state]: [adb]
[wlan.driver.status]: [unloaded]
[xmpp.auto-presence]: [true]

比如[ro.build.version.release]: [5.0.2] 系統版本,[ro.build.version.sdk]: [21] sdk版本[qemu.sf.lcd_density]: [420]設備屏幕密度

 

直接執行getprop輸出信息太多,可以選擇輸出某個你需要的,例如:

 

root@generic_x86_64:/ # getprop qemu.sf.lcd_density
420
root@generic_x86_64:/ # 

dumpsys

 

用於查看系統服務信息

 

我們可以直接執行dumpsys命令,會將所有服務信息都列出來。但是這樣得到的結果太多,不容易拿到有效的信息,可以在命令後面加上相應的參數來得到具體的服務信息。

使用下面的命令來查看可以dump出的所有service:

 

root@generic_x86_64:/ # dumpsys | grep DUMP
DUMP OF SERVICE DockObserver:
DUMP OF SERVICE SurfaceFlinger:
DUMP OF SERVICE accessibility:
DUMP OF SERVICE account:
DUMP OF SERVICE activity:
      Action: "com.android.inputmethod.latin.DICT_DUMP"
        com.android.inputmethod.latin.DICT_DUMP:
DUMP OF SERVICE alarm:
DUMP OF SERVICE android.security.keystore:
DUMP OF SERVICE appops:
DUMP OF SERVICE appwidget:
DUMP OF SERVICE assetatlas:
DUMP OF SERVICE audio:
DUMP OF SERVICE backup:
DUMP OF SERVICE battery:
DUMP OF SERVICE batteryproperties:
DUMP OF SERVICE batterystats:
DUMP OF SERVICE clipboard:
DUMP OF SERVICE commontime_management:
DUMP OF SERVICE connectivity:
DUMP OF SERVICE consumer_ir:
DUMP OF SERVICE content:
DUMP OF SERVICE country_detector:
DUMP OF SERVICE cpuinfo:
DUMP OF SERVICE dbinfo:
DUMP OF SERVICE device_policy:
DUMP OF SERVICE devicestoragemonitor:
DUMP OF SERVICE diskstats:
DUMP OF SERVICE display:
DUMP OF SERVICE dreams:
DUMP OF SERVICE drm.drmManager:
DUMP OF SERVICE dropbox:
DUMP OF SERVICE entropy:
DUMP OF SERVICE fingerprint:
DUMP OF SERVICE gfxinfo:
DUMP OF SERVICE hardware:
DUMP OF SERVICE imms:
DUMP OF SERVICE input:
DUMP OF SERVICE input_method:
DUMP OF SERVICE iphonesubinfo:
DUMP OF SERVICE isms:
DUMP OF SERVICE isub:
DUMP OF SERVICE jobscheduler:
DUMP OF SERVICE launcherapps:
DUMP OF SERVICE location:
DUMP OF SERVICE lock_settings:
DUMP OF SERVICE media.audio_flinger:
DUMP OF SERVICE media.audio_policy:
DUMP OF SERVICE media.camera:
DUMP OF SERVICE media.player:
DUMP OF SERVICE media.sound_trigger_hw:
DUMP OF SERVICE media_projection:
DUMP OF SERVICE media_router:
DUMP OF SERVICE media_session:
DUMP OF SERVICE meminfo:
DUMP OF SERVICE mount:
DUMP OF SERVICE netpolicy:
DUMP OF SERVICE netstats:
DUMP OF SERVICE network_management:
DUMP OF SERVICE network_score:
DUMP OF SERVICE notification:
DUMP OF SERVICE package:
      com.android.providers.contacts.DUMP_DATABASE:
      com.google.android.gms.people.DUMP_DATABASE:
  Permission [android.permission.DUMP] (3b71684d):
    perm=Permission{159f0f02 android.permission.DUMP}
      android.permission.DUMP
      android.permission.DUMP
      android.permission.DUMP
      android.permission.DUMP
DUMP OF SERVICE permission:
DUMP OF SERVICE phone:
DUMP OF SERVICE power:
DUMP OF SERVICE print:
DUMP OF SERVICE procstats:
DUMP OF SERVICE restrictions:
DUMP OF SERVICE rttmanager:
DUMP OF SERVICE samplingprofiler:
DUMP OF SERVICE scheduling_policy:
DUMP OF SERVICE search:
DUMP OF SERVICE sensorservice:
DUMP OF SERVICE serial:
DUMP OF SERVICE servicediscovery:
DUMP OF SERVICE simphonebook:
DUMP OF SERVICE statusbar:
DUMP OF SERVICE telecom:
DUMP OF SERVICE telephony.registry:
DUMP OF SERVICE textservices:
DUMP OF SERVICE trust:
DUMP OF SERVICE uimode:
DUMP OF SERVICE updatelock:
DUMP OF SERVICE usagestats:
DUMP OF SERVICE usb:
DUMP OF SERVICE user:
DUMP OF SERVICE vibrator:
DUMP OF SERVICE voiceinteraction:
DUMP OF SERVICE wallpaper:
DUMP OF SERVICE webviewupdate:
DUMP OF SERVICE wifi:
DUMP OF SERVICE wifip2p:
DUMP OF SERVICE wifiscanner:
DUMP OF SERVICE window:

從中可以看到我們常見的一些服務。 activity表示的是ActivityManagerService,用於管理應用程序的四大組件,window表示的是WindowManagerService,用於管理系統中的窗口.

 

使用 dumpsys [service]這樣格式,可以查看該服務的一些信息:

 

root@generic_x86_64:/ # dumpsys activity
ACTIVITY MANAGER PENDING INTENTS (dumpsys activity intents)
  * PendingIntentRecord{2a0600a3 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{19d21fa0 com.android.deskclock startActivity}
  * PendingIntentRecord{19da6759 android broadcastIntent}
  * PendingIntentRecord{15514f1e android broadcastIntent}
  * PendingIntentRecord{28ee03ff com.google.android.gms broadcastIntent}
  * PendingIntentRecord{8c995cc com.google.android.gms broadcastIntent}
  * PendingIntentRecord{11412015 com.google.android.gms startService}
  * PendingIntentRecord{15bf3f2a com.google.android.gms startService}
  * PendingIntentRecord{c28e11b com.google.android.gms broadcastIntent}
  * PendingIntentRecord{17e042b8 com.google.android.gms startService}
  * PendingIntentRecord{1120a891 com.android.deskclock broadcastIntent}
  * PendingIntentRecord{2f6a23f6 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{d6a73f7 android broadcastIntent}
  * PendingIntentRecord{db2d264 com.google.android.gms startService}
  * PendingIntentRecord{2e963ccd com.google.android.gms broadcastIntent}
  * PendingIntentRecord{300c8982 com.google.android.gms startService}
  * PendingIntentRecord{23c85893 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1bfcb0d0 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{3956d8c9 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{147dbbce com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1815eaef com.google.android.gms startService}
  * PendingIntentRecord{12c409fc android broadcastIntent}
  * PendingIntentRecord{2d6b3885 com.google.android.gms startService}
  * PendingIntentRecord{3dbdc6da com.google.android.gms broadcastIntent}
  * PendingIntentRecord{300470b com.google.android.gms startService}
  * PendingIntentRecord{1a45c9e8 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{4abd801 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{2ac176a6 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{10ea48e7 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1fa19c94 android broadcastIntent}
  * PendingIntentRecord{23fcf33d android startActivity}
  * PendingIntentRecord{2fe5732 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{27888c83 com.android.inputmethod.latin broadcastIntent}
  * PendingIntentRecord{2045ee00 com.google.android.gms startService}
  * PendingIntentRecord{204a8639 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{3db6b47e android broadcastIntent}
  * PendingIntentRecord{93d6ddf com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1bea2c com.google.android.gms broadcastIntent}
  * PendingIntentRecord{17444cf5 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{32059a8a android broadcastIntent}
  * PendingIntentRecord{123508fb com.google.android.gms broadcastIntent}
  * PendingIntentRecord{16737d18 com.google.android.gms startService}
  * PendingIntentRecord{17d9c371 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1baad556 android broadcastIntent}
  * PendingIntentRecord{2b4139d7 com.android.calendar broadcastIntent}
  * PendingIntentRecord{1daf52c4 com.android.providers.calendar broadcastIntent}
  * PendingIntentRecord{167625ad android broadcastIntent}
  * PendingIntentRecord{2096f0e2 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{e759c73 android broadcastIntent}
  * PendingIntentRecord{31b0d730 android broadcastIntent}
  * PendingIntentRecord{28fc6fa9 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{2337392e com.google.android.gms startService}
  * PendingIntentRecord{39838ccf com.google.android.gms broadcastIntent}
  * PendingIntentRecord{904365c com.google.android.gms broadcastIntent}
  * PendingIntentRecord{6835d65 com.android.music broadcastIntent}
  * PendingIntentRecord{2d81ba3a android startActivity}
  * PendingIntentRecord{29d626eb com.android.phone broadcastIntent}
  * PendingIntentRecord{14cc5c48 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{6d16ae1 android broadcastIntent}
  * PendingIntentRecord{c14006 android broadcastIntent}
  * PendingIntentRecord{3e6e46c7 com.google.android.gms startService}
  * PendingIntentRecord{336ef4f4 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1d98d41d com.google.android.gms startService}
  * PendingIntentRecord{16215692 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1b7e8863 android broadcastIntent}
  * PendingIntentRecord{22006c60 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{d739519 android broadcastIntent}
  * PendingIntentRecord{1bfa49de com.google.android.gms broadcastIntent}
  * PendingIntentRecord{2bc747bf com.google.android.gms broadcastIntent}
  * PendingIntentRecord{186fee8c com.google.android.gms startService}
  * PendingIntentRecord{e9f69d5 com.android.providers.calendar broadcastIntent}
  * PendingIntentRecord{3bdd25ea com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1bb2a0db android broadcastIntent}
  * PendingIntentRecord{3c736778 android broadcastIntent}
  * PendingIntentRecord{2579ce51 android broadcastIntent}

ACTIVITY MANAGER BROADCAST STATE (dumpsys activity broadcasts)
  Historical broadcasts [foreground]:
  #0: BroadcastRecord{355fb6b6 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}]
  #1: BroadcastRecord{2a306fb7 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}]
  #2: BroadcastRecord{17338324 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}]
  #3: BroadcastRecord{24bbfe8d 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}]
  #4: BroadcastRecord{19a88842 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}]
  #5: BroadcastRecord{2b525053 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}]
  #6: BroadcastRecord{39b7ad90 u-1 android.intent.action.CONFIGURATION_CHANGED}
    act=android.intent.action.CONFIGURATION_CHANGED flg=0x70000010
  #7: BroadcastRecord{1776f689 u-1 android.intent.action.USER_SWITCHED}
    act=android.intent.action.USER_SWITCHED flg=0x50000010 (has extras)
    extras: Bundle[{android.intent.extra.user_handle=0}]
  #8: BroadcastRecord{33bae68e u0 android.intent.action.USER_STARTED}
    act=android.intent.action.USER_STARTED flg=0x50000010 (has extras)
    extras: Bundle[{android.intent.extra.user_handle=0}]
  #9: BroadcastRecord{18a79eaf u-1 android.intent.action.CONFIGURATION_CHANGED}
    act=android.intent.action.CONFIGURATION_CHANGED flg=0x70000010

  Historical broadcasts [background]:
  #0: BroadcastRecord{3c1212bc u0 com.android.internal.telephony.data-stall}
    act=com.android.internal.telephony.data-stall flg=0x14 (has extras)
    extras: Bundle[{data.stall.alram.tag=52522, android.intent.extra.ALARM_COUNT=1}]
  #1: BroadcastRecord{ecf7245 u0 com.android.internal.telephony.data-stall}
    act=com.android.internal.telephony.data-stall flg=0x14 (has extras)
    extras: Bundle[{data.stall.alram.tag=52521, android.intent.extra.ALARM_COUNT=1}]
  #2: BroadcastRecord{2982dd9a u0 com.android.internal.telephony.data-stall}
    act=com.android.internal.telephony.data-stall flg=0x14 (has extras)
    extras: Bundle[{data.stall.alram.tag=52520, android.intent.extra.ALARM_COUNT=1}]
  #3: BroadcastRecord{b5976cb u0 com.android.server.task.controllers.BatteryController.ACTION_CHARGING_STABLE}
    act=com.android.server.task.controllers.BatteryController.ACTION_CHARGING_STABLE flg=0x14 (has extras)
    extras: Bundle[{android.intent.extra.ALARM_COUNT=1}]
  #4: BroadcastRecord{34b9ea8 u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979434318}]
  #5: BroadcastRecord{f79edc1 u0 com.google.android.gms.gcm.ACTION_CHECK_QUEUE}
    act=com.google.android.gms.gcm.ACTION_CHECK_QUEUE flg=0x14 (has extras)
    extras: Bundle[{android.intent.extra.ALARM_COUNT=1}]
  #6: BroadcastRecord{21a13966 u0 com.google.android.gms.common.receiver.LOG_CORE_ANALYTICS}
    act=com.google.android.gms.common.receiver.LOG_CORE_ANALYTICS flg=0x14 (has extras)
    targetComp: {com.google.android.gms/com.google.android.gms.common.receiver.InternalBroadcastReceiver}
    extras: Bundle[{type=system_health, event_code=11, android.intent.extra.ALARM_COUNT=1}]
  #7: BroadcastRecord{3c06b4a7 u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979406442}]
  #8: BroadcastRecord{3a0ffd54 u0 com.android.internal.telephony.data-stall}
    act=com.android.internal.telephony.data-stall flg=0x14 (has extras)
    extras: Bundle[{data.stall.alram.tag=52519, android.intent.extra.ALARM_COUNT=1}]
  #9: BroadcastRecord{1af6a4fd u0 com.google.android.gms.gcm.ACTION_CHECK_QUEUE}
    act=com.google.android.gms.gcm.ACTION_CHECK_QUEUE flg=0x14 (has extras)
    extras: Bundle[{android.intent.extra.ALARM_COUNT=1}]
  #10: BroadcastRecord{39f785f2 u0 com.android.server.NetworkTimeUpdateService.action.POLL}
    act=com.android.server.NetworkTimeUpdateService.action.POLL flg=0x14 (has extras)
    extras: Bundle[{android.intent.extra.ALARM_COUNT=1}]
  #11: BroadcastRecord{245ff443 u0 android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED}
    act=android.net.ConnectivityService.action.PKT_CNT_SAMPLE_INTERVAL_ELAPSED flg=0x14 pkg=android (has extras)
    extras: Bundle[{android.intent.extra.ALARM_COUNT=1}]
  #12: BroadcastRecord{28199ac0 u0 com.android.providers.calendar.intent.CalendarProvider2}
    act=com.android.providers.calendar.intent.CalendarProvider2 flg=0x14 (has extras)
    extras: Bundle[{removeAlarms=true, android.intent.extra.ALARM_COUNT=1}]
  #13: BroadcastRecord{108d93f9 u0 android.search.action.SEARCHABLES_CHANGED}
    act=android.search.action.SEARCHABLES_CHANGED flg=0x24000010
  #14: BroadcastRecord{1af40f3e u0 android.intent.action.PACKAGE_CHANGED}
    act=android.intent.action.PACKAGE_CHANGED dat=package:com.google.android.gms flg=0x4000010 (has extras)
    extras: Bundle[{android.intent.extra.changed_component_name=com.google.android.gms.checkin.CheckinServiceActiveReceiver, android.intent.extra.DONT_KILL_APP=true, android.intent.extra.UID=10007, android.intent.extra.changed_component_name_list=[Ljava.lang.String;@1e83919f, android.intent.extra.user_handle=0}]
  #15: BroadcastRecord{145da2ec u0 android.intent.action.PACKAGE_CHANGED}
    act=android.intent.action.PACKAGE_CHANGED dat=package:com.google.android.gms flg=0x4000010 (has extras)
    extras: Bundle[{android.intent.extra.changed_component_name=com.google.android.gms.checkin.CheckinServiceActiveReceiver, android.intent.extra.DONT_KILL_APP=true, android.intent.extra.UID=10007, android.intent.extra.changed_component_name_list=[Ljava.lang.String;@1e83919f, android.intent.extra.user_handle=0}]
  #16: BroadcastRecord{220a76b5 u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979365953}]
  #17: BroadcastRecord{339de14a u0 com.google.android.gms.vision.DEPENDENCY}
    act=com.google.android.gms.vision.DEPENDENCY flg=0x10 (has extras)
    extras: Bundle[mParcelledData.dataSize=112]
  #18: BroadcastRecord{1e19a8bb u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=888]
  #19: BroadcastRecord{1df801d8 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=848]
  #20: BroadcastRecord{1838c931 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=856]
  #21: BroadcastRecord{2a60c816 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=460]
  #22: BroadcastRecord{1f301597 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=500]
  #23: BroadcastRecord{37d76384 u0 com.google.android.checkin.CHECKIN_COMPLETE}
    act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 (has extras)
    extras: Bundle[mParcelledData.dataSize=32]
  #24: BroadcastRecord{231fc76d u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979362483}]
  #25: BroadcastRecord{e994fa2 u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979362482}]
  #26: BroadcastRecord{26d67433 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=888]
  #27: BroadcastRecord{332933f0 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=868]
  #28: BroadcastRecord{31fe6d69 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=932]
  #29: BroadcastRecord{16e0c3ee u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=936]
  #30: BroadcastRecord{317a208f u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=936]
  #31: BroadcastRecord{4859f1c u0 com.google.android.checkin.CHECKIN_COMPLETE}
    act=com.google.android.checkin.CHECKIN_COMPLETE flg=0x10 (has extras)
    extras: Bundle[mParcelledData.dataSize=32]
  #32: BroadcastRecord{f077725 u0 com.google.gservices.intent.action.GSERVICES_CHANGED}
    act=com.google.gservices.intent.action.GSERVICES_CHANGED flg=0x10
  #33: BroadcastRecord{381930fa u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979358041}]
  #34: BroadcastRecord{2b0236ab u0 com.google.android.gms.phenotype.UPDATE}
    act=com.google.android.gms.phenotype.UPDATE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=176]
  #35: BroadcastRecord{2fdb9108 u0 com.google.android.gms.phenotype.UPDATE}
    act=com.google.android.gms.phenotype.UPDATE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=188]
  #36: BroadcastRecord{3add60a1 u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979356999}]
  #37: BroadcastRecord{213962c6 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=848]
  #38: BroadcastRecord{cab9287 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=904]
  #39: BroadcastRecord{71cb5b4 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=856]
  #40: BroadcastRecord{3ce65dd u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979354457}]
  #41: BroadcastRecord{27d8e552 u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979353307}]
  #42: BroadcastRecord{3ca4d023 u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=snet_gcore, time=1475979352997}]
  #43: BroadcastRecord{27a97920 u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979352795}]
  #44: BroadcastRecord{14d082d9 u0 com.google.android.gms.gcm.ACTION_SCHEDULE}
    act=com.google.android.gms.gcm.ACTION_SCHEDULE flg=0x10 pkg=com.google.android.gms (has extras)
    extras: Bundle[mParcelledData.dataSize=916]
  #45: BroadcastRecord{317c049e u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979351581}]
  #46: BroadcastRecord{b6a4b7f u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979349340}]
  #47: BroadcastRecord{227d074c u0 android.intent.action.PACKAGE_CHANGED}
    act=android.intent.action.PACKAGE_CHANGED dat=package:com.google.android.gms flg=0x4000010 (has extras)
    extras: Bundle[{android.intent.extra.changed_component_name=com.google.android.gms.checkin.CheckinServiceActiveReceiver, android.intent.extra.DONT_KILL_APP=true, android.intent.extra.UID=10007, android.intent.extra.changed_component_name_list=[Ljava.lang.String;@383d7395, android.intent.extra.user_handle=0}]
  #48: BroadcastRecord{259fccaa u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979348297}]
  #49: BroadcastRecord{2ae2209b u0 android.intent.action.DROPBOX_ENTRY_ADDED}
    act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras)
    extras: Bundle[{tag=system_app_strictmode, time=1475979348296}]
  ...

  Sticky broadcasts for user -1:
  * Sticky action android.intent.action.SERVICE_STATE
  * Sticky action android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED
  * Sticky action android.media.ACTION_SCO_AUDIO_STATE_UPDATED
  * Sticky action android.intent.action.NETWORK_SET_TIME
  * Sticky action android.intent.action.BATTERY_CHANGED
  * Sticky action android.intent.action.ACTION_DEFAULT_SUBSCRIPTION_CHANGED
  * Sticky action android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED
  * Sticky action android.intent.action.NETWORK_SET_TIMEZONE
  * Sticky action android.net.conn.CONNECTIVITY_CHANGE
  * Sticky action android.intent.action.ANY_DATA_STATE
  * Sticky action android.provider.Telephony.SPN_STRINGS_UPDATED
  * Sticky action android.net.nsd.STATE_CHANGED
  * Sticky action android.intent.action.ACTION_SUBINFO_RECORD_UPDATED
  * Sticky action android.intent.action.SIM_STATE_CHANGED
  * Sticky action android.intent.action.SIG_STR
  * Sticky action android.intent.action.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED
  * Sticky action android.net.conn.INET_CONDITION_ACTION
  * Sticky action android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE
  * Sticky action android.media.SCO_AUDIO_STATE_CHANGED
  * Sticky action android.os.UpdateLock.UPDATE_LOCK_CHANGED
  * Sticky action android.media.MASTER_MUTE_CHANGED_ACTION
  * Sticky action wifi_scan_available
  * Sticky action android.intent.action.HDMI_PLUGGED
  * Sticky action android.media.RINGER_MODE_CHANGED

  Sticky broadcasts for user 0:
  * Sticky action com.android.music.queuechanged
  * Sticky action com.android.music.metachanged

ACTIVITY MANAGER CONTENT PROVIDERS (dumpsys activity providers)
  Published single-user content providers (by class):
  * ContentProviderRecord{3b194c38 u0 com.android.providers.telephony/.HbpcdLookupProvider}
    proc=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    singleton=true
    authority=hbpcd_lookup
  * ContentProviderRecord{34860976 u0 com.android.providers.settings/.SettingsProvider}
    proc=ProcessRecord{15e8ef0 1530:system/1000}
    singleton=true
    authority=settings
    11 connections, 0 external handles
      -> 1647:com.android.systemui/u0a13 s1/1 u0/0 +5m14s722ms
      -> 1823:com.android.server.telecom/1001 s1/1 u0/0 +5m14s499ms
      -> 1684:com.android.inputmethod.latin/u0a31 s1/1 u0/0 +5m11s667ms
      -> 1862:com.android.launcher/u0a8 s1/1 u0/0 +5m11s577ms
      -> 1706:android.process.media/u0a5 s1/1 u0/0 +5m10s115ms
      -> 2004:com.google.android.gms.persistent/u0a7 s1/1 u0/0 +5m6s472ms
      -> 2039:com.google.process.gapps/u0a7 s1/1 u0/0 +5m6s284ms
      -> 1843:com.android.phone/1001 s1/1 u0/0 +5m1s535ms
      -> 2254:com.android.mms/u0a10 s1/1 u0/0 +4m59s158ms
      -> 2071:com.google.android.gms/u0a7 s1/1 u0/0 +4m54s669ms
      -> 2435:com.google.android.gms.unstable/u0a7 s1/1 u0/0 +4m46s819ms
  * ContentProviderRecord{3b382b77 u0 com.android.providers.telephony/.MmsSmsProvider}
    proc=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    singleton=true
    authority=mms-sms
  * ContentProviderRecord{2932f3e4 u0 com.android.providers.telephony/.MmsProvider}
    proc=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    singleton=true
    authority=mms
  * ContentProviderRecord{1759804d u0 com.android.providers.telephony/.SmsProvider}
    proc=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    singleton=true
    authority=sms

  Published user 0 content providers (by class):
  * ContentProviderRecord{3ec14702 u0 com.google.android.gsf/.subscribedfeeds.SubscribedFeedsProvider}
    proc=ProcessRecord{97a0813 2039:com.google.process.gapps/u0a7}
    authority=subscribedfeeds
  * ContentProviderRecord{91d6a50 u0 com.google.android.gms/.auth.account.be.legacy.AccountContentProvider}
    proc=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    authority=com.google.android.gms.auth.accounts
  * ContentProviderRecord{21cad449 u0 com.android.inputmethod.latin/com.android.inputmethod.dictionarypack.DictionaryProvider}
    proc=ProcessRecord{2980d14e 1684:com.android.inputmethod.latin/u0a31}
    authority=com.android.inputmethod.dictionarypack.aosp
  * ContentProviderRecord{1bf3126f u0 com.android.email/.provider.EmailProvider}
    proc=ProcessRecord{2423ab63 2412:com.android.email/u0a26}
    authority=com.android.email.provider;com.android.email.notifier
  * ContentProviderRecord{26f6db7c u0 com.android.phone/.IccProvider}
    proc=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    authority=icc
  * ContentProviderRecord{be36c05 u0 com.google.android.gms/.trustagent.framework.model.be.ModelContentProvider}
    proc=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    authority=com.google.android.gms.trustagent.framework.model.be.provider
  * ContentProviderRecord{2b9cb45a u0 com.google.android.gsf/.settings.GoogleSettingsProvider}
    proc=ProcessRecord{97a0813 2039:com.google.process.gapps/u0a7}
    authority=com.google.settings
  * ContentProviderRecord{2848668b u0 com.android.providers.media/.MediaProvider}
    proc=ProcessRecord{10943368 1706:android.process.media/u0a5}
    authority=media
  * ContentProviderRecord{2133c381 u0 com.google.android.gms/.games.provider.NotificationStubContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.games
  * ContentProviderRecord{1f61bc26 u0 com.google.android.gms/.appstate.provider.AppStateContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.appstate
  * ContentProviderRecord{f54e067 u0 com.google.android.gms/.common.download.provider.DownloadsProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.download
  * ContentProviderRecord{1a2d1e14 u0 com.google.android.gms/.auth.account.be.accountstate.CredentialStateContentProvider}
    proc=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    authority=com.google.android.gms.auth.confirm
  * ContentProviderRecord{3bd816bd u0 com.android.exchange/.provider.ExchangeDirectoryProvider}
    proc=ProcessRecord{251d74b2 2493:com.android.exchange/u0a28}
    authority=com.android.exchange.directory.provider
  * ContentProviderRecord{3ac51c03 u0 com.google.android.gms/.icing.proxy.InternalIcingCorporaProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.icing.proxy
  * ContentProviderRecord{1c80780 u0 com.google.android.gms/.chromesync.persistence.ContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.chromesync.persistence.provider
  * ContentProviderRecord{17461b9 u0 com.google.android.gms/.fitness.sync.FitnessContentProvider}
    proc=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    authority=com.google.android.gms.fitness
  * ContentProviderRecord{226a29fe u0 com.android.providers.telephony/.TelephonyProvider}
    proc=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    authority=telephony
  * ContentProviderRecord{3873755f u0 com.android.providers.downloads/.DownloadProvider}
    proc=ProcessRecord{10943368 1706:android.process.media/u0a5}
    authority=downloads
  * ContentProviderRecord{1d661bac u0 com.google.android.gms/.auth.api.credentials.be.persistence.TemporaryValueProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.auth.api.credentials.be.persistence.TemporaryValueProvider
  * ContentProviderRecord{33f06075 u0 com.android.providers.contacts/.CallLogProvider}
    proc=ProcessRecord{2a3ae80a 1901:android.process.acore/u0a2}
    launchingApp=ProcessRecord{2a3ae80a 1901:android.process.acore/u0a2}
    authority=call_log
  * ContentProviderRecord{2f84087b u0 com.google.android.gms/.auth.account.be.accountstate.AccountStateContentProvider}
    proc=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    authority=com.google.android.gms.auth.accountstate
  * ContentProviderRecord{3fef4698 u0 com.google.android.gms/.games.chimera.GamesContentProviderProxy}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.games.background
  * ContentProviderRecord{11f38ef1 u0 com.google.android.gms/.car.CarFileProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.car.fileprovider
  * ContentProviderRecord{19a77ad6 u0 com.google.android.gms/com.google.android.location.internal.LocationContentProvider}
    proc=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    authority=com.google.android.location.internal
  * ContentProviderRecord{b40b157 u0 com.google.android.gms/.drive.metadata.sync.syncadapter.StubContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.drive.sync
  * ContentProviderRecord{de3444 u0 com.android.email/com.android.mail.browse.EmailConversationProvider}
    proc=ProcessRecord{2423ab63 2412:com.android.email/u0a26}
    authority=com.android.email.conversation.provider
  * ContentProviderRecord{321292d u0 com.android.email/.provider.AttachmentProvider}
    proc=ProcessRecord{2423ab63 2412:com.android.email/u0a26}
    authority=com.android.email.attachmentprovider
  * ContentProviderRecord{35786e62 u0 com.android.calendar/.CalendarRecentSuggestionsProvider}
    proc=ProcessRecord{37b50bf3 2357:com.android.calendar/u0a18}
    authority=com.android.calendar.CalendarRecentSuggestionsProvider
  * ContentProviderRecord{12ac50b0 u0 com.android.providers.calendar/.CalendarProvider2}
    proc=ProcessRecord{c142b29 2205:com.android.providers.calendar/u0a1}
    authority=com.android.calendar
    1 connections, 0 external handles
      -> 2357:com.android.calendar/u0a18 s1/1 u0/3 +4m47s690ms
  * ContentProviderRecord{14730eae u0 com.android.externalstorage/.ExternalStorageProvider}
    proc=ProcessRecord{c0a744f 1981:com.android.externalstorage/u0a6}
    authority=com.android.externalstorage.documents
  * ContentProviderRecord{13fdc7dc u0 com.android.phone/.PhoneSearchIndexablesProvider}
    proc=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    authority=com.android.phone
  * ContentProviderRecord{61b50e5 u0 com.android.providers.contacts/.ContactsProvider2}
    proc=ProcessRecord{2a3ae80a 1901:android.process.acore/u0a2}
    authority=contacts;com.android.contacts
  * ContentProviderRecord{226567ba u0 com.android.providers.downloads/.DownloadStorageProvider}
    proc=ProcessRecord{10943368 1706:android.process.media/u0a5}
    authority=com.android.providers.downloads.documents
  * ContentProviderRecord{3ea4066b u0 com.google.android.gms/.wallet.provider.WalletFileProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.wallet.fileprovider
  * ContentProviderRecord{78d85c8 u0 com.google.android.gms/com.google.android.location.reporting.service.ReportingContentProvider}
    proc=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    authority=com.google.android.location.reporting
  * ContentProviderRecord{16b51661 u0 com.android.mms/.SuggestionsProvider}
    proc=ProcessRecord{7f24586 2254:com.android.mms/u0a10}
    authority=com.android.mms.SuggestionsProvider
  * ContentProviderRecord{3efa9e47 u0 com.google.android.gms/.people.service.PeopleContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.people
  * ContentProviderRecord{1ed93674 u0 com.google.android.gms/.plus.provider.PlusProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.plus;com.google.android.gms.plus.action
  * ContentProviderRecord{22cbb79d u0 com.android.launcher/com.android.launcher2.LauncherProvider}
    proc=ProcessRecord{31d3412 1862:com.android.launcher/u0a8}
    authority=com.android.launcher2.settings
  * ContentProviderRecord{1138d7e3 u0 com.android.email/com.android.mail.providers.EmailAccountCacheProvider}
    proc=ProcessRecord{2423ab63 2412:com.android.email/u0a26}
    authority=com.android.email.accountcache
  * ContentProviderRecord{38d45e0 u0 com.android.providers.contacts/.VoicemailContentProvider}
    proc=ProcessRecord{2a3ae80a 1901:android.process.acore/u0a2}
    authority=com.android.voicemail
  * ContentProviderRecord{39b13099 u0 com.google.android.gms/.icing.proxy.AppsContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.icing.proxy.apps
  * ContentProviderRecord{3c967f5e u0 com.google.android.gsf/.gservices.GservicesProvider}
    proc=ProcessRecord{97a0813 2039:com.google.process.gapps/u0a7}
    launchingApp=ProcessRecord{97a0813 2039:com.google.process.gapps/u0a7}
    authority=com.google.android.gsf.gservices
  * ContentProviderRecord{7970f3f u0 com.google.android.gms/.icing.proxy.SmsContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.icing.proxy.sms
  * ContentProviderRecord{bb0e00c u0 com.android.email/com.android.mail.providers.EmlAttachmentProvider}
    proc=ProcessRecord{2423ab63 2412:com.android.email/u0a26}
    authority=com.android.email.provider.eml.attachment
  * ContentProviderRecord{33db3d55 u0 com.android.providers.media/.MediaDocumentsProvider}
    proc=ProcessRecord{10943368 1706:android.process.media/u0a5}
    authority=com.android.providers.media.documents
  * ContentProviderRecord{25c7336a u0 com.google.android.gms/.common.stats.net.contentprovider.NetworkUsageContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.common.stats.net.contentprovider
  * ContentProviderRecord{3577605b u0 com.google.android.gms/com.google.android.libraries.social.autobackup.AutoBackupProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.photos.iu.EsGoogleIuProvider
  * ContentProviderRecord{491f0f8 u0 com.google.android.gms/.icing.indexapi.IndexApiContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.icing.indexapi
  * ContentProviderRecord{15f59d1 u0 com.google.android.gms/.reminders.provider.RemindersProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.reminders
  * ContentProviderRecord{2b9d1c36 u0 com.android.mms/.TempFileProvider}
    proc=ProcessRecord{7f24586 2254:com.android.mms/u0a10}
    authority=mms_temp_file
  * ContentProviderRecord{3841a737 u0 com.android.providers.contacts/.debug.DumpFileProvider}
    proc=ProcessRecord{2a3ae80a 1901:android.process.acore/u0a2}
    authority=com.android.contacts.dumpfile
  * ContentProviderRecord{7124a4 u0 com.google.android.gms/.ads.adinfo.AdvertisingInfoContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.ads.adinfo
  * ContentProviderRecord{242ec20d u0 com.google.android.gms/.auth.api.credentials.sync.CredentialContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.auth.api.credentials
  * ContentProviderRecord{a16c5c2 u0 com.google.android.gms/.people.debug.PeopleExportProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.people.export
  * ContentProviderRecord{31ff7fd3 u0 com.android.deskclock/.provider.ClockProvider}
    proc=ProcessRecord{12ede710 2106:com.android.deskclock/u0a22}
    authority=com.android.deskclock
  * ContentProviderRecord{12127209 u0 com.android.providers.userdictionary/.UserDictionaryProvider}
    proc=ProcessRecord{2a3ae80a 1901:android.process.acore/u0a2}
    authority=user_dictionary
  * ContentProviderRecord{c8f7c0e u0 com.google.android.gms/android.support.v4.content.FileProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.fitness.fileprovider
  * ContentProviderRecord{11b8462f u0 com.google.android.gms/.matchstick.data.AppDataProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.matchstick.appdataprovider
  * ContentProviderRecord{2832643c u0 com.google.android.gms/.chromesync.sync.SyncContentProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.chromesync
  * ContentProviderRecord{3a6725c5 u0 com.google.android.gms/.matchstick.data.DatabaseProvider}
    proc=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    authority=com.google.android.gms.matchstick.dataprovider

ACTIVITY MANAGER SERVICES (dumpsys activity services)
  User 0 active services:
  * ServiceRecord{19c22b8b u0 com.android.systemui/.keyguard.KeyguardService}
    app=ProcessRecord{6cb4b1a 1647:com.android.systemui/u0a13}
    created=-5m10s559ms started=false connections=1
    Connections:
       -> 1530:system/1000
  * ServiceRecord{58e041a u0 com.google.android.gms/com.google.android.location.places.service.PlaceDetectionService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-5m5s613ms started=false connections=1
    Connections:
      act=com.google.android.gms.location.places.PlaceDetectionApi pkg=com.google.android.gms -> 2004:com.google.android.gms.persistent/u0a7
  * ServiceRecord{372425d2 u0 com.android.systemui/.ImageWallpaper}
    app=ProcessRecord{6cb4b1a 1647:com.android.systemui/u0a13}
    created=-5m16s91ms started=false connections=1
    Connections:
      act=android.service.wallpaper.WallpaperService -> 1530:system/1000
  * ServiceRecord{2d09eba6 u0 com.google.android.gms/com.google.android.location.geocode.GeocodeService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m24s671ms started=false connections=1
    Connections:
      act=com.android.location.service.GeocodeProvider pkg=com.google.android.gms -> 1530:system/1000
  * ServiceRecord{1642ff58 u0 com.google.android.gms/.nearby.discovery.service.ScreenOnListenerService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m55s183ms started=true connections=0
  * ServiceRecord{3dc42467 u0 com.google.android.gms/.auth.setup.devicesignals.LockScreenService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m58s44ms started=true connections=0
  * ServiceRecord{6be1986 u0 com.google.android.gms/.gcm.GcmService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m57s242ms started=true connections=0
  * ServiceRecord{119da782 u0 com.android.inputmethod.latin/.LatinIME}
    app=ProcessRecord{2980d14e 1684:com.android.inputmethod.latin/u0a31}
    created=-5m16s89ms started=false connections=1
    Connections:
      act=android.view.InputMethod -> 1530:system/1000
  * ServiceRecord{475080b u0 com.google.android.gms/com.google.android.location.fused.FusedLocationService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m24s672ms started=false connections=1
    Connections:
      act=com.android.location.service.FusedLocationProvider pkg=com.google.android.gms -> 1530:system/1000
  * ServiceRecord{3d29e57d u0 com.google.android.gms/com.google.android.location.places.service.GeoDataService}
    app=ProcessRecord{3d38d9c2 2071:com.google.android.gms/u0a7}
    created=-5m5s628ms started=false connections=1
    Connections:
      act=com.google.android.gms.location.places.GeoDataApi pkg=com.google.android.gms -> 2004:com.google.android.gms.persistent/u0a7
  * ServiceRecord{1823ac3d u0 com.google.android.gms/com.google.android.location.geofencer.service.GeofenceProviderService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m24s671ms started=false connections=1
    Connections:
      act=com.android.location.service.GeofenceProvider pkg=com.google.android.gms -> 1530:system/1000
  * ServiceRecord{c704658 u0 com.android.systemui/.SystemUIService}
    app=ProcessRecord{6cb4b1a 1647:com.android.systemui/u0a13}
    created=-5m16s237ms started=true connections=0
  * ServiceRecord{2a9e9c8c u0 android/.hardware.location.GeofenceHardwareService}
    app=ProcessRecord{15e8ef0 1530:system/1000}
    created=-5m15s522ms started=false connections=1
    Connections:
       -> 1530:system/1000
  * ServiceRecord{19790d7b u0 com.google.android.gms/.auth.trustagent.GoogleTrustAgent}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-5m10s394ms started=false connections=1
    Connections:
       -> 1530:system/1000
  * ServiceRecord{2488db2b u0 com.google.android.gms/com.google.android.location.internal.server.GoogleLocationService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-5m4s758ms started=true connections=0
  * ServiceRecord{183e393e u0 com.google.android.gms/com.google.android.contextmanager.service.ContextManagerService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m32s816ms started=true connections=1
    Connections:
      act=com.google.android.contextmanager.service.ContextManagerService.START pkg=com.google.android.gms -> 2004:com.google.android.gms.persistent/u0a7
  * ServiceRecord{1e6f66fc u0 com.google.android.gms/com.google.android.location.network.NetworkLocationService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m24s672ms started=false connections=1
    Connections:
      act=com.android.location.service.v3.NetworkLocationProvider pkg=com.google.android.gms -> 1530:system/1000
  * ServiceRecord{16e3685e u0 com.google.android.gms/com.google.android.location.internal.GoogleLocationManagerService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-5m5s862ms started=true connections=1
    Connections:
      act=com.google.android.location.internal.GoogleLocationManagerService.START pkg=com.google.android.gms -> 2004:com.google.android.gms.persistent/u0a7
  * ServiceRecord{b3bff73 u0 com.google.android.gms/.deviceconnection.service.DeviceConnectionServiceBroker}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m51s142ms started=true connections=0
  * ServiceRecord{1b07778f u0 android/com.android.internal.backup.LocalTransportService}
    app=ProcessRecord{15e8ef0 1530:system/1000}
    created=-5m16s494ms started=false connections=1
    Connections:
      act=android.backup.TRANSPORT_HOST -> 1530:system/1000
  * ServiceRecord{2bcffe2 u0 com.google.android.gms/.common.stats.GmsCoreStatsService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m51s143ms started=true connections=0
  * ServiceRecord{32d81379 u0 com.google.android.gms/.clearcut.service.ClearcutLoggerService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m55s926ms started=false connections=1
    Connections:
      act=com.google.android.gms.clearcut.service.START pkg=com.google.android.gms -> 2071:com.google.android.gms/u0a7
  * ServiceRecord{9c2da38 u0 com.android.mms.service/.MmsService}
    app=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    created=-5m15s519ms started=false connections=1
    Connections:
       -> 1530:system/1000
  * ServiceRecord{b68cec0 u0 com.android.phone/.TelephonyDebugService}
    app=ProcessRecord{a4eb411 1843:com.android.phone/1001}
    created=-5m1s28ms started=true connections=0
  * ServiceRecord{37f3d246 u0 com.google.android.gms/.backup.BackupTransportService}
    app=ProcessRecord{11a774 2004:com.google.android.gms.persistent/u0a7}
    created=-4m24s682ms started=false connections=1
    Connections:
      act=android.backup.TRANSPORT_HOST -> 1530:system/1000

ACTIVITY MANAGER RECENT TASKS (dumpsys activity recents)
  Recent tasks:
  * Recent #0: TaskRecord{58d164b #133 A=com.android.launcher U=0 sz=1}
  * Recent #1: TaskRecord{22df8828 #132 A=cj.com.animation U=0 sz=0}
  * Recent #2: TaskRecord{2b995941 #105 A=cj.com.navigationview U=0 sz=0}
  * Recent #3: TaskRecord{12c2fee6 #87 A=cj.com.measuredemo U=0 sz=0}
  * Recent #4: TaskRecord{3294cc27 #86 A=cj.com.drawlayout U=0 sz=0}
  * Recent #5: TaskRecord{2cb8fed4 #33 A=cj.com.statusbar U=0 sz=0}

ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Display #0 (activities from top to bottom):
  Stack #0:
    Task id #133
      TaskRecord{58d164b #133 A=com.android.launcher U=0 sz=1}
      Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher }
        Hist #0: ActivityRecord{3a274720 u0 com.android.launcher/com.android.launcher2.Launcher t133}
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher }
          ProcessRecord{31d3412 1862:com.android.launcher/u0a8}

    Running activities (most recent first):
      TaskRecord{58d164b #133 A=com.android.launcher U=0 sz=1}
        Run #0: ActivityRecord{3a274720 u0 com.android.launcher/com.android.launcher2.Launcher t133}

    mResumedActivity: ActivityRecord{3a274720 u0 com.android.launcher/com.android.launcher2.Launcher t133}

  mFocusedActivity: ActivityRecord{3a274720 u0 com.android.launcher/com.android.launcher2.Launcher t133}
  mFocusedStack=ActivityStack{1461487d stackId=0, 1 tasks} mLastFocusedStack=ActivityStack{1461487d stackId=0, 1 tasks}
  mSleepTimeout=false
  mCurTaskId=133
  mUserStackInFront={}
  mActivityContainers={0=ActivtyContainer{0}A, 1=ActivtyContainer{1}A}

ACTIVITY MANAGER RUNNING PROCESSES (dumpsys activity processes)
  Isolated process list (sorted by uid):
    Isolated # 0: ProcessRecord{1f302372 1631:WebViewLoader-x86_64/1037}

  Process LRU list (sorted by oom_adj, 24 total, non-act at 0, non-svc at 0):
    PERS #23: sys   F/ /P  trm: 0 1530:system/1000 (fixed)
    PERS #22: pers  F/ /P  trm: 0 1647:com.android.systemui/u0a13 (fixed)
    PERS #21: pers  F/ /P  trm: 0 1823:com.android.server.telecom/1001 (fixed)
    PERS #19: pers  F/ /P  trm: 0 1843:com.android.phone/1001 (fixed)
    Proc #20: fore  F/A/T  trm: 0 1862:com.android.launcher/u0a8 (top-activity)
    Proc # 1: vis   F/ /IF trm: 0 2004:com.google.android.gms.persistent/u0a7 (service)
        com.google.android.gms/com.google.android.location.fused.FusedLocationService<=Proc{1530:system/1000}
    Proc # 0: vis   F/ /IF trm: 0 2071:com.google.android.gms/u0a7 (service)
        com.google.android.gms/com.google.android.location.places.service.GeoDataService<=Proc{2004:com.google.android.gms.persistent/u0a7}
    Proc #12: prcp  B/ /IB trm: 0 1684:com.android.inputmethod.latin/u0a31 (service)
        com.android.inputmethod.latin/.LatinIME<=Proc{1530:system/1000}
    Proc # 6: cch   B/ /CE trm: 0 2357:com.android.calendar/u0a18 (cch-empty)
    Proc # 5: cch   B/ /CE trm: 0 1901:android.process.acore/u0a2 (cch-empty)
    Proc # 4: cch   B/ /CE trm: 0 2205:com.android.providers.calendar/u0a1 (cch-empty)
    Proc # 3: cch   B/ /CE trm: 0 2435:com.google.android.gms.unstable/u0a7 (cch-empty)
    Proc # 2: cch   B/ /CE trm: 0 2039:com.google.process.gapps/u0a7 (cch-empty)
    Proc #11: cch+2 B/ /CE trm: 0 2493:com.android.exchange/u0a28 (cch-empty)
    Proc #10: cch+2 B/ /CE trm: 0 2106:com.android.deskclock/u0a22 (cch-empty)
    Proc # 9: cch+2 B/ /CE trm: 0 2254:com.android.mms/u0a10 (cch-empty)
    Proc # 8: cch+2 B/ /CE trm: 0 1706:android.process.media/u0a5 (cch-empty)
    Proc # 7: cch+2 B/ /CE trm: 0 2412:com.android.email/u0a26 (cch-empty)
    Proc #17: cch+4 B/ /CE trm: 0 1883:com.android.printspooler/u0a43 (cch-empty)
    Proc #16: cch+4 B/ /CE trm: 0 2130:com.android.music/u0a36 (cch-empty)
    Proc #15: cch+4 B/ /CE trm: 0 2166:com.android.keychain/1000 (cch-empty)
    Proc #14: cch+4 B/ /CE trm: 0 2149:com.android.dialer/u0a4 (cch-empty)
    Proc #13: cch+4 B/ /CE trm: 0 2233:com.android.managedprovisioning/u0a9 (cch-empty)
    Proc #18: cch+6 B/ /CE trm: 0 1981:com.android.externalstorage/u0a6 (cch-empty)

  mStartedUsers:
    User #0: mState=RUNNING
  mStartedUserArray: [0]
  mUserLru: [0]
  mHomeProcess: ProcessRecord{31d3412 1862:com.android.launcher/u0a8}
  mConfiguration: {1.0 310mcc260mnc en_US ldltr sw411dp w411dp h658dp 420dpi nrml port finger -keyb/v/h -nav/h s.5}

上面打印了關於ActivityManagerService的信息,比較多。

簡單說明一下

我們知道android應用程序的四大組件中有三個是由intent來驅動的。所以在ActivityManagerService的信息中,專門有一部分來記錄當前待處理的Intent, 稱為pending intent 。每個待處理的intent在ActivityManagerService內部使用一個PendingIntentRecord對象表示, 並且會顯示出所在應用的包名, 並且會指定該intent是用來發送廣播, 啟動activity或是啟動service。直接在shell中鍵入dumpsys activity intents, 會直接得到這些信息

ACTIVITY MANAGER PENDING INTENTS (dumpsys activity intents)
  * PendingIntentRecord{2a0600a3 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{19d21fa0 com.android.deskclock startActivity}
  * PendingIntentRecord{19da6759 android broadcastIntent}
  * PendingIntentRecord{15514f1e android broadcastIntent}
  * PendingIntentRecord{28ee03ff com.google.android.gms broadcastIntent}
  * PendingIntentRecord{8c995cc com.google.android.gms broadcastIntent}
  * PendingIntentRecord{11412015 com.google.android.gms startService}
  * PendingIntentRecord{15bf3f2a com.google.android.gms startService}
  * PendingIntentRecord{c28e11b com.google.android.gms broadcastIntent}
  * PendingIntentRecord{17e042b8 com.google.android.gms startService}
  * PendingIntentRecord{1120a891 com.android.deskclock broadcastIntent}
  * PendingIntentRecord{2f6a23f6 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{d6a73f7 android broadcastIntent}
  * PendingIntentRecord{db2d264 com.google.android.gms startService}
  * PendingIntentRecord{2e963ccd com.google.android.gms broadcastIntent}
  * PendingIntentRecord{300c8982 com.google.android.gms startService}
  * PendingIntentRecord{23c85893 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1bfcb0d0 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{3956d8c9 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{147dbbce com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1815eaef com.google.android.gms startService}
  * PendingIntentRecord{12c409fc android broadcastIntent}
  * PendingIntentRecord{2d6b3885 com.google.android.gms startService}
  * PendingIntentRecord{3dbdc6da com.google.android.gms broadcastIntent}
  * PendingIntentRecord{300470b com.google.android.gms startService}
  * PendingIntentRecord{1a45c9e8 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{4abd801 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{2ac176a6 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{10ea48e7 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1fa19c94 android broadcastIntent}
  * PendingIntentRecord{23fcf33d android startActivity}
  * PendingIntentRecord{2fe5732 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{27888c83 com.android.inputmethod.latin broadcastIntent}
  * PendingIntentRecord{2045ee00 com.google.android.gms startService}
  * PendingIntentRecord{204a8639 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{3db6b47e android broadcastIntent}
  * PendingIntentRecord{93d6ddf com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1bea2c com.google.android.gms broadcastIntent}
  * PendingIntentRecord{17444cf5 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{32059a8a android broadcastIntent}
  * PendingIntentRecord{123508fb com.google.android.gms broadcastIntent}
  * PendingIntentRecord{16737d18 com.google.android.gms startService}
  * PendingIntentRecord{17d9c371 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1baad556 android broadcastIntent}
  * PendingIntentRecord{2b4139d7 com.android.calendar broadcastIntent}
  * PendingIntentRecord{1daf52c4 com.android.providers.calendar broadcastIntent}
  * PendingIntentRecord{167625ad android broadcastIntent}
  * PendingIntentRecord{2096f0e2 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{e759c73 android broadcastIntent}
  * PendingIntentRecord{31b0d730 android broadcastIntent}
  * PendingIntentRecord{28fc6fa9 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{2337392e com.google.android.gms startService}
  * PendingIntentRecord{39838ccf com.google.android.gms broadcastIntent}
  * PendingIntentRecord{904365c com.google.android.gms broadcastIntent}
  * PendingIntentRecord{6835d65 com.android.music broadcastIntent}
  * PendingIntentRecord{2d81ba3a android startActivity}
  * PendingIntentRecord{29d626eb com.android.phone broadcastIntent}
  * PendingIntentRecord{14cc5c48 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{6d16ae1 android broadcastIntent}
  * PendingIntentRecord{c14006 android broadcastIntent}
  * PendingIntentRecord{3e6e46c7 com.google.android.gms startService}
  * PendingIntentRecord{336ef4f4 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1d98d41d com.google.android.gms startService}
  * PendingIntentRecord{16215692 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1b7e8863 android broadcastIntent}
  * PendingIntentRecord{22006c60 com.google.android.gms broadcastIntent}
  * PendingIntentRecord{d739519 android broadcastIntent}
  * PendingIntentRecord{1bfa49de com.google.android.gms broadcastIntent}
  * PendingIntentRecord{2bc747bf com.google.android.gms broadcastIntent}
  * PendingIntentRecord{186fee8c com.google.android.gms startService}
  * PendingIntentRecord{e9f69d5 com.android.providers.calendar broadcastIntent}
  * PendingIntentRecord{3bdd25ea com.google.android.gms broadcastIntent}
  * PendingIntentRecord{1bb2a0db android broadcastIntent}
  * PendingIntentRecord{3c736778 android broadcastIntent}
  * PendingIntentRecord{2579ce51 android broadcastIntent}

下面行開始的信息是系統中的broadcast receiver的狀態信息,分注冊的,前台的,後台的。如果單獨想看這部分信息,直接執行

dumpsys activity broadcast

ACTIVITY MANAGER BROADCAST STATE (dumpsys activity broadcasts)
  。。。。。

下面行開始是provider相關的信息
ACTIVITY MANAGER CONTENT PROVIDERS (dumpsys activity providers)
  。。。

下面行開始是服務(Service)相關的信息
ACTIVITY MANAGER SERVICES (dumpsys activity services)
  。。。

下面行開始是Activity相關的信息
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Display #0 (activities from top to bottom):
  Stack #0:
    Task id #133
      TaskRecord{58d164b #133 A=com.android.launcher U=0 sz=1}
      Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher }
        Hist #0: ActivityRecord{3a274720 u0 com.android.launcher/com.android.launcher2.Launcher t133}
          Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher }
          ProcessRecord{31d3412 1862:com.android.launcher/u0a8}

    Running activities (most recent first):
      TaskRecord{58d164b #133 A=com.android.launcher U=0 sz=1}
        Run #0: ActivityRecord{3a274720 u0 com.android.launcher/com.android.launcher2.Launcher t133}

    mResumedActivity: ActivityRecord{3a274720 u0 com.android.launcher/com.android.launcher2.Launcher t133}

  mFocusedActivity: ActivityRecord{3a274720 u0 com.android.launcher/com.android.launcher2.Launcher t133}
  mFocusedStack=ActivityStack{1461487d stackId=0, 1 tasks} mLastFocusedStack=ActivityStack{1461487d stackId=0, 1 tasks}
  mSleepTimeout=false
  mCurTaskId=133
  mUserStackInFront={}
  mActivityContainers={0=ActivtyContainer{0}A, 1=ActivtyContainer{1}A}

這部分信息平時應該有用到,用來看activity屬於哪個任務棧。

Android中的task作用和Activity啟動模式以及各種啟動Flag的含義在講這個的時候就是查看這個信息的。

關於其他的服務信息就沒去一一查看了。這裡只是演示一下該工具的使用。

logcat

用於得到log信息,查看系統日志緩沖區的內容

一般用法

logcat [

 

選項: -b 指定要查看的日志緩沖區,可以是system,events,radio,main. 默認值是system和main。 -c清楚屏幕上的日志. -d輸出日志到屏幕上. -f 指定輸出日志信息的 ,默認是stdout . -g輸出指定的日志緩沖區,輸出後退出. -n 設置日志的最大數目 .,默認值是4,需要和 -r 選項一起使用。 -r 時輸出日志,默認值為16,需要和-f 選項一起使用. -s設置默認的過濾級別為silent. -v 設置日志輸入格式,默認的是brief 格式,要知道更多的支持的格式,參看Controlling Log Output 參數 參數用於對某類的tag的日志輸出進行過濾。每一個輸出的Android日志信息都有一個tag和它的優先級.   例如現在:
fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Log.d("drawerlayout","fab onclick");
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });
點擊floatingaAtionButton ,打印的日志
chenjun@chenjun-HP-EliteDesk-800-G1-SFF:~/AndroidStudioProjects/MyFirstASAPP$ adb shell logcat -s drawerlayout
adb server is out of date.  killing...
* daemon started successfully *
--------- beginning of system
--------- beginning of main
D/drawerlayout( 2820): fab onclick
^Z
[1]+  已停止               adb shell logcat -s drawerlayout


這些工具對我們調試android 程序很有幫助,所以有必要了解怎麼使用。
  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved