-1

I have all PID. I want to find the exact application name from this pid. Let, a PID = 3355.its package = com.xxxx.yyyyy.actual app name = Mail i dont need the com.xxxx.yyyyy, i need Mail using PID. Thanks

hindol
  • 3
  • 2
  • You can use this code get the process name from process ID http://stackoverflow.com/questions/8542326/android-how-to-get-the-processname-or-packagename-by-using-pid/8543401#8543401 http://stackoverflow.com/questions/5841161/get-application-name-from-package-name Thanks – Juned Oct 26 '12 at 11:37

2 Answers2

1

You can get process detail including environment, commandline ... from the procfs

for example:

cat /proc/3355/cmdline
demwz
  • 26
  • 1
  • thanks :). But, say for gmail cat "/proc/3355/cmdline" command still return like com.google.android.gsf.login. We need the name of App "Gmail". – hindol Oct 29 '12 at 01:46
0

You can do it with -

 ps aux | grep 3355
Sandip Karanjekar
  • 850
  • 1
  • 6
  • 23