ADB shell的dumpsys命令-查看android组件信息详解
基本使用命令:dumpsys activity -h
Activity manager dump options:[-a][-c][-p package][-h][cmd]...//这个是后面可以跟的参数 cmd may be one of://这个代表可以跟的命令 a[ctivities]: activity stack state //activity的栈信息 r[recents]: recent activities state//最新的acivity的信息 b[roadcasts][PACKAGE_NAME][history [-s]]: broadcast state//broadcastsde 相关信息 i[ntents][PACKAGE_NAME]: pending intent state//intent的信息 p[rocesses][PACKAGE_NAME]: process state//进程相关的信息 o[om]:out of memory management//内存溢出 prov[iders][COMP_SPEC ...]: content provider state//provider信息 provider [COMP_SPEC]: provider client-side state s[ervices][COMP_SPEC ...]: service state as[sociations]: tracked app associations service [COMP_SPEC]: service client-side state package[PACKAGE_NAME]: all state related to given package all:dump all activities //输出所有的activity信息 top:dump the top activity//输出当前栈顶的activity信息 write: write all pending state to storage track-associations: enable association tracking untrack-associations: disable and clear association tracking cmd 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, a hex object identifier.-a: include all available server state.-c: include client state.-p: limit output to given package.
常见的命令使用介绍
1.dumpsys activity top
拿到一个新的app,我们经常定位当前的焦点activoty的名字。
这个命令就可以显示,而且还可以显示包含的fragment‘的信息、
2.dumpsys activity | grep run
过滤目前的所有的activity栈信息。
3.dumpsys activity -p 包名
过滤一个包的信息。
相关推荐
huha 2020-10-16
magic00 2020-08-03
yangChong 2020-07-29
adb shell cd system/app rm *.apk21. 获取管理员权限: adb root22. 启动Activity: adb shell am start -n 包名/包名+类名。
蓝天梦 2020-07-28
applecarelte 2020-07-05
xiaobater 2020-07-04
QCkiss 2020-06-21
freerocker 2020-05-25
doomvsjing 2020-04-16
qingshuoyisheng 2020-04-07
安辉 2020-03-28
2、在设置好端口后就可输入命令连接:adb connect 192.168.2.36:5555,后面的:5555可以不用输入,例如我设置的:6666端口,则通过如下指令连接:。映像名称 PID 会话名
fengyeezju 2020-03-02
applecarelte 2020-02-23
Soinice 2020-02-18
woxxoole 2020-02-02
goodby 2020-01-09
蓝天梦 2020-01-02
SciRui 2019-12-29
xiaobater 2019-12-27
KarlMarxs 2019-12-19
Yyqingmofeige 2019-12-23
goodby 2019-12-16
zhaoyufei 2019-11-30
qingshuoyisheng 2019-11-15
RayDon 2010-11-03