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

相关文章

Android中Dialog的使用详解

《Android中Dialog的使用详解》Dialog(对话框)是Android中常用的UI组件,用于临时显示重要信息或获取用户输入,本文给大家介绍Android中Dialog的使用,感兴趣的朋友一起... 目录android中Dialog的使用详解1. 基本Dialog类型1.1 AlertDialog(

Android Kotlin 高阶函数详解及其在协程中的应用小结

《AndroidKotlin高阶函数详解及其在协程中的应用小结》高阶函数是Kotlin中的一个重要特性,它能够将函数作为一等公民(First-ClassCitizen),使得代码更加简洁、灵活和可... 目录1. 引言2. 什么是高阶函数?3. 高阶函数的基础用法3.1 传递函数作为参数3.2 Lambda

MySQL中慢SQL优化的不同方式介绍

《MySQL中慢SQL优化的不同方式介绍》慢SQL的优化,主要从两个方面考虑,SQL语句本身的优化,以及数据库设计的优化,下面小编就来给大家介绍一下有哪些方式可以优化慢SQL吧... 目录避免不必要的列分页优化索引优化JOIN 的优化排序优化UNION 优化慢 SQL 的优化,主要从两个方面考虑,SQL 语

Android自定义Scrollbar的两种实现方式

《Android自定义Scrollbar的两种实现方式》本文介绍两种实现自定义滚动条的方法,分别通过ItemDecoration方案和独立View方案实现滚动条定制化,文章通过代码示例讲解的非常详细,... 目录方案一:ItemDecoration实现(推荐用于RecyclerView)实现原理完整代码实现

C++中函数模板与类模板的简单使用及区别介绍

《C++中函数模板与类模板的简单使用及区别介绍》这篇文章介绍了C++中的模板机制,包括函数模板和类模板的概念、语法和实际应用,函数模板通过类型参数实现泛型操作,而类模板允许创建可处理多种数据类型的类,... 目录一、函数模板定义语法真实示例二、类模板三、关键区别四、注意事项 ‌在C++中,模板是实现泛型编程

Python实现html转png的完美方案介绍

《Python实现html转png的完美方案介绍》这篇文章主要为大家详细介绍了如何使用Python实现html转png功能,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 1.增强稳定性与错误处理建议使用三层异常捕获结构:try: with sync_playwright(

Java使用多线程处理未知任务数的方案介绍

《Java使用多线程处理未知任务数的方案介绍》这篇文章主要为大家详细介绍了Java如何使用多线程实现处理未知任务数,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 知道任务个数,你可以定义好线程数规则,生成线程数去跑代码说明:1.虚拟线程池:使用 Executors.newVir

Android App安装列表获取方法(实践方案)

《AndroidApp安装列表获取方法(实践方案)》文章介绍了Android11及以上版本获取应用列表的方案调整,包括权限配置、白名单配置和action配置三种方式,并提供了相应的Java和Kotl... 目录前言实现方案         方案概述一、 androidManifest 三种配置方式

Android WebView无法加载H5页面的常见问题和解决方法

《AndroidWebView无法加载H5页面的常见问题和解决方法》AndroidWebView是一种视图组件,使得Android应用能够显示网页内容,它基于Chromium,具备现代浏览器的许多功... 目录1. WebView 简介2. 常见问题3. 网络权限设置4. 启用 JavaScript5. D

Android如何获取当前CPU频率和占用率

《Android如何获取当前CPU频率和占用率》最近在优化App的性能,需要获取当前CPU视频频率和占用率,所以本文小编就来和大家总结一下如何在Android中获取当前CPU频率和占用率吧... 最近在优化 App 的性能,需要获取当前 CPU视频频率和占用率,通过查询资料,大致思路如下:目前没有标准的