0

Now I was using the app1 to start the app2 from the packageName of app2. And then, I need to get the app2's pid and uid.

I have tried exec the shell pidof and ps grep, but it can only get the app1's pid. I've also tried the function getRunningAppProcesses(), but without any effect. I supposed that if Android 6.0 and above have done something for privacy protection? How can I solve it?

Amira Bedhiafi
  • 8,088
  • 6
  • 24
  • 60
airlet
  • 1
  • Possible duplicate of [How to get PID from package name?](https://stackoverflow.com/questions/25296804/how-to-get-pid-from-package-name) – Alireza Tizfahm Fard Jul 18 '19 at 20:15
  • no, some method proposed in "How to get PID from package name" can't be used in adnroid 6.0 and above successfully. It can only return the pid of the request app itself – airlet Jul 19 '19 at 01:33

0 Answers0