title: ADB pm grant not working for some permissions on Android 10
body: <p>I'm trying the new android 10 and checking its differences with previous versions. I tried to grant some permissions through <code>ADB</code> that used to work on Android 9 but to no avail.</p>
  
  <p>Since it is ADB related, I'm not sure where to check it documentation, but here is what I tried:</p>
  
  <pre><code>pm grant my.package.app android.permission.ACCESS_BACKGROUND_LOCATION // permission granted
  pm grant my.package.app android.permission.READ_PHONE_STATE // no error no permission granted
  pm grant my.package.app android.permission.RECORD_AUDIO // no error no permission granted
  pm grant my.package.app android.permission.WRITE_EXTERNAL_STORAGE // no error no permission granted
  pm revoke my.package.app android.permission.READ_PHONE_STATE // permission revoked
  pm revoke my.package.app android.permission.RECEIVE_SMS // permission revoked
  </code></pre>
  
  <p>Those are all permissions declared in the <code>AndroidManifest.xml</code> file, it is strange that only the new <code>ACCESS_BACKGROUND_LOCATION</code> worked but none of the existing permissions did.
  I believe the permission's names are correct because it works when revoking it.</p>
  
  <p>Alternatively, I tried to find the string for those permissions and use the <code>appops</code> command but it didn't work either.</p>
  
  <p>Any help appreciated.</p>
  
  <p>EDIT:</p>
  
  <p>After further investigation, I noticed that when an app is <strong>Freshly</strong> installed then I use <code>pm grant</code> every thing works as expected. However after denying the permission manually (from settings) <code>pm grant</code> is not working anymore</p>