     adb = logcat = null
 
     dir = "build/android/app/build/outputs/apk"
-    cmd = "#{adbPath} install -r #{dir}/#{apkFileName}"
+    cmd = "#{adbPath} install -r #{dir}/#{mode}/#{apkFileName}"
     adb = cp.exec cmd, (err) ->
         if err
             logLine.error 'Cannot install APK', err
             logLine.stop()
-            apkFiles = cp.execSync "ls -l #{dir}"
+            apkFiles = cp.execSync "ls -l #{dir}/*"
             log.debug "Available APK files: #{apkFiles}"
             callback err
             return


module.exports = (options, callback = ->) ->
    callbackCalled = false
    mode = if options.release then 'release' else 'develop'

    logLine = log.line().timer().repeat().loading 'Installing APK...'
    packageFile = JSON.parse fs.readFileSync('./package.json', 'utf-8')

        sdkDir = process.env.ANDROID_HOME

    adbPath = "#{sdkDir}/platform-tools/adb"
    apkFileName = "app-universal-#{mode}.apk"

    if options.deviceSerialNumber
        adbPath += " -s #{options.deviceSerialNumber}"
