How to repair the USB connection problem on Android Samsung phones

By Stephane Carrez 29 comments

Several Samsung Galaxy phones seem to have USB connection problems. Sometimes the USB connection stops working and even rebooting the phone does not solve the problem. This article gives the symptoms and explains how to fix that.

Symptoms

It took me a long time to figure out and fix the problem (looking at many forums, trying many solutions that never worked). The problem was not a driver problem on the PC, nor some dust on the USB connector but really a software/configuration problem on the Android phone itself. The symptoms were the following:

  • The phone is correctly configured in Settings -> Applications -> Development to USB mode (no development)
  • Plugging and unplugging the USB cable does not produce any event on the phone (it is as though you plug the charger: no USB icon in the status bar)
  • Rebooting the phone has no effect. USB is still not recognized (the USB icon does not appear in the status bar).
  • Rebooting the phone with the USB cable connected to the PC is better. The USB icon appears but it never disappears after unplug and the connection still does not work.
  • Under Windows, Samsung Kies tries to connect but the connection process never ends. Windows sees the USB device.
  • Under Ubuntu, the dmesg command reports an error when the USB cable is plugged:
[62752.296029] usb 2-6: new high speed USB device using ehci_hcd and address 38
[62752.429897] usb 2-6: configuration #1 chosen from 1 choice
[62752.431442] hub 2-6:1.0: bad descriptor, ignoring hub
[62752.431450] hub: probe of 2-6:1.0 failed with error -5
[62752.431543] cdc_acm 2-6:1.0: ttyACM0: USB ACM device
[62752.432560] hub 2-6:1.2: bad descriptor, ignoring hub
[62752.432567] hub: probe of 2-6:1.2 failed with error -5
  • However the device is recognized. Indeed, you can see it with lsusb.
  • You can even use the lsusb -D command to look at the details of the device. BUT, this command reports an error (can't get hub descriptor: Broken pipe) within its output:
$ lsusb -D /dev/bus/usb/002/014 
Device: ID 04e8:6601 Samsung Electronics Co., Ltd Z100 Mobile Phone
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  idVendor           0x04e8 Samsung Electronics Co., Ltd
  idProduct          0x6601 Z100 Mobile Phone
 ...
can't get hub descriptor: Broken pipe
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
 ...

Resolution

1. Unplug the USB cable

2. On the cell phone, dial the following number: *#7284#

Once the last # is hit, the PhoneUtil application is launched. Choose USB -> Modem and then USB -> PDA mode.

The good mode should be PDA. Even if the mode is PDA, switch to Modem and then back to PDA.

3. Plug the USB cable.

Android PhoneUtil

Results

Once the cable is plugged, the USB device is recognized and the following messages are reported by dmesg:

[62941.921435] usb 2-6: new high speed USB device using ehci_hcd and address 39
[62942.054057] usb 2-6: configuration #2 chosen from 1 choice
[62942.086841] Initializing USB Mass Storage driver...
[62942.087128] scsi8 : SCSI emulation for USB Mass Storage devices
[62942.087310] usbcore: registered new interface driver usb-storage
[62942.087314] USB Mass Storage support registered.
[62942.087340] usb-storage: device found at 39
[62942.087344] usb-storage: waiting for device to settle before scanning
[62947.084396] usb-storage: device scan complete
[62947.085230] scsi 8:0:0:0: Direct-Access     SAMSUNG  GT-I5800 Card    0000 PQ: 0 ANSI: 2
[62947.088053] sd 8:0:0:0: Attached scsi generic sg4 type 0
[62947.096526] sd 8:0:0:0: [sdd] Attached SCSI removable disk

The lsusb -D command should now work without any problem (the can't get hub descriptor: Broken pipe error has gone).

Mounting the sdcard

Before mounting the sdcard, activate the USB mount connection on the phone by clicking on the USB icon in the status bar. Once this is done, dmesg will report more messages such as:

[66309.394438] sd 8:0:0:0: [sdd] 3862528 512-byte logical blocks: (1.97 GB/1.84 GiB)
[66309.394934] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[66309.396297] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[66309.396301]  sdd: sdd1

On Ubuntu, the sdcard is mounted with the following command:

$ sudo mount -t vfat /dev/sdd1 /mnt/storage

Android Device Development

For Android development, it is necessary to configure the udev (dynamic device management) service. It should be done before connecting the device. For this you have to create a rules file for udev. Create the following file /etc/udev/rules.d/51-android.rules and put:

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"

Make sure the file is readable:

# chmod a+r /etc/udev/rules.d/51-android.rules

Then, restart udev with

# service udev restart

References

Update 2017

Seven years after this initial post, people still have many problems with their USB connection. The solution presented here may not work anymore for some of you. You may checkout the following article that gives you more Android secret codes:

Add a comment

To add a comment, you must be connected. Login

29 comments

elfierizal77@gmail.com
elfierizal77 on 2017-01-30 22:22:04 said:
Not working on samsung tab 3 lite..please help.
felixdakubo@gmail.com
Felix F Dakubo on 2016-04-05 17:42:08 said:
Please my itel it1701(iNote) only charges but not detected by my Toshiba I've installed the univwrsal ADB application ,yet it doesn't detect my tablet. what can I do please ... in other words what's the main fault? I appreciate your help..
rituponhazarika22@gmail.com
rituponhazarika22 on 2015-10-03 05:31:42 said:
the dial number is not working.. what to do now.. samsung s7582
rohitnigade007@gmail.com
Rohit Nigade on 2015-02-16 15:50:29 said:
Man I love you...Great..I had left all hopes..I have tried more than 10 methods..nothing worked...and this thing did..just switching back n forth did it..just amazing!
sukhilshetty6@gmail.com
sukhilshetty6 on 2014-09-08 07:59:56 said:
I am facing the same problem in micromax canvas 4 is anyone know the solution.....
tplemos@gmail.com
Paula on 2013-03-17 10:27:10 said:

Hi there! This code doesn´t work in my Galaxy GT I9100. I get a message that says "Connection problem or invalid MMI code". How can i launch PhoneUtil? Thank you.

pkjones@virginmedia.com
paul on 2013-02-25 22:07:42 said:

im having trouble with my galaxy gt-i9000. when you plug the charger in it connects then disconnects, then connects and disconnects. just repeats that problem. if i plug into the pc it does the same thing. detects phone, loses phone and so on...
any ideas..?

cbcruz74@gmail.com
carlos on 2013-02-11 20:37:16 said:

Great stuff! Thanks for tip. I would never guess something like *#7284# to fix this.

stephrees7@hotmail.co.uk
S on 2012-07-18 18:37:45 said:

Hey, I have no idea whats wrong with my Samsung GT-15800. The battery seems to get used up extremely quickly so I went onto settings-about phone-battery usage- and it says the android system is taking up 94% of the battery. So I thought if I updated it by going onto Kies then it may sort it out. But my phone won't connect to kies. So I tried the #7284# but my phone just says reject. Now Im stuck with what to do with it. If anyone has any advice it would be much appreciated. Thanks in advance.

lauraashley@live.ca
lau_ash on 2012-06-25 06:11:21 said:

Thanks so much! When I plugged my Samsung S2X by USB it was charging but not connecting. *#7284# Even if the mode is PDA, switch to Modem and then back to PDA." fixed it

xyz@yahoo.com
HT on 2012-03-19 20:50:22 said:

Just worked fantastic, Was searching for the solution of my USB not getting detected. but this helped me!! Just one thing, i am not able to take the message backup!! Can anyone help for that?

zunji0978@hotmail.com
Nate on 2012-03-16 07:26:26 said:

Hello, I followed all of these steps, "1. Unplug the USB cable

2. On the cell phone, dial the following number: *#7284#

Once the last # is hit, the PhoneUtil application is launched. Choose USB -> Modem and then USB -> PDA mode.

The good mode should be PDA. Even if the mode is PDA, switch to Modem and then back to PDA.

3. Plug the USB cable."

But when I plug in the USB back into the computer, it just continues to charge the battery (and that's it).
The USB image doesn't appear on my cell phone either, so I'm not sure what's going on or how to fix this.

I am currently using windows 7 x64bit, will this solution you gave work with this OS?

Any help would be great!

sheri@sherimarcus.com
sherz1 on 2012-03-16 07:24:55 said:

Does anyone have this issue on the Galaxy Nexus? The *#7284# code does not work for the Verizon Galaexy Nexus, nor does there seem to be a code to unlock this particular menu for this phone. Does anyone have a code for the PhoneUtil Hidden Menu for the Galaxy Nexus?

Or, is there a way to fix this problem on the Galaxy Nexus without the code?

markpeel11@gmail.com
mark3fo on 2012-02-03 19:28:30 said:

So glad I stumbled across this. It works great for my Samsung Galaxy S (GT-I9000) nothing to do with cleaning the USB port from dust

yoebaik@gmail.com
yoebaik on 2011-12-31 14:34:59 said:

It's more than a year now, but just had this problem on my samsung gs2. The logs was a bit different:
[145159.964035] usb 2-1: new high speed USB device number 40 using ehci_hcd
[145160.116419] cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
[145160.116522] cdc_acm 2-1:1.0: ttyACM0: USB ACM device

it detected the phone as something else other than usb mass storage and the green android logo was nowhere to be found. Your solution works perfectly. Thank you very much!! I wasn't alone after all

bernylure@yahoo.com
Girbick on 2011-11-18 06:49:13 said:

I thought my GT-I5800 has been far from being restored. Glad that it helped!

bernylure@yahoo.com
Girbick on 2011-11-18 06:48:56 said:

I found, downloaded and installed Samsung PC Studio 3, and it wont connect to my phone via USB. Don't know how to fix this problem.

hellosudhirji@hotmail.com
sudhir on 2011-11-16 19:51:19 said:

Hi,
I have samsung galaxy ace and using *#7284# shows something but not what you mentioned. It does not have option for selecting usb or pda.
If anybody knows the solution please post it. Its my new samsung galaxy ace and I can use it as flash drive.
Thanks in advance

a@wp.pl
lw on 2011-11-13 08:24:46 said:

Wow.it worked.thanks a lot

hardxknox@aim.com
Reggie on 2011-10-09 21:38:30 said:

If you have a Sumsung Galaxy Indulge. This code will not work. You will have to type **87284 then click on LTE under the USB section of the Phone Utility. I found it on this website .. http://androidinvasion.us/blog/2011...

rawadjpoutalah@free.fr
julien on 2011-09-06 21:34:15 said:

It's not working on the nexus s, android 2.3.4, any ideas?

lowie@lopa.be
Lowie on 2011-08-06 20:58:01 said:

Thank you!
This saved my day ;)

r_lander@yahoo.com
Richard on 2011-07-27 18:37:41 said:

Excellent information - thanks very much - I had given up my I5800 for dead, but now it's back and I am very very happy. Thanks again !

miknis@gmail.com
miknis on 2011-07-07 07:52:54 said:

Thanks! Worked for my Samsung GT-I5800!!!

spassdroid@gmail.com
Spassdroid on 2011-05-22 15:41:09 said:

Wow thank you so much! Previously I had to keep resetting my phone and then reinstalling all my downloaded apps. Not a happy time!

When I first got my android phone, I realised that Kies will not load if in USB development mode. Then, if I disabled USB dev mode, and tried to reconnect to Kies, it will not work. I had to reset the phone. Not sure how useful that might be to you.

But thanks again for this amazing tip!

tdidcock@googlemail.com
Tone77 on 2011-02-20 22:41:47 said:

Thank you SO MUCH for this! I've be searching for MONTHS trying to find a fix for the "no USB notification" problem! Fantastic work, very well explained, kudos!

-Tony

vijaynerd@gmail.com
vijayakumar on 2011-01-19 12:11:02 said:

Thanks a lot for the tip. Can you share the hidden configs that can be reached through dial pad using *#<numbers># which will be very helpful in case we face any other issues that can be solved using the hidden config commands.

koushik.narayanan@gmail.com
Koushik on 2011-01-19 12:10:08 said:

Great! Worked perfectly on GT5801. How did you come across that code to start that utility ?

charlesasheehan@aol.com
Charles on 2011-01-05 21:59:07 said:

Great work. I had almost abandoned hope of connecting my Galaxy 3 having scoured the web for advice and tried dozens of times, mostly taking one step forward and two back.

I cannot imagine why switching back and forth between modem and PDA mode should do the trick. Surely Samsung should issue a firmware update for this?