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.
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
- USB Tethering support discovered for Samsung Focus & Omnia 7
- Developing on a Device
- Google Android Hidden Secret Codes (The *#7284# code is not listed but you'll find many others; use them with care).
- Hidden Android Debug Menu (the *#*#4636#*#* code)
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. Login29 comments
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.
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..?
Great stuff! Thanks for tip. I would never guess something like *#7284# to fix this.
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.
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
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?
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!
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?
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
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
I thought my GT-I5800 has been far from being restored. Glad that it helped!
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.
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
Wow.it worked.thanks a lot
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...
It's not working on the nexus s, android 2.3.4, any ideas?
Thank you!
This saved my day ;)
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 !
Thanks! Worked for my Samsung GT-I5800!!!
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!
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
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.
Great! Worked perfectly on GT5801. How did you come across that code to start that utility ?
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?