[Android] adb shell dumpsys的使用
reference to :http://blog.csdn.net/g19920917/article/details/38032413
有两种方法可以查看service list:
1. adb shell dumpsys
输出信息的开始部分就是所有运行的service,如下:
Currently running services:
SurfaceFlinger:
accessibility:
account:
activity:
alarm:
appwidget:
audio:
backup:
battery:
batteryinfo:
clipboard:
connectivity:
content:
cpuinfo:
device_policy:
devicestoragemonitor:
diskstats:
dropbox:
entropy:
hardware:
input_method:
iphonesubinfo:
isms:
location:
media.audio_flinger:
media.audio_policy:
media.camera:
media.player:
meminfo:
mount:
netstat:
network_management:
notification:
package:
permission:
phone:
power:
search:
sensorservice:
simphonebook:
statusbar:
telephony.registry:
throttle:
uimode:
usagestats:
vibrator:
wallpaper:
wifi:
window:
2. adb shell service list
输出结果如下:
Found 49 services:
0 phone: [com.android.internal.telephony.ITelephony]
1 iphonesubinfo: [com.android.internal.telephony.IPhoneSubInfo]
2 simphonebook: [com.android.internal.telephony.IIccPhoneBook]
3 isms: [com.android.internal.telephony.ISms]
4 diskstats: []
5 appwidget: [com.android.internal.appwidget.IAppWidgetService]
6 backup: [android.app.backup.IBackupManager]
7 uimode: [android.app.IUiModeManager]
8 audio: [android.media.IAudioService]
9 wallpaper: [android.app.IWallpaperManager]
10 dropbox: [com.android.internal.os.IDropBoxManagerService]
11 search: [android.app.ISearchManager]
12 location: [android.location.ILocationManager]
13 devicestoragemonitor: []
14 notification: [android.app.INotificationManager]
15 mount: [IMountService]
16 accessibility: [android.view.accessibility.IAccessibilityManager]
17 throttle: [android.net.IThrottleManager]
18 connectivity: [android.net.IConnectivityManager]
19 wifi: [android.net.wifi.IWifiManager]
20 network_management: [android.os.INetworkManagementService]
21 netstat: [android.os.INetStatService]
22 input_method: [com.android.internal.view.IInputMethodManager]
23 clipboard: [android.text.IClipboard]
24 statusbar: [com.android.internal.statusbar.IStatusBarService]
25 device_policy: [android.app.admin.IDevicePolicyManager]
26 window: [android.view.IWindowManager]
27 alarm: [android.app.IAlarmManager]
28 vibrator: [android.os.IVibratorService]
29 hardware: [android.os.IHardwareService]
30 battery: []
31 content: [android.content.IContentService]
32 account: [android.accounts.IAccountManager]
33 permission: [android.os.IPermissionController]
34 cpuinfo: []
35 meminfo: []
36 activity: [android.app.IActivityManager]
37 package: [android.content.pm.IPackageManager]
38 telephony.registry: [com.android.internal.telephony.ITelephonyRegistry]
39 usagestats: [com.android.internal.app.IUsageStats]
40 batteryinfo: [com.android.internal.app.IBatteryStats]
41 power: [android.os.IPowerManager]
42 entropy: []
43 sensorservice: [android.gui.SensorServer]
44 SurfaceFlinger: [android.ui.ISurfaceComposer]
45 media.audio_policy: [android.media.IAudioPolicyService]
46 media.camera: [android.hardware.ICameraService]
47 media.player: [android.media.IMediaPlayerService]
48 media.audio_flinger: [android.media.IAudioFlinger]
查询到运行的system service后,就可以在dumpsys后面加上service的名字,查看指定的service信息。
adb shell dumpsys activity
adb shell dumpsys cpuinfo
Load: 7.48 / 7.87 / 7.93
CPU usage from 26882ms to 5779ms ago:
5% 29692/adbd: 0.3% user + 4.7% kernel / faults: 8579 minor
4.9% 798/system_server: 2.8% user + 2% kernel / faults: 1616 minor
1.5% 21935/com.qihoo360.mobilesafe:GuardService: 0.8% user + 0.7% kernel / faults: 1052 minor
0.2% 970/com.baidu.superservice: 0.1% user + 0% kernel / faults: 2327 minor
0.9% 1433/mpdecision: 0% user + 0.9% kernel
0.9% 193/sensors.qcom: 0.2% user + 0.7% kernel / faults: 2 minor
0.8% 1948/com.baidu.appsearch: 0.6% user + 0.1% kernel / faults: 534 minor
0.4% 22189/com.qihoo360.contacts:guard: 0.3% user + 0% kernel / faults: 11 minor
0.3% 9913/kworker/0:2: 0% user + 0.3% kernel
0.2% 3220/com.cleanmaster.security:DefendService: 0.1% user + 0% kernel / faults: 114 minor
0.2% 3389/kworker/u:1: 0% user + 0.2% kernel
0.2% 22792/kworker/0:0H: 0% user + 0.2% kernel
0.2% 27872/kworker/u:2: 0% user + 0.2% kernel
0% 493/com.qiyi.video:bdservice_v1: 0% user + 0% kernel / faults: 1421 minor
adb shell dumpsys battery
Current Battery Service state:
AC powered: false
USB powered: true
Wireless powered: false
status: 5
health: 2
present: true
level: 100
scale: 100
voltage: 4315
current now: 2871
temperature: 317
technology: Li-ion
adb shell dumpsys window(最后部分可以看到分辨率的信息)
有些service能够接收额外的参数,我们可以使用-h查看帮助信息。
adb shell dumpsys package -h
Package [com.nuomi] (42692a10):
userId=10081 gids=[3003, 1028, 1015, 3002, 3001]
pkg=Package{42a3ad30 com.nuomi}
codePath=/data/app/com.nuomi-1.apk
resourcePath=/data/app/com.nuomi-1.apk
nativeLibraryPath=/data/app-lib/com.nuomi-1
versionCode=153 targetSdk=18
versionName=6.1.0
applicationInfo=ApplicationInfo{42a3ade0 com.nuomi}
flags=[ HAS_CODE ALLOW_CLEAR_USER_DATA ALLOW_BACKUP LARGE_HEAP ]
dataDir=/data/data/com.nuomi
supportsScreens=[small, medium, large, xlarge, resizeable, anyDensity]
timeStamp=2015-12-30 05:59:29
firstInstallTime=2015-12-30 05:59:40
lastUpdateTime=2015-12-30 05:59:40
installerPackageName=com.baidu.appsearch
signatures=PackageSignatures{42647fe8 [426d0960]}
permissionsFixed=true haveGids=true installStatus=1
pkgFlags=[ HAS_CODE ALLOW_CLEAR_USER_DATA ALLOW_BACKUP LARGE_HEAP ]
User 0: installed=true blocked=false stopped=false notLaunched=false enabled=0
grantedPermissions:
android.permission.READ_EXTERNAL_STORAGE
android.permission.GET_TASKS
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.ACCESS_WIFI_STATE
android.permission.RECEIVE_SMS
android.permission.ACCESS_COARSE_LOCATION
android.permission.CALL_PHONE
android.permission.READ_CONTACTS
android.permission.READ_PHONE_STATE
android.permission.READ_SMS
android.permission.RECEIVE_BOOT_COMPLETED
android.permission.CAMERA
android.permission.ACCESS_FINE_LOCATION
android.permission.BROADCAST_STICKY
android.permission.WAKE_LOCK
android.permission.RECORD_AUDIO
android.permission.FLASHLIGHT
android.permission.ACCESS_NETWORK_STATE
com.android.launcher.permission.INSTALL_SHORTCUT
android.permission.SEND_SMS
android.permission.MODIFY_AUDIO_SETTINGS
android.permission.DISABLE_KEYGUARD
android.permission.SYSTEM_ALERT_WINDOW
android.permission.BLUETOOTH
android.permission.WRITE_SETTINGS
android.permission.INTERNET
android.permission.CHANGE_WIFI_STATE
android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
android.permission.VIBRATE
android.permission.BLUETOOTH_ADMIN
android.permission.CHANGE_NETWORK_STATE
android.permission.DOWNLOAD_WITHOUT_NOTIFICATION
adb shell dumpsys activity -h
[Android] adb shell dumpsys的使用的更多相关文章
- 使用adb shell dumpsys检测Android的Activity任务栈
谈起Android程序开发,就需要了解其四个主要的部件:Activity.Service.ContentProvider. BroadcastReceiver.而其中Activity是唯一直接控制程序 ...
- Android M App休眠 (adb shell dumpsys usagestats)
App休眠 在 Marshmallow 系统,Google 宣布了一个新的功能叫 App 休眠.App 休眠会阻止那些不 常用的 App(几天没有用过的 App)连接网络或者是运行任何程序直至设备充电 ...
- Android 8.0 adb shell dumpsys activity activities | findstr mFocusedActivity 获取当前的 activity 显示空的
adb shell dumpsys activity activities | findstr mFocusedActivity Android 7.0 现象: Android 8.0 现象: 改用: ...
- [Android] adb 命令 dumpsys activity , 用来看 task 中的activity。 (uninstall virus)
用“adb shell dumpsys activity”命令再来查看一下系统运行的的任务,就会看到: ACTIVITY MANAGER ACTIVITIES (dumpsys activity ac ...
- adb shell dumpsys 命令 查看内存
android程序内存被分为2部分:native和dalvik,dalvik就是我们平常说的java堆,我们创建的对象是在这里面分配的,而bitmap是直接在native上分配的,对于内存的限制是 n ...
- 【转】adb shell dumpsys 命令
adb shell dumpsys,默认打印出当前系统所有service信息,在后面可加上具体的服务名 需要列出当前运行的服务,可运行: adb shell dumpsys | findstr DUM ...
- android adb shell and monkey 学习记录
Monkey环境: android SDK and JDK SDK目录下的platform-tools和tools目录要配置环境变量 查看版本: ADB 的安装这里就不多说了,输入以下命令有如下提示就 ...
- adb shell dumpsys 命令
Android开发中,常常可以用adb shell dumpsys这条命令来dump出系统运行时的状态信息,例如可以这样来察看某个应用的内存使用信息 adb shell dumpsys meminfo ...
- adb shell dumpsys的使用
该命令用于打印出当前系统信息,默认打印出设备中所有service的信息,可以在命令后面加指定的service name. 有两种方法可以查看service list: 1. adb shell dum ...
随机推荐
- ecshop之transport和jquery冲突之完美解决方案
众所周知:ecshop的transport.js文件和Jquery是冲突的,两个文件不能同时调用,现给出以下完美解决方案:原因分析:在transport.js文件中,大概 580行到590行之间,这个 ...
- debian8 配置使用 nfs
操作过的步骤: 1.dpkg-reconfigre rpcbind. 2.在终端上退出要挂载的目录. 错误:mount -t nfs 172.16.0.121:/home/junda /mnt,出现以 ...
- CentOS7.0安装Nginx 1.7.9
一.安装准备 首先由于nginx的一些模块依赖一些lib库,所以在安装nginx之前,必须先安装这些lib库,这些依赖库主要有g++.gcc.openssl-devel.pcre-devel和zlib ...
- 在framework中打包xib
废话不多说,直接上图 1.Copy Bundle Resources 中加入相关xib 2.这里是重点,调用的时候不能直接写 [[NSBundle mainBundle] loadNibNamed:@ ...
- 2016年11月17日--SQL主、外键,子查询
主键 数据库主键是指表中一个列或列的组合,其值能唯一地标识表中的每一行.这样的一列或多列称为表的主键,通过它可强制表的实体完整性.当创建或更改表时可通过定义 PRIMARY KEY约束来创建主键.一个 ...
- Python自动化之线程进阶篇
拓展知识 什么是CPU-bound(计算密集型) 和I/O bound(I/O密集型) ? I/O bound 指的是系统的CPU效能相对硬盘/内存的效能要好很多,此时,系统运作,大部分的状况是 CP ...
- phpcms更换域名用户无法注册问题
问题背景: 用户注册必须在后台开启phpsso,这个sso也就是单点登录了,之前做的站都没有带用户登录,也一直没注意,今天线下localhost用户登录注册都没有问题,可是移到线上测试却怎么都无法注册 ...
- pip/matplot/pandas的安装和使用
pip可以很方便的安装python的各种工具库,如pandas,matplotlib,scikit等,最大优点是它会自动解决库之间的依赖性,把所有需要的库都安装好,比起手工一个一个安装方便多了. 1. ...
- Linux Vsftpd 连接超时解决方法
Linux Vsftpd 连接超时解决方法 2013-11-13 10:58:34| 分类: 默认分类|举报|字号 订阅 解决方法(http://www.lingdus.com/thread ...
- How to mount a NFS share?
Assume you have a NFS share /data/shares/music, at server: 192.168.1.5 You can mount the NFS share f ...