feat: adb restart

This commit is contained in:
AkiChase 2025-03-12 17:21:58 +08:00
parent ee5862412b
commit 2573356b8c
2 changed files with 9 additions and 0 deletions

View File

@ -19,6 +19,14 @@ pub fn adb_devices() -> Result<Vec<Device>, String> {
}
}
#[tauri::command]
pub fn adb_restart_server() -> Result<(), String> {
match ScrcpyClient::adb_restart_server() {
Ok(_) => Ok(()),
Err(e) => Err(e.to_string()),
}
}
#[tauri::command]
/// forward local port to the device port
pub fn forward_server_port(id: String, scid: String, port: u16) -> Result<(), String> {

View File

@ -30,6 +30,7 @@ async fn main() {
})
.invoke_handler(tauri::generate_handler![
command::adb_devices,
command::adb_restart_server,
command::forward_server_port,
command::push_server_file,
command::start_scrcpy_server,