Udostępnij za pośrednictwem


UiAutomation.AdoptShellPermissionIdentity Method

Definition

Overloads

AdoptShellPermissionIdentity()

Adopt the permission identity of the shell UID for all permissions.

AdoptShellPermissionIdentity(String[])

Adopt the permission identity of the shell UID for all 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.

<strong>Note:<strong/> Calling this method adopts all shell permissions and overrides any subset of adopted permissions via #adoptShellPermissionIdentity(String...).

Java documentation 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 for all 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[]
Attributes

Remarks

Java documentation 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