Share via


UiAutomation.ExecuteShellCommandRw(String) Method

Definition

Executes a shell command.

[Android.Runtime.Register("executeShellCommandRw", "(Ljava/lang/String;)[Landroid/os/ParcelFileDescriptor;", "", ApiSince=31)]
public Android.OS.ParcelFileDescriptor[] ExecuteShellCommandRw (string command);
[<Android.Runtime.Register("executeShellCommandRw", "(Ljava/lang/String;)[Landroid/os/ParcelFileDescriptor;", "", ApiSince=31)>]
member this.ExecuteShellCommandRw : string -> Android.OS.ParcelFileDescriptor[]

Parameters

command
String

The command to execute.

Returns

File descriptors (out, in) to the standard output/input streams.

Attributes

Remarks

Executes a shell command. This method returns two file descriptors, one that points to the standard output stream (element at index 0), and one that points to the standard input stream (element at index 1). The command execution is similar to running "adb shell <command>" from a host connected to the device.

<strong>Note:</strong> It is your responsibility to close the returned file descriptors once you are done reading/writing.

Java documentation for android.app.UiAutomation.executeShellCommandRw(java.lang.String).

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