Make emulator script run without tools in path

This commit is contained in:
Emil Rangden 2014-09-17 20:58:09 +02:00
parent d7124e8c34
commit 17d7f653c3

View file

@ -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