title: adb can list devices but adb shell/logcat doesn't work
body: <h3>Short version</h3>
  <p><code>adb devices</code> can list device, but <code>adb shell</code> or <code>adb logcat</code> just hang and don't work.</p>
  <h3>Long version</h3>
  <p>Here are various command outputs.</p>
  <pre><code>/* system info */
  $ uname -a
  Linux ubuntu-vm 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64    x86_64 GNU/Linux
  
  /* udev info */
  $ cat /etc/udev/rules.d/51-android.rules 
  SUBSYSTEM==&quot;usb&quot;, ATTR{idVendor}==&quot;04e8&quot;, MODE=&quot;0666&quot;, GROUP=&quot;plugdev&quot; 
  
  $ lsusb
  Bus 001 Device 003: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-P7500 [Galaxy Tab 10.1]
  Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
  Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
  
  
  
  $ adb devices -l
  List of devices attached 
  0A3C294805017006       device usb:1-1 product:full_toroplus model:Full_AOSP_on_Toroplus device:toroplus
  
  $ adb shell
  /* no output, just hang */
  
  $ adb logcat
  /* no output either */
  
  /* verbose mode */
  $ ADB_TARCE=1 adb shell
  system/core/adb/adb.c::main():Handling commandline()
  system/core/adb/commandline.c::adb_commandline():starting interactive shell
  system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:version
  ..........
  4f4b4159 OKAY
  system/core/adb/adb_client.c::switch_socket_transport():Switch transport success
  system/core/adb/transport.c::writex():writex: fd=3 len=4: 30303036 0006
  system/core/adb/transport.c::writex():writex: fd=3 len=6: 7368656c6c3a shell:
  system/core/adb/transport.c::readx():readx: fd=3 wanted=4
  /* hang at this point */
  </code></pre>
  <p>It seems that adb server is expecting some data from phone but can not get it, thus it's stuck there.</p>
  <p>I've tried:</p>
  <ul>
  <li>kill and restart adb server</li>
  <li>unplug and then plug phone</li>
  <li>reboot phone</li>
  <li>disable usb debug on phone and then enable it</li>
  </ul>
  <p>Sometimes, after unplug/plug the phone, it will work for a while (I can do <code>adb shell</code>), but soon it stops working. And most of the time, unplug/plug phone even has no effect at all!</p>
  <p>I'm running ubuntu as vmplayer guest. Host is windows 7.</p>
  <p>Thanks in advance for any help or hints.</p>
  <h1>UPDATE</h1>
  <p>After plug the phone into rear usb port, it suddenly works! But I'm not sure the problem is really solved. Will see.</p>