語言

UiAutomation.ExecuteShellCommandRw(String) 方法

定義

執行一個殼牌指令。

[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[]

參數

command
String

要執行的命令。

傳回

將描述符(輸出、輸入)檔案到標準輸出/輸入串流。

屬性

備註

執行一個殼牌指令。 此方法回傳兩個檔案描述符,一個指向標準輸出串流(元素位於索引 0),另一個指向標準輸入串流(元素位於索引 1)。 指令執行類似於從連接裝置的主機執行「adb shell <指令>」。 注意:完成閱讀/寫入後,您有責任關閉回傳的檔案描述符。

Android 參考資料。android.app.UiAutomation.executeShellCommandRw

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於