5

After upgrading my Huawei phone (which is rooted) to Android 5.1.1 (CM 12.1) the 'USB debugging' option is greyed out with message:

'Device is in charging mode, USB debugging is disabled'.

The message is present even when the cable is not connected.

I have already tried following solutions (but the USB debugging is still greyed out):

Restarting the phone
Disabling developer mode and enabling again
Disabling developer mode, restarting the phone and enabling it again
Removing the cable and trying all above solutions

  • i have seen this in case- not connected to right usb port, cable has got some problem, usb driver not installed properly. charging mode, touch for other options are not present ? – Rilwan Apr 1 '16 at 7:10
  • Checked with port changed & with cable change. Drivers was installed yesterday and it was working fine until I upgraded to Android 5.1.1 – Alam Apr 1 '16 at 7:22
  • Will it be helpful if you change one usb charger? – user159026 Apr 1 '16 at 8:46
  • What do you mean by USB charger? – Alam Apr 1 '16 at 11:15
4
  1. Open settings and go to storage
  2. Press menu and go to USB Storage Mode
  3. Change to USB or MTP (NOT Charge only)
  4. Disable and re enable Development options with the 7 clicks on Build Number

storage settings USB Settings
Screenshots (click images for larger variants)

  • Already tried that. Selecting 'USB Computer Connection' displaying message 'USB is now disconnected' (even when it's not connected to a cable) – Alam Apr 5 '16 at 12:50
  • @Alam same happened to me. Plugging the usb cable to a computer before following these steps solved it for me. – Andres Sep 20 '16 at 10:19
2

Removing 'persist.system.usb.config' file from data/property/ folder and restarting the device solved the issue for me.
After restart, the device shows the option to enable 'USB debugging'.

Root access is required to remove that file.

  • Finally a solution that works! Thanks so much! (On my device the file was called "persist.sys.usb.config".) – balu Jul 14 '16 at 5:09
  • Just ran into this problem once again and couldn't remember what I did to solve it last time, so I started googling and it took me quite a while to get here. So I'm gonna say it worked like a charm on my HTC One M8 – hopefully Google will pick up the device name and make finding this thread easier next time, instead of pointing exclusively to advice regarding a Samsung-specific bug. – balu Oct 1 '16 at 22:01
  • Just a tip, that file is automatically generated by the system prop files, that's why it is in the property folder, The correct way to fix this issue would be to lacate the prop and remove it... Usually that property line is in Build.prop ... So... Remove the line from Build.prop or change the value from 1 to 0 ... Open the property file and read it as a text file, The value of the property is inside that file. – Elijah Cuff Apr 10 at 1:14
0

Plug out your USB cable and go to the developer options of your device. There you can activate USB debugging and then you can plug your cable back in. It isn't enough to only activate developer options.

  • I have already tried that without any success. – Alam Apr 1 '16 at 7:42

protected by Community Apr 1 '16 at 17:03

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.