Re: to get process id of an application running on android device

1,619 views
Skip to first unread message

Christopher Tate

unread,
Jan 18, 2013, 3:08:25 PM1/18/13
to android-...@googlegroups.com
Are you doing this programmatically?  You want to do what the 'ps' shell program does: look in /proc to see the PIDs of all running processes.  Each directory entry that corresponds to a process (e.g. /proc/1037 for PID 1037) is owned by the UID under which the process is running.

Note that knowing the UID might not uniquely identify a single process that is hosting the application, because an application can spread its components across multiple processes, all of which run under the same UID.

--
christopher tate
android framework engineer



On Fri, Jan 18, 2013 at 3:28 AM, lgaur <lokes...@gmail.com> wrote:
Hi All,


I want to get the process ids of applications running on android device . I know UID of an application , how can i retrieve process id using UID of application ?
Here process id should be of the process which linux kernel will provide for execution of application .

Regards
Lokesh

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-platform/-/aOdEOruyZkkJ.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Reply all
Reply to author
Forward
0 new messages