[Galaxy S II General] henryjfry:
I was experiencing massive issues getting adb to work for my phone. It had been working at one stage prior to a firmware update (Now on Android 4.0.4 on a UK Samsung Galaxy s2 i9100) and it randomly stopped working. Im on XP 64 and it may only be an issue for 64 bit operating systems.

Usb debugging had always been set, the drivers were installed, but adb would not work.

Numerous help guides all seem to concentrate on getting the correct drivers to install with kies or with extracted drivers from kies only but this was largely not my problem (or the drivers with kies for the samsung s2 no longer allow adb?) My phone is rooted with superuser and busybox only but otherwise has completely standard firmware (had been rooted and was unrooted when android 4.0.4 was upgraded).

So starting from a point with the drivers installed I can connect to my phone as an MTP, as a Camera, as a Mass Storage device and with Kies. I have Kies installed and have had it reinstall the drivers multiple times but this should probably work fine without Kies and just the latest drivers installed as available from here http://xdaforums.com/showthread.php?t=961956. I have a device listed in Device Manager "Samsung Android ADB Interface" with driver version "2.9.505.831" but no ADB.

It appeared I had an issue with the uart connection on my phone (as shown in the phoneutil screen) and also I needed to be able to install the adb interface driver from the google sdk.

I was able to do neither of these using the standard methods/guides I was able to find elsewhere.

To change the uart setting back to pda and the usb connection back to pda the special code *#7284# no longer works on the Samsung Galaxy s2 i9100 Android 4.0.4 (or at least not for me) I had to download the bettercut apk (which I may very well had to pirate because I couldn't find it in the market) and made a shortcut to phoneutil manually

bettercut > new shortcut > no > all activities > phoneutil

There you can change the settings to modem and back to pda (when connected in modem mode xp listed a new device "7 CDS's" which would not install).

After that I had to install the google driver from the sdk (adt-bundle-windows-x86_64\sdk\extras\google\usb_driver)

And to allow Windows XP 64 to install the drivers you need to edit "android_winusb.inf" to add the samsung galaxy as a valid device.

I added the following lines to [Google.NTx86] and [Google.NTamd64].

android_winusb.inf

[Google.NTx86]

; Samsung galaxy

%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_00

%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_04

%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&adb

%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_6860&adb

[Google.NTamd64]

; Samsung galaxy

%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_00

%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_6860&MI_04

%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6860&adb

%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_6860&adb

I found instructions to add a device USB\VID_04E8&PID_6860&MI_00 however this did not match my phone, I needed to manually determine the device ID and add it myself before windows would let me install the drivers.

Device Manager > Samsung Android Phone > Samsung Android ADB Interface > Properties > Details > Matching Device ID

And the phone ADB interface had the following ID USB\VID_04E8&PID_6860&adb

Which I added as above (if your phone doesnt match you would need to do this too I think). I then updated the driver for "Samsung Android ADB Interface" using the "Android Bootloader Interface" which I can now select from the Google SDK Driver.

Install "Android Bootloader Interface" from google SDK.

I then was able to reinstall the "Samsung Android ADB Interface" driver as before or the "Android Composite ADB Interface" from the google SDK and ADB started working (as tested with ADB Devices, mine is now listed, woot!).

So i think the problem was mainly the lack of the Android Bootloader Interface driver, with the UART thing possibly having some effect?

However I did have adb working BEFORE i decided to re-root my phone (only discovered it stopped working when I couldn't use ADB Explorer however I am failry certain I had used it not 10 minutes before). So why it stopped working I haven't a clue. I am pretty certain nothing changed on my pc, so perhaps setting the uart mode back and forcing the drivers to reinstall was enough to fix it. However maybe adb no longer works for the standard samsung drivers and you need to install the drivers from the sdk too?

Id be interested to know if there are other folk in the same boat, if they have any idea what happened