美文网首页
ADB命令查看App主进程和私有进程PID小记

ADB命令查看App主进程和私有进程PID小记

作者: anliner | 来源:发表于2021-05-31 10:20 被阅读0次

假设App包名为com.something,使用多进程的页面标记进程名为":test",使用

adb shell pidof com.something

只能查看到主进程的pid,想要查看com.something:test,则必须写全

adb shell pidof com.something:test

而使用

adb shell "ps|grep com.something"  // linux、macos、windows
adb shell ps|findstr com.something  // windows

即可查看到两个进程的基本信息

当然,前提是使用多进程时指定的进程名是以":xxx"或”App包名.xxx“,因为此命令是在adb shell ps的基础上进行pname的过滤,如果子进程使用的name是其他规则,只能单独查看。

相关文章

网友评论

      本文标题:ADB命令查看App主进程和私有进程PID小记

      本文链接:https://www.haomeiwen.com/subject/jzivsltx.html