dumpsys 常用命令

来源:互联网 发布:优学派软件下载 编辑:程序博客网 时间:2024/05/29 16:21

查看手机各类服务的项目:

adb shell service list;

查看应用的内存使用情况:

adb shell dumpsys meminfo packagenameorpid

查看servicecs使用细节

adb shell dumpsys activity services
查看activity使用细节

adb shell dumpsys activity
dumpsys命令可以显示手机中所有应用程序的信息,并且也会给出现在手机的状态。

adb shell dumpsys statusbar 显示状态栏相关的信息

查看某个应用(包)启动了几个服务。如:
dumpsys activity services com.android.settings
ACTIVITY MANAGER SERVICES (dumpsys activity services)
User 0 active services:
* ServiceRecord{e2ff42 u0 com.android.settings/com.tpw.download.DownloadService}
intent={cmp=com.android.settings/com.tpw.download.DownloadService}
packageName=com.android.settings
processName=com.android.settings
baseDir=/system/priv-app/Settings/Settings.apk
dataDir=/data/user/0/com.android.settings
app=ProcessRecord{693c84 15514:com.android.settings/1000}
isForeground=true foregroundId=2130837737 foregroundNoti=Notification(pri=-2 contentView=com.android.settings/0x1090088 vibrate=null sound=null defaults=0x0 flags=0x62 color=0xff607d8b vis=PRIVATE)
createTime=-30s676ms startingBgTimeout=-15s674ms
lastActivity=-30s675ms restartTime=-30s675ms createdFromFg=false
startRequested=true delayedStop=false stopIfKilled=false callStart=true lastStartId=1

原创粉丝点击