anchor.diff:                appPath="${app}"
             fi
   
  -          ${androidsdkComposition}/libexec/android-sdk/platform-tools/adb -s emulator-$port install "$appPath"
  +          ${sdk}/libexec/android-sdk/platform-tools/adb -s emulator-$port install "$appPath"
         fi
   
         # Start the application
         ${stdenv.lib.optionalString (package != null && activity != null) ''
  -          ${androidsdkComposition}/libexec/android-sdk/platform-tools/adb -s emulator-$port shell am start -a android.intent.action.MAIN -n ${package}/${activity}
  +          ${sdk}/libexec/android-sdk/platform-tools/adb -s emulator-$port shell am start -a android.intent.action.MAIN -n ${package}/${activity}
         ''}
       ''}
       EOF
  
positive.code:     export ANDROID_SERIAL="emulator-$port"
  
      # Create a virtual android device for testing if it does not exists
      ${androidsdkComposition}/libexec/android-sdk/tools/android list targets
  
      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 1 --abi ${systemImageType}/${abiVersion} $NIX_ANDROID_AVD_FLAGS
  
          ${stdenv.lib.optionalString enableGPU ''
            # Enable GPU acceleration
  
negative.code:     ''}
  
      # We need to specify the location of the Android SDK root folder
      export ANDROID_SDK_ROOT=${sdk}/libexec/android-sdk
  
      # We have to look for a free TCP port
  
  