Android Shell命令dumpsys

来源:互联网 发布:nativeshare.js下载 编辑:程序博客网 时间:2024/05/20 23:34

Android Shell命令dumpsys

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

直接执行adb shell dumpsys会显示以下所有信息。

SurfaceFlinger, accessibility, account, activity, alarm, appwidget, audio, backup, battery, batteryinfo, bluetooth, bluetooth_a2dp, clipboard, connectivity, content, cpuinfo, device_policy, devicestoragemonitor, diskstats, dropbox, entropy, hardware, hdmi, 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, sensor, simphonebook, statusbar, telephony.registry, throttle, uimode, usagestats, vibrator, wallpaper, wifi, window


dumpsys的参数可以跟以上信息的名字。例如:

adb shell dumpsys activity 显示activity相关的信息

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

adb shell dumpsys meminfo package_name or pid 使用程序的包名或者进程id显示内存信息

可以通过这个命令,可以查看内存信息,状态栏的通知是哪个应用谈出来的等等。

其实就一条shell命令:

adb shell dumpsys statusbar grep notification=Notification

这条命令可以找出状态栏通知的包名,进而找到是哪个应用。

0 0
原创粉丝点击