From d8824fb1304707d958b72a2436f553402a3f334d Mon Sep 17 00:00:00 2001 From: Ranesh Saha Date: Wed, 17 Nov 2021 05:09:42 -0800 Subject: [PATCH] =?UTF-8?q?Update=20emulator=20path=20to=20emulator=20dire?= =?UTF-8?q?ctory=20instead=20of=20deprecated=20tool=E2=80=A6=20(#3046)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: …s directory Currently, flipper tries to launch emulators using `\tools\emulator.exe`. The use of this emulator path has been deprecated for a while now, and remains in the sdk for those on versions of Android Studio 2.2 and older (see https://issuetracker.google.com/issues/66886035?pli=1). The supported path is `\emulator\emulator.exe`. Trying to use the deprecated path on Windows results in a failure to launch AVDs. ## Changelog Point emulator path to emulator directory instead of deprecated tools directory. Pull Request resolved: https://github.com/facebook/flipper/pull/3046 Test Plan: Verified a failure to launch the AVD on windows using the deprecated path. Confirmed that updating the path results in a successful launch and the device showing up in flipper. Reviewed By: passy Differential Revision: D32489840 Pulled By: nikoant fbshipit-source-id: dde5bf5a29e89549f160d9d71133ff70398e1c1d --- .../flipper-server-core/src/devices/android/AndroidDevice.tsx | 2 +- .../src/devices/android/androidDeviceManager.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/flipper-server-core/src/devices/android/AndroidDevice.tsx b/desktop/flipper-server-core/src/devices/android/AndroidDevice.tsx index 16294ad80..d54a57e67 100644 --- a/desktop/flipper-server-core/src/devices/android/AndroidDevice.tsx +++ b/desktop/flipper-server-core/src/devices/android/AndroidDevice.tsx @@ -283,7 +283,7 @@ export async function launchEmulator(name: string, coldBoot: boolean = false) { .catch(() => join( process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT || '', - 'tools', + 'emulator', 'emulator', ), ) diff --git a/desktop/flipper-server-core/src/devices/android/androidDeviceManager.tsx b/desktop/flipper-server-core/src/devices/android/androidDeviceManager.tsx index 94b53ce9f..a28709064 100644 --- a/desktop/flipper-server-core/src/devices/android/androidDeviceManager.tsx +++ b/desktop/flipper-server-core/src/devices/android/androidDeviceManager.tsx @@ -129,7 +129,7 @@ export class AndroidDeviceManager { } catch (_e) { this.emulatorPath = join( process.env.ANDROID_HOME || process.env.ANDROID_SDK_ROOT || '', - 'tools', + 'emulator', 'emulator', ); }