Getting ADB to recognize Samsung Galaxy S2 running cyanogenmod 10.1

Screenshot_2013-09-13-16-41-35

… Getting ADB to work on Samsung Galaxy S2 running CyanogenMod 10.1

ADB is important because it enables you easily test you android apps directly on your devices, circumventing the long compile/run time associated with testing apps on an android virtual device (simulator) .
For some reasons, after flashing my trusted Galaxy S2 with CyanogenMod 10.1 (CM10), ADB (Android debug bridge) did not recognize it.
So, after several hours (days) of trouble shooting the matter, here’s what worked.

See Also : Recovering a Bricked (Bootloop) Galaxy S2 i9100G and Installing CyanogenMod 11 (Android 4.4)

  1. Uninstall any Samsung and Kies drivers previously installed. Turns out these drivers don’t cut it  after you flash on CM10 .
  2. After uninstalling any previous drivers, ensure that your device shows up in device manager – If it doesn’t, you might want to restart your machine and reconnect your device.Untitled-1
  3. Download Google SDK USB Drivers via SDK Manager and A modified inf Driver file here . Replace the driver inf file in the sdk usb driver (\sdk\extras\google) folder with the modified inf file .
  4. In device manager update your device driver and point it to the Google USB driver folder with the modified inf file. It may pop up a warning – Windows cannot verify the publisher of this driver. Accept and continue .Untitled-2Untitled-2
  5. If you have succeeded this far, ADB should be able to recognize your device now. Use the adb devices command to show a list of connected devices.
  6. Next, if you device shows as offline – there’s more work to be done, follow the steps below
  7. Enable USB debug mode . In CM 10, the developer options may be hidden. Go to Settings > About Phone > Build Number . Tap build number 7 times and developer option will be enabled. You can now go back to Settings > Developer Options >
    Enable developer options and also USB debugging mode .
    At this point, I was able to connect to my device!! .
  8. Finally update your SDK Tools  (platform tools) through SDK manager to atleast version 16. In some cases it make be wise to scratch your current eclipse android installation and make a fresh one with the latest sdk, adt, adb and associated tools.
  9. You should be ready to roll now!Let me know in the comments if this worked for you! Happy on device debugging!

Update :

Update : For those who are running the stock Android that comes with Samsung Galaxy S2 and having difficulties getting ADB to work … Carry out steps 1-6 above .. enable debug mode and try the following below:

  1. Unplug the USB cable
  2. On the device, dial the following number: *#7284# Once the last # is hit, the PhoneUtil application is launched.
  3. Choose USB -> Modem and then USB -> PDA mode.
  4. Select  PDA mode.
  5. Even if the mode is PDA, switch to Modem and then back to PDA.
  6. Plug the USB cable.

ADB should work at this time.

About Vykthur

Mobile and Web App Developer and Researcher. Passionate about learning, teaching, and recently - writing.
This entry was posted in Android Tutorials and tagged , , , , . Bookmark the permalink.
  • efeamadasun

    “Tap build number 7 times and developer option will be enabled” <– Seems like unnecessary complication on the part of Cyanogenmod. Developer options is enabled in Android by default, I don't see the point in hiding it. Nice read btw.

    • Well … when developer options is turned on by default and for some reason your device is connected to a malicious network – your “entire” device content can be copied, worse still deleted . Enabling developer options is essentially a backdoor that shouldnt be treated with levity.
      I guess Cyanogenmod just wants to reduce the number of “Casualties” blaming their misfortune on them.
      Thanks for stopping by buddy!

    • Vykthur

      Well … when developer options is turned on by default and for some reason your device is connected to a malicious network – your “entire” device content can be copied, worse still deleted . Enabling developer options is essentially a backdoor that shouldnt be treated with levity.

      I guess Cyanogenmod just wants to reduce the number of “Casualties” blaming their misfortune on them.

      Thanks for stopping by buddy!

  • Davide Canducci

    Hi Vykthur.

    I’m on Windows 8. It recognizes the device perfectly.
    But Eclipse still write me “No compatible targets were found”.

    I tried the “Update” method too, but it did not work. Particularly the code *#7284# gives me an error: “connection problem or MMI code invalid”

  • Frederico Fávaro

    Hi, im using Cyanogenmod 11 on a galaxy S2. My problem is: in step 2, in the picture, you have “other devices” and after “the model of smartphone”…. Here, dont show the model, only appear “android”, and because that drivers dont install! I dont know what to do, to solve that!