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?