Bug 1409624 - Cannot detect valid emulator command when using Android Tools 26. r?nalexander
Although there is emulator command in android_sdk_root/tools even if Android
Tools 26, it doesn't work well becasue emulator64-arm is missing in same
directory.
Valild emulator command moves from android_sdk_root/tools to
android_sdk_root/emulator from Android Tools 26 (updated by sdkmanager).
MozReview-Commit-ID: 4IGHK3YcZXD
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -258,19 +258,26 @@ case "$target" in
android_tools="$android_sdk_root"/tools
AC_MSG_CHECKING([for Android tools])
if test -d "$android_tools" -a -f "$android_tools/emulator"; then
AC_MSG_RESULT([$android_tools])
else
AC_MSG_ERROR([You must install the Android tools. Try |mach bootstrap|. (Looked for $android_tools)])
fi
- MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_tools])
+ dnl Android Tools 26 changes emulator path.
+ dnl Although android_sdk_root/tools still has emulator command,
+ dnl it doesn't work correctly
+ MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_sdk_root/emulator])
if test -z "$EMULATOR" -o "$EMULATOR" = ":"; then
- AC_MSG_ERROR([The program emulator was not found. Try |mach bootstrap|.])
+ dnl old emulator path until Android Tools 25.x
+ MOZ_PATH_PROG(EMULATOR, emulator, :, [$android_tools])
+ if test -z "$EMULATOR" -o "$EMULATOR" = ":"; then
+ AC_MSG_ERROR([The program emulator was not found. Try |mach bootstrap|.])
+ fi
fi
# `compileSdkVersion ANDROID_COMPILE_SDK_VERSION` is Gradle-only,
# so there's no associated configure check.
ANDROID_COMPILE_SDK_VERSION=$1
ANDROID_TARGET_SDK="${android_target_sdk}"
ANDROID_SDK="${android_sdk}"
ANDROID_SDK_ROOT="${android_sdk_root}"