Home > android, linux, tools > Eclipse lockups, adb, Linux, ModemManager

Eclipse lockups, adb, Linux, ModemManager

I’ve been seeing Eclipse freeze spontaneously lately, both in Fedora 20 (my daily environment) and Ubuntu 14.04 / 14.10 (separate boot for playing with Android L).


I tracked down the issue (using jstack) to an adb related thread inside Eclipse Android Tools. Doing adb kill-server would end the freeze, until the next time.

Then I had an idea to check the system log the next time it would happen. Interesting. Turns out, ModemManager, a part of NetworkManager (used by both Ubuntu and Fedora for automated network configuration) was:

– recognizing my Android phones as modems
– trying to determine their capabilities
– timing out when doing that (but taking a few seconds to do so)
– and this was causing the adb thread inside Eclipse to wait, freezing the Eclipse UI

Two possible workarounds, I’m using the second one:

– switching USB connect mode in each phone’s settings from MTP (default) to Camera
– adding stuff to udev configuration to blacklist the Android phones from ModemManager‘s automatic detection


# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="wheel", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="wheel", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="wheel", ENV{ID_MM_DEVICE_IGNORE}="1"

The ENV{ID_MM_DEVICE_IGNORE}="1" stuff at the end tells ModemManager that the device is not a modem.

PS – to be fair, Android phones can act like modems, when enabled in the phone’s system settings. Why they also look like modems, but don’t respond to commands, even when this setting is off.. Who knows?

PPS – there appears to be no way to uninstall ModemManager from Fedora and keep NetworkManager, too bad.

Categories: android, linux, tools
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s