I've a Samsung Galaxy S2 device which I had been using for Android development through adb for almost two month. A few days ago it just stoppt detecting the usb connection with my Thinkpad T420. Here are the odd facts:
Are there other options then to try a full factory reset?
By pure luck I plugged the cable into the device while the Android OS was switching to offline mode (selected from the menu which appears when long-pressing the power button). That did the trick!
After some experiments I can verify using the transitions between offline and online mode to plug the cable into the PC is a workaround -- not a fix to the problem.