From 17d7f653c34e41e03b0550d7c4123cf1d6e4d249 Mon Sep 17 00:00:00 2001 From: Emil Rangden Date: Wed, 17 Sep 2014 20:58:09 +0200 Subject: [PATCH] Make emulator script run without tools in path --- pkgs/development/mobile/androidenv/emulate-app.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/mobile/androidenv/emulate-app.nix b/pkgs/development/mobile/androidenv/emulate-app.nix index 278c073dc58..cad77ec7d62 100644 --- a/pkgs/development/mobile/androidenv/emulate-app.nix +++ b/pkgs/development/mobile/androidenv/emulate-app.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation { # Create a virtual android device for testing if it does not exists - if [ "$(android list avd | grep 'Name: device')" = "" ] + if [ "$(${androidsdkComposition}/libexec/android-sdk-*/tools/android list avd | grep 'Name: device')" = "" ] then # Create a virtual android device yes "" | ${androidsdkComposition}/libexec/android-sdk-*/tools/android create avd -n device -t ${if useGoogleAPIs then "'Google Inc.:Google APIs:"+platformVersion+"'" else "android-"+platformVersion} $NIX_ANDROID_AVD_FLAGS @@ -106,7 +106,7 @@ stdenv.mkDerivation { ${stdenv.lib.optionalString (app != null) '' # Install the App through the debugger, if it has not been installed yet - if [ -z "${package}" ] || [ "$(adb -s emulator-$port shell pm list packages | grep package:${package})" = "" ] + if [ -z "${package}" ] || [ "$(${androidsdkComposition}/libexec/android-sdk-*/platform-tools/adb -s emulator-$port shell pm list packages | grep package:${package})" = "" ] then if [ -d "${app}" ] then