From 1a2737c2dfbfc66bcfbe360230de1a9d51a9859d Mon Sep 17 00:00:00 2001 From: Maciej Stosio Date: Fri, 29 Nov 2024 19:49:18 +0100 Subject: [PATCH 1/2] Update AndroidEmulatorDevice.ts --- .../vscode-extension/src/devices/AndroidEmulatorDevice.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vscode-extension/src/devices/AndroidEmulatorDevice.ts b/packages/vscode-extension/src/devices/AndroidEmulatorDevice.ts index 3b6b3f494..bb150ecd8 100644 --- a/packages/vscode-extension/src/devices/AndroidEmulatorDevice.ts +++ b/packages/vscode-extension/src/devices/AndroidEmulatorDevice.ts @@ -387,7 +387,7 @@ export class AndroidEmulatorDevice extends DeviceBase { const extractPidFromLogcat = async (cancelToken: CancelToken) => new Promise((resolve, reject) => { const regexString = `Start proc ([0-9]{4}):${build.packageName}`; - const process = exec(ADB_PATH, ["logcat", "-e", regexString, "-T", "1"]); + const process = exec(ADB_PATH, ["-s", this.serial!, "logcat", "-e", regexString, "-T", "1"]); cancelToken.adapt(process); lineReader(process).onLineRead((line) => { @@ -422,7 +422,7 @@ export class AndroidEmulatorDevice extends DeviceBase { this.nativeLogsOutputChannel.clear(); const pid = await extractPidFromLogcat(this.nativeLogsCancelToken); - const process = exec(ADB_PATH, ["logcat", "--pid", pid]); + const process = exec(ADB_PATH, ["-s", this.serial!, "logcat", "--pid", pid]); this.nativeLogsCancelToken.adapt(process); lineReader(process).onLineRead(this.nativeLogsOutputChannel.appendLine); From 8a76dd361f799ad81e8cb02e889af6c224f43bd7 Mon Sep 17 00:00:00 2001 From: Maciej Stosio Date: Fri, 29 Nov 2024 19:56:29 +0100 Subject: [PATCH 2/2] chore: fix lint --- .../src/devices/AndroidEmulatorDevice.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/vscode-extension/src/devices/AndroidEmulatorDevice.ts b/packages/vscode-extension/src/devices/AndroidEmulatorDevice.ts index bb150ecd8..56b010d05 100644 --- a/packages/vscode-extension/src/devices/AndroidEmulatorDevice.ts +++ b/packages/vscode-extension/src/devices/AndroidEmulatorDevice.ts @@ -387,7 +387,15 @@ export class AndroidEmulatorDevice extends DeviceBase { const extractPidFromLogcat = async (cancelToken: CancelToken) => new Promise((resolve, reject) => { const regexString = `Start proc ([0-9]{4}):${build.packageName}`; - const process = exec(ADB_PATH, ["-s", this.serial!, "logcat", "-e", regexString, "-T", "1"]); + const process = exec(ADB_PATH, [ + "-s", + this.serial!, + "logcat", + "-e", + regexString, + "-T", + "1", + ]); cancelToken.adapt(process); lineReader(process).onLineRead((line) => {