Rinkal Bhanderi Rinkal Bhanderi - 4 months ago 63
Android Question

How to detect running app using ADB command

I have one Android Device running Jelly Bean OS.

Is there any way to detect the process is running or not using

command if i know the package name?


No need to use grep. ps in Android can filter by COMM value (last 15 characters of the package name in case of java app)

Let's say we want to check if com.android.phone is running:

adb shell ps m.android.phone
USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME
radio     1389  277   515960 33964 ffffffff 4024c270 S com.android.phone