docs: Added new adb permissions shell commands

Updated adb shell pm grant and ...revoke for new M functionality
(you can grant and revoke system permissions). Noted new install -g
flag (to install with full permissions).

See comment after patch set 2 for doc stage location.

bug: 23725768
bug: 21744132
Change-Id: Ibb3a7d0a87a83bd95c922bd81a4156305eb332e2
This commit is contained in:
Andrew Solovay
2015-09-11 14:52:33 -07:00
parent 419c9f1348
commit 5d9e27ec41

View File

@@ -570,6 +570,7 @@ install [options] <PATH>
<li>{@code -s}: Install package on the shared mass storage (such as sdcard).
<li>{@code -f}: Install package on the internal system memory.
<li>{@code -d}: Allow version code downgrade.
<li>{@code -g}: Grant all permissions listed in the app manifest.
</ul>
</td>
</tr>
@@ -622,21 +623,23 @@ disable-user [options] &lt;PACKAGE_OR_COMPONENT>
<tr>
<td><code>
grant &lt;PACKAGE_PERMISSION>
grant &lt;PACKAGE_NAME&gt; &lt;PERMISSION&gt;
</code></td>
<td>Grant permissions
to applications. Only optional permissions the application has
declared can be granted.
<td>Grant a permission to an app. On devices running Android 6.0 (API level 23)
and higher, may be any permission declared in the app manifest. On devices
running Android 5.1 (API level 22) and lower, must be an optional permission defined by the
app.
</td>
</tr>
<tr>
<td><code>
revoke &lt;PACKAGE_PERMISSION>
revoke &lt;PACKAGE_NAME&gt; &lt;PERMISSION&gt;
</code></td>
<td>Revoke permissions
to applications. Only optional permissions the application has
declared can be revoked.
<td>Revoke a permission from an app. On devices running Android 6.0 (API level
23) and higher, may be any permission declared in the app manifest. On devices
running Android 5.1 (API level 22) and lower, must be an optional permission defined by the
app.
</td>
</tr>
@@ -895,4 +898,4 @@ $ adb pull /sdcard/demo.mp4
<td>&nbsp;</td>
</tr>
</table>
</table>