1、xxx@xxx:~$ adb shell ps
| USER | PID | PPID | VSIZE | RSS | WCHAN | PC | NAME |
| root | 1 | 0 | 20596 | 2948 | SyS_epoll_ | 00004cb7c8 | S /init |
| system | 339 | 1 | 9280 | 3060 | binder_thr | 78a6bf6884 | S /system/bin/servicemanager |
| u0_a119 | 4954 | 484 | 1806396 | 146164 | SyS_epoll_ | 00e8f3e428 | S com.tencent.mm |
| system | 4497 | 483 | 1497648 | 94916 | SyS_epoll_ | 77af5bf794 | S cn.richinfo.dm |
| USER | PID | PPID | VSIZE | RSS | WCHAN | PC | NAME |
| 用户 | 进程号 | 虚存 | 物理内存 | 包名 |
2、查找某个包名的进程号,如com.tencent.mm,如下得运行结果com.tencent.mm PID为4954,com.tencent.mm:pushPID为5057.
xx@xx:~$ adb shell ps | grep com.tencent.mm
u0_a119 4954 484 1806396 145448 SyS_epoll_ 00e8f3e428 S com.tencent.mm
u0_a119 5057 484 1544788 103900 SyS_epoll_ 00e8f3e428 S com.tencent.mm:push
本文介绍如何使用adb工具查询Android设备上特定包名对应的进程号(PID)。通过示例展示查找com.tencent.mm及其子进程com.tencent.mm:push的方法。
2178

被折叠的 条评论
为什么被折叠?



