How to set Android M default USB config to MTP rather than "charging only"?

Will Hardwick-Smith picture Will Hardwick-Smith · Sep 2, 2015 · Viewed 53.9k times · Source

Whenever my device (Nexus 5, Android M Preview 3) connects via USB, the USB config always defaults to "charging only".

This is quite problematic because the USB port on my device is faulty and sometimes disconnects and reconnects when bumped and so I have to manually change the mode to MTP (media transfer protocol) from the notification drawer each time.

  • Debugging mode is enabled
  • Develop settings -> USB Configuration is set to MTP.

Answer

Mladen B. picture Mladen B. · Oct 13, 2016

I just tried this on my Nexus 5 (Android 6.0.1) and it worked:

  • Make sure your phone is NOT connected to any device over USB cable
  • Go to Settings - Developer options - Select USB Configuration
  • Set your desired default connection type

The trick was to have a phone disconnected from USB. I guess the idea behind such a behavior was that if you set an USB connection type while your phone is not connected to any device, it will be treated as a default behavior.