UiAutomation.AdoptShellPermissionIdentity Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| AdoptShellPermissionIdentity() |
Adopt the permission identity of the shell UID for all permissions. |
| AdoptShellPermissionIdentity(String[]) |
Adopt the permission identity of the shell UID only for the provided permissions. |
AdoptShellPermissionIdentity()
Adopt the permission identity of the shell UID for all permissions.
[Android.Runtime.Register("adoptShellPermissionIdentity", "()V", "", ApiSince=29)]
public void AdoptShellPermissionIdentity();
[<Android.Runtime.Register("adoptShellPermissionIdentity", "()V", "", ApiSince=29)>]
member this.AdoptShellPermissionIdentity : unit -> unit
- Attributes
Remarks
Adopt the permission identity of the shell UID for all permissions. This allows you to call APIs protected permissions which normal apps cannot hold but are granted to the shell UID. If you already adopted all shell permissions by calling this method or adoptShellPermissionIdentity(String...) a subsequent call will replace any previous adoption. Note that your permission state becomes that of the shell UID and it is not a combination of your and the shell UID permissions. Note: Calling this method adopts all shell permissions and overrides any subset of adopted permissions via adoptShellPermissionIdentity(String...).
See also:
Android reference for android.app.UiAutomation.adoptShellPermissionIdentity.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
AdoptShellPermissionIdentity(String[])
Adopt the permission identity of the shell UID only for the provided permissions.
[Android.Runtime.Register("adoptShellPermissionIdentity", "([Ljava/lang/String;)V", "", ApiSince=29)]
public void AdoptShellPermissionIdentity(params string[]? permissions);
[<Android.Runtime.Register("adoptShellPermissionIdentity", "([Ljava/lang/String;)V", "", ApiSince=29)>]
member this.AdoptShellPermissionIdentity : string[] -> unit
Parameters
- permissions
- String[]
String: The permissions to adopt or null to adopt all.
- Attributes
Remarks
Adopt the permission identity of the shell UID only for the provided permissions. This allows you to call APIs protected permissions which normal apps cannot hold but are granted to the shell UID. If you already adopted shell permissions by calling this method, or adoptShellPermissionIdentity() a subsequent call will replace any previous adoption. Note: This method behave differently from adoptShellPermissionIdentity(). Only the listed permissions will use the shell identity and other permissions will still check against the original UID
See also:
Android reference for android.app.UiAutomation.adoptShellPermissionIdentity.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.