title: Get pid from the packageName
body: <p>Now I was using the <code>app1</code> to start the <code>app2</code> from the packageName of <code>app2.</code> And then, I need to get the app2's <code>pid</code> and <code>uid</code>. </p>
  
  <p>I have tried exec the shell <code>pidof</code> and <code>ps grep</code>, but it can only get the app1's <code>pid</code>.  I've also tried the function <code>getRunningAppProcesses()</code>, but without any effect. 
  I supposed that if <code>Android 6.0</code> and above have done something for privacy protection? How can I solve it?</p>