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
    Commented Apr 1, 2016 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
    Commented Apr 1, 2016 at 7:22
  • Will it be helpful if you change one usb charger?
    – user159026
    Commented Apr 1, 2016 at 8:46
  • What do you mean by USB charger?
    – Alam
    Commented Apr 1, 2016 at 11:15

3 Answers 3


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.

  • 1
    Finally a solution that works! Thanks so much! (On my device the file was called "persist.sys.usb.config".)
    – balu
    Commented Jul 14, 2016 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
    Commented Oct 1, 2016 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. Commented Apr 10, 2019 at 1:14
  • +1 It works.... Commented Aug 14, 2020 at 6:09
  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)

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

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
    Commented Apr 1, 2016 at 7:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .