adb connection problem on Kubuntu 13.04 x64
I've had a similar problem with a Rockchip device.  Short adb shell commands worked, but ones with multi-line output just disconnected randomly, sometimes before producing any output.

On plugging the device in, the kernel syslogged the following:

Dec 30 20:38:03 icebox kernel: [ 1153.016178] usb 9-1.1: new high-speed USB device number 4 using xhci_hcd
Dec 30 20:38:03 icebox kernel: [ 1153.032476] usb 9-1.1: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
Dec 30 20:38:03 icebox kernel: [ 1153.038276] usb 9-1.1: New USB device found, idVendor=2207, idProduct=0006
Dec 30 20:38:03 icebox kernel: [ 1153.038281] usb 9-1.1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Dec 30 20:38:03 icebox kernel: [ 1153.038284] usb 9-1.1: Product: rk30sdk
Dec 30 20:38:03 icebox kernel: [ 1153.038287] usb 9-1.1: Manufacturer: rockchip
Dec 30 20:38:03 icebox kernel: [ 1153.038290] usb 9-1.1: SerialNumber: 0123456789ABCDEF
Dec 30 20:38:03 icebox colord: Device added: sysfs-rockchip-rk30sdk


Out of desperation I moved the device from a USB3 socket on my Linux box to a USB2 socket, as follows

Dec 30 20:45:03 icebox kernel: [ 1572.844024] usb 1-3: new high-speed USB device number 2 using ehci-pci
Dec 30 20:45:03 icebox kernel: [ 1572.976394] usb 1-3: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
Dec 30 20:45:03 icebox kernel: [ 1572.976889] usb 1-3: New USB device found, idVendor=2207, idProduct=0006
Dec 30 20:45:03 icebox kernel: [ 1572.976893] usb 1-3: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Dec 30 20:45:03 icebox kernel: [ 1572.976896] usb 1-3: Product: rk30sdk
Dec 30 20:45:03 icebox kernel: [ 1572.976899] usb 1-3: Manufacturer: rockchip
Dec 30 20:45:03 icebox kernel: [ 1572.976902] usb 1-3: SerialNumber: 0123456789ABCDEF
Dec 30 20:45:03 icebox colord: Device added: sysfs-rockchip-rk30sdk


and adb shell then worked perfectly. You will notice the warning bulk endpoint 0x81 has invalid maxpacket 64. This means the Rockchip device is not compliant with the USB standards. My guess is that the Linux ehci-pci driver is more forgiving than the xhci_hcd driver.

Interestingly enough, I saw exactly the same behaviour on a Mac laptop, when I plugged in the Rockchip device. There, the kernel syslogged:

Dec 29 21:54:33 dhcp13 kernel[0]: USBF: 889121. 50      Endpoint 0x81 of the USB device "rk30sdk" at location 0x26400000:  converting Bulk MPS from 64 to 512 (USB 2.0 Spec section 5.8.3)


and adb shell broke in exactly the same way.

TL;DR:

Plugging into a USB2 port instead of a USB3 port might solve the issue.

Good luck!