title: Can I ask the system to reload my app permissions?
body: <p>Is there any way to programmaticaly ask the Android to reload/regrant my app permissions without reinstalling the app or rebooting the device on a non-rooted device?</p>
  <h1>Why do I need it?</h1>
  <p>My app (ClientApp) is binding to a service declared in AIDL by another app (ServiceApp). ServiceApp is a third-party app which I can't modify and it declares a permission that ClientApp needs to bind to its service, so I added that permission to my ClientApp's manifest:</p>
  <pre><code>&lt;uses-permission android:name=&quot;com.example.service.API&quot; /&gt;
  </code></pre>
  <p>When I install ServiceApp before installing ClientApp everything works fine. However, when I first install ClientApp and then install ServiceApp I get an exception when calling bindService on ServiceApp's service in ClientApp:</p>
  <pre><code>java.lang.SecurityException: Not allowed to bind to service Intent { act=com.example.service.API pkg=com.example.service }
  </code></pre>
  <p>My understanding is that my app is not granted the requested permission on installation because it's not declared in the system before ServiceApp is installed. I can fix it on Android &lt; 5.0 by declaring ServiceApp's permission in ClientApp's manifest but it's not possible in Android 5.0+ because of security reasons.</p>
  <p>If I could somehow reload the permissions (which apparently happens on device reboot) from my code I could solve the problem.</p>