Rinkal Bhanderi Rinkal Bhanderi - 28 days ago 27
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

ADB
command if i know the package name?

Answer

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
Comments