Merge pull request #4131 from monocell/androidEmuFix

Make emulator script run without tools in path
This commit is contained in:
Sander van der Burg 2014-09-17 21:09:44 +02:00
commit 94e324efc5

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