Android_adb shell dumpsys介绍

2024-04-10 17:18
文章标签 android 介绍 adb shell dumpsys

本文主要是介绍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介绍的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/891668

相关文章

Linux中shell解析脚本的通配符、元字符、转义符说明

《Linux中shell解析脚本的通配符、元字符、转义符说明》:本文主要介绍shell通配符、元字符、转义符以及shell解析脚本的过程,通配符用于路径扩展,元字符用于多命令分割,转义符用于将特殊... 目录一、linux shell通配符(wildcard)二、shell元字符(特殊字符 Meta)三、s

Python进阶之Excel基本操作介绍

《Python进阶之Excel基本操作介绍》在现实中,很多工作都需要与数据打交道,Excel作为常用的数据处理工具,一直备受人们的青睐,本文主要为大家介绍了一些Python中Excel的基本操作,希望... 目录概述写入使用 xlwt使用 XlsxWriter读取修改概述在现实中,很多工作都需要与数据打交

java脚本使用不同版本jdk的说明介绍

《java脚本使用不同版本jdk的说明介绍》本文介绍了在Java中执行JavaScript脚本的几种方式,包括使用ScriptEngine、Nashorn和GraalVM,ScriptEngine适用... 目录Java脚本使用不同版本jdk的说明1.使用ScriptEngine执行javascript2.

Python实现NLP的完整流程介绍

《Python实现NLP的完整流程介绍》这篇文章主要为大家详细介绍了Python实现NLP的完整流程,文中的示例代码讲解详细,具有一定的借鉴价值,感兴趣的小伙伴可以跟随小编一起学习一下... 目录1. 编程安装和导入必要的库2. 文本数据准备3. 文本预处理3.1 小写化3.2 分词(Tokenizatio

shell脚本快速检查192.168.1网段ip是否在用的方法

《shell脚本快速检查192.168.1网段ip是否在用的方法》该Shell脚本通过并发ping命令检查192.168.1网段中哪些IP地址正在使用,脚本定义了网络段、超时时间和并行扫描数量,并使用... 目录脚本:检查 192.168.1 网段 IP 是否在用脚本说明使用方法示例输出优化建议总结检查 1

Android数据库Room的实际使用过程总结

《Android数据库Room的实际使用过程总结》这篇文章主要给大家介绍了关于Android数据库Room的实际使用过程,详细介绍了如何创建实体类、数据访问对象(DAO)和数据库抽象类,需要的朋友可以... 目录前言一、Room的基本使用1.项目配置2.创建实体类(Entity)3.创建数据访问对象(DAO

Android WebView的加载超时处理方案

《AndroidWebView的加载超时处理方案》在Android开发中,WebView是一个常用的组件,用于在应用中嵌入网页,然而,当网络状况不佳或页面加载过慢时,用户可能会遇到加载超时的问题,本... 目录引言一、WebView加载超时的原因二、加载超时处理方案1. 使用Handler和Timer进行超

性能测试介绍

性能测试是一种测试方法,旨在评估系统、应用程序或组件在现实场景中的性能表现和可靠性。它通常用于衡量系统在不同负载条件下的响应时间、吞吐量、资源利用率、稳定性和可扩展性等关键指标。 为什么要进行性能测试 通过性能测试,可以确定系统是否能够满足预期的性能要求,找出性能瓶颈和潜在的问题,并进行优化和调整。 发现性能瓶颈:性能测试可以帮助发现系统的性能瓶颈,即系统在高负载或高并发情况下可能出现的问题

水位雨量在线监测系统概述及应用介绍

在当今社会,随着科技的飞速发展,各种智能监测系统已成为保障公共安全、促进资源管理和环境保护的重要工具。其中,水位雨量在线监测系统作为自然灾害预警、水资源管理及水利工程运行的关键技术,其重要性不言而喻。 一、水位雨量在线监测系统的基本原理 水位雨量在线监测系统主要由数据采集单元、数据传输网络、数据处理中心及用户终端四大部分构成,形成了一个完整的闭环系统。 数据采集单元:这是系统的“眼睛”,

Hadoop数据压缩使用介绍

一、压缩原则 (1)运算密集型的Job,少用压缩 (2)IO密集型的Job,多用压缩 二、压缩算法比较 三、压缩位置选择 四、压缩参数配置 1)为了支持多种压缩/解压缩算法,Hadoop引入了编码/解码器 2)要在Hadoop中启用压缩,可以配置如下参数