本文主要是介绍Android_adb shell dumpsys介绍,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.dumpsys是Android系统的调试工具,提供有关系统服务的信息,默认打印出当前系统所有service信息,可以在后面加上具体的服务名。
官方介绍:https://developer.android.google.cn/studio/command-line/dumpsys
2.查看系统服务,任选一个查看当前系统支持的dump服务
adb shell dumpsys –l
shell@R7sm:/ $ dumpsys -l
Currently running services:AtCmdFwdDockObserverOPPOOPPOExServiceOppoTranslateManagerServiceSurfaceFlingeraccessibilityaccountactivityalarmandroid.security.keystoreappopsappwidgetassetatlasaudiobackupbatterybatterypropertiesbatterystatsbluetooth_managercabcclipboardcneservicecolor_screenshotcommontime_managementconnectivityconsumer_ircontentcountry_detectorcpuinfocritical.logdbinfodevice_policydevicestoragemonitordiskstatsdisplaydisplay.qservicedpmservicedreamsdrm.drmManagerdropboxentropyfingerprintgfxinfohardwareimmsimsinputinput_methodiphonesubinfoismsisubjobschedulerlauncherappslocationlock_settingsmedia.audio_flingermedia.audio_policymedia.cameramedia.playermedia.sound_trigger_hwmedia_projectionmedia_routermedia_sessionmeminfomountnetpolicynetstatsnetwork_managementnetwork_scorenotificationoppo.com.IRUtilspackagepermissionpersistent_data_blockphonepowerprintprocstatsrestrictionsrttmanagersamplingprofilerscheduling_policysearchsensorserviceserialservicediscoverysimphonebooksipstatusbartelecomtelephony.registrytextservicestrustuimodeupdatelockusageusagestatsusbuservibratorvoiceinteractionwallpaperwebviewupdatewifiwifip2pwifiscannerwindow
shell@R7sm:/ $
adb shell service list
shell@R7sm:/ $ service list
Found 108 services:
0 AtCmdFwd: [com.qualcomm.atfwd.IAtCmdFwd]
1 ims: [com.android.ims.internal.IImsService]
2 sip: [android.net.sip.ISipService]
3 oppo.com.IRUtils: []
4 phone: [com.android.internal.telephony.ITelephony]
5 isms: [com.android.internal.telephony.ISms]
6 iphonesubinfo: [com.android.internal.telephony.IPhoneSubInfo]
7 simphonebook: [com.android.internal.telephony.IIccPhoneBook]
8 telecom: [com.android.internal.telecom.ITelecomService]
9 isub: [com.android.internal.telephony.ISub]
10 cneservice: [com.quicinc.cne.ICNEManager]
11 imms: [com.android.internal.telephony.IMms]
12 media_projection: [android.media.projection.IMediaProjectionManager]
13 launcherapps: [android.content.pm.ILauncherApps]
14 fingerprint: [android.service.fingerprint.IFingerprintService]
15 trust: [android.app.trust.ITrustManager]
16 media_router: [android.media.IMediaRouterService]
17 media_session: [android.media.session.ISessionManager]
18 restrictions: [android.content.IRestrictionsManager]
19 print: [android.print.IPrintManager]
20 assetatlas: [android.view.IAssetAtlas]
21 dreams: [android.service.dreams.IDreamManager]
22 commontime_management: []
23 samplingprofiler: []
24 usage: [android.os.IOppoUsageService]
25 OPPO: [android.os.IOppoService]
26 cabc: [com.android.internal.cabc.ICabcManager]
27 diskstats: []
28 voiceinteraction: [com.android.internal.app.IVoiceInteractionManagerService]
29 appwidget: [com.android.internal.appwidget.IAppWidgetService]
30 backup: [android.app.backup.IBackupManager]
31 jobscheduler: [android.app.job.IJobScheduler]
32 uimode: [android.app.IUiModeManager]
33 serial: [android.hardware.ISerialManager]
34 usb: [android.hardware.usb.IUsbManager]
35 DockObserver: []
36 audio: [android.media.IAudioService]
37 wallpaper: [android.app.IWallpaperManager]
38 dropbox: [com.android.internal.os.IDropBoxManagerService]
39 search: [android.app.ISearchManager]
40 country_detector: [android.location.ICountryDetector]
41 location: [android.location.ILocationManager]
42 devicestoragemonitor: []
43 notification: [android.app.INotificationManager]
44 OPPOExService: [android.os.IOppoExService]
45 updatelock: [android.os.IUpdateLock]
46 dpmservice: [com.qti.dpm.IDpmService]
47 servicediscovery: [android.net.nsd.INsdManager]
48 connectivity: [android.net.IConnectivityManager]
49 rttmanager: [android.net.wifi.IRttManager]
50 wifiscanner: [android.net.wifi.IWifiScanner]
51 wifi: [android.net.wifi.IWifiManager]
52 media.sound_trigger_hw: [android.hardware.ISoundTriggerHwService]
53 wifip2p: [android.net.wifi.p2p.IWifiP2pManager]
54 netpolicy: [android.net.INetworkPolicyManager]
55 netstats: [android.net.INetworkStatsService]
56 network_score: [android.net.INetworkScoreService]
57 textservices: [com.android.internal.textservice.ITextServicesManager]
58 network_management: [android.os.INetworkManagementService]
59 clipboard: [android.content.IClipboard]
60 statusbar: [com.android.internal.statusbar.IStatusBarService]
61 device_policy: [android.app.admin.IDevicePolicyManager]
62 persistent_data_block: [android.service.persistentdata.IPersistentDataBlockService]
63 lock_settings: [com.android.internal.widget.ILockSettings]
64 mount: [IMountService]
65 accessibility: [android.view.accessibility.IAccessibilityManager]
66 input_method: [com.android.internal.view.IInputMethodManager]
67 color_screenshot: [com.color.screenshot.IColorScreenshotManager]
68 OppoTranslateManagerService: [com.oppo.translate.IOppoTranslateManager]
69 bluetooth_manager: [android.bluetooth.IBluetoothManager]
70 input: [android.hardware.input.IInputManager]
71 window: [android.view.IWindowManager]
72 media.audio_policy: [android.media.IAudioPolicyService]
73 alarm: [android.app.IAlarmManager]
74 consumer_ir: [android.hardware.IConsumerIrService]
75 vibrator: [android.os.IVibratorService]
76 content: [android.content.IContentService]
77 account: [android.accounts.IAccountManager]
78 entropy: []
79 telephony.registry: [com.android.internal.telephony.ITelephonyRegistry]
80 scheduling_policy: [android.os.ISchedulingPolicyService]
81 webviewupdate: [android.webkit.IWebViewUpdateService]
82 usagestats: [android.app.usage.IUsageStatsManager]
83 battery: []
84 hardware: [android.os.IHardwareService]
85 permission: [android.os.IPermissionController]
86 cpuinfo: []
87 dbinfo: []
88 gfxinfo: []
89 meminfo: []
90 procstats: [com.android.internal.app.IProcessStats]
91 activity: [android.app.IActivityManager]
92 user: [android.os.IUserManager]
93 package: [android.content.pm.IPackageManager]
94 sensorservice: [android.gui.SensorServer]
95 media.camera: [android.hardware.ICameraService]
96 media.player: [android.media.IMediaPlayerService]
97 display: [android.hardware.display.IDisplayManager]
98 power: [android.os.IPowerManager]
99 appops: [com.android.internal.app.IAppOpsService]
100 batterystats: [com.android.internal.app.IBatteryStats]
101 android.security.keystore: [android.security.keystore]
102 SurfaceFlinger: [android.ui.ISurfaceComposer]
103 media.audio_flinger: [android.media.IAudioFlinger]
104 display.qservice: [android.display.IQService]
105 critical.log: []
106 drm.drmManager: [drm.IDrmManagerService]
107 batteryproperties: [android.os.IBatteryPropertiesRegistrar]
shell@R7sm:/ $
3.activity信息查询
帮助信息:
shell@R7sm:/ $ dumpsys activity –h
shell@R7sm:/ $ dumpsys activity -h
Activity manager dump options:[-a] [-c] [-p package] [-h] [cmd] ...cmd may be one of:a[ctivities]: activity stack stater[recents]: recent activities stateb[roadcasts] [PACKAGE_NAME] [history [-s]]: broadcast statei[ntents] [PACKAGE_NAME]: pending intent statep[rocesses] [PACKAGE_NAME]: process stateo[om]: out of memory managementprov[iders] [COMP_SPEC ...]: content provider stateprovider [COMP_SPEC]: provider client-side states[ervices] [COMP_SPEC ...]: service stateas[sociations]: tracked app associationsservice [COMP_SPEC]: service client-side statepackage [PACKAGE_NAME]: all state related to given packageall: dump all activitiestop: dump the top activitywrite: write all pending state to storagetrack-associations: enable association trackinguntrack-associations: disable and clear association trackingcmd may also be a COMP_SPEC to dump activities.COMP_SPEC may be a component name (com.foo/.myApp),a partial substring in a component name, ahex object identifier.-a: include all available server state.-c: include client state.-p: limit output to given package.
shell@R7sm:/ $
4.package信息查询
帮助信息:
shell@R7sm:/ $ dumpsys package –h
shell@R7sm:/ $ dumpsys package -h
Package manager dump options:[-h] [-f] [--checkin] [cmd] ...--checkin: dump for a checkin-f: print details of intent filters-h: print this helpcmd may be one of:l[ibraries]: list known shared librariesf[ibraries]: list device featuresk[eysets]: print known keysetsr[esolvers]: dump intent resolversperm[issions]: dump permissionspref[erred]: print preferred package settingspreferred-xml [--full]: print preferred package settings as xmlprov[iders]: dump content providersp[ackages]: dump installed packagess[hared-users]: dump shared user IDsm[essages]: print collected runtime messagesv[erifiers]: print package verifier infoversion: print database version infowrite: write current settings now<package.name>: info about given packageinstalls: details about install sessions
shell@R7sm:/ $
查看指定包信息:
shell@R7sm:/ $ dumpsys package com.oppo.music
shell@R7sm:/ $ dumpsys package com.oppo.music
Activity Resolver Table:Full MIME Types:vnd.android.cursor.dir/audio:f2dc8c2 com.oppo.music/com.nearme.music.trdsupport.pick.MusicPickerActivityapplication/x-ogg:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivityf2dc8c2 com.oppo.music/com.nearme.music.trdsupport.pick.MusicPickerActivityapplication/ogg:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivityf2dc8c2 com.oppo.music/com.nearme.music.trdsupport.pick.MusicPickerActivityaudio/*:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivityf2dc8c2 com.oppo.music/com.nearme.music.trdsupport.pick.MusicPickerActivityapplication/itunes:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivityapplication/x-flac:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivityBase MIME Types:vnd.android.cursor.dir:f2dc8c2 com.oppo.music/com.nearme.music.trdsupport.pick.MusicPickerActivityapplication:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivity (4 filters)f2dc8c2 com.oppo.music/com.nearme.music.trdsupport.pick.MusicPickerActivity (2 filters)Wild MIME Types:audio:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivityf2dc8c2 com.oppo.music/com.nearme.music.trdsupport.pick.MusicPickerActivitySchemes:uccredit:214bb9f7 com.oppo.music/com.ucsdk.creditlib.ui.CreditDeepLinkActivityopmusic:3f9619ce com.oppo.music/com.nearme.music.push.MCSBridgeActivity (2 filters)tencent1108845991:356db283 com.oppo.music/com.tencent.tauth.AuthActivityfile:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivityhttp:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivitycontent:1994f3c com.oppo.music/com.nearme.music.trdsupport.play.AuditionActivityNon-Data Actions:com.heytap.music.account.auth:1d61448e com.oppo.music/com.nearme.music.auth.AuthTransmitDialogActivitycom.heytap.music.playlist:11671a33 com.oppo.music/com.nearme.music.playlist.ui.NormalPlayListActivitycom.heytap.music.addToPlayList:5757a4f com.oppo.music/com.nearme.migu.addsong.MiguAddSongDialogActivitycom.heytap.music.radio.feekback.dislike:eb9def8 com.oppo.music/com.nearme.music.play.ui.PersonalityRadioDisLikeActivityandroid.intent.action.MAIN:1ca0b49d com.oppo.music/com.nearme.music.splash.SplashActivitycom.heytap.music.vip:f747406 com.oppo.music/com.nearme.music.auth.VipTransmitDialogActivitycom.heytap.music.ACTION_PLAYER:2ed3ca92 com.oppo.music/com.n
这篇关于Android_adb shell dumpsys介绍的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!