@smbcloud / cli / commits / e69cb00

Keep AndroidKit instrumentation attached

Co-Authored-By: siGit Code <noreply@sigit.si>

Seto Elkahfi committed Sep 10, 2026 at 13:49 UTC e69cb000b85e6270ea7dfbeebc25552dc891fbf6
1 file changed +5 -15
crates/xcrs/src/xcrs.rs
+5 -15
@@ -957,21 +957,11 @@ impl AndroidDebugBridge {
957 }
958
959 pub fn start_androidkit(&self, serial: &str) -> Result<()> {
960 - Command::new(&self.adb_path)
961 - .args([
962 - "-s",
963 - serial,
964 - "shell",
965 - "am",
966 - "instrument",
967 - "-w",
968 - "-r",
969 - "xyz.smbcloud.xcrs.androidkit/.AndroidKitInstrumentation",
970 - ])
971 - .stdout(Stdio::null())
972 - .stderr(Stdio::null())
973 - .spawn()
974 - .with_context(|| format!("failed to start AndroidKit on {serial}"))?;
960 + self.run_shell(
961 + serial,
962 + "nohup am instrument -w -r xyz.smbcloud.xcrs.androidkit/.AndroidKitInstrumentation >/dev/null 2>&1 &",
963 + )
964 + .with_context(|| format!("failed to start AndroidKit on {serial}"))?;
965 Ok(())
966 }
967