Search code examples
androidmeteoradb

how to use adb and meteor at the same time


It seems that Meteor CLI doesn't play nice with ADB.

After using ADB commands, for example adb logcat, running meteor run android-device meteor doesn't find the connected android device:

ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: ERROR: Failed to deploy to device, no devices found.

If I then try adb devices to see if the device is connected I get:

adb server is out of date.  killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error: 

Only completely killing all processes associated with the port I can get adb devices to work, but even then when I see my device, meteor still cannot find it.

Another method I devised is to start only the server using meteor and use adb install to install the built android debug apk. However while running the app this way it seems that it doesn't always refresh upon code changes.


Solution

  • It sounds like there are two adb servers that conflict with each other. Either use Meteor's adb or make meteor use your existing adb:

    Use USE_GLOBAL_ADK=t meteor run.. to start your app instead of meteor run.. to run your app. This would require your ANDROID_SDK env variable to be set too which is usually done by your previous installation.