It looks like Android M is breaking the USB connection with PC as a number of users (included us) weren’t able to connect the Nexus 5 to our PCs after installing the Android M developer preview build. But thankfully, there’s an easy fix.

Android M now has USB Configuration profiles under developer options which apparently upon playing with let us connect our Nexus 5 to the PC. No extra drivers were need to be installed. By default, it seems Android M has PTP (Picture Transfer Protocol) activated on the device and soon as you change it to MTP (Media Transfer Protocol) the device is instantly recognized by the PC.

How to Change USB Configuration on Android M

  1. Go to Settings » About phone » scroll to the bottom and tap on Build number seven times to enable Developer options.
  2. Go back to Settings page and select “Developer options” from here now.
  3. Scroll a bit and you’ll see “Select USB configuration” under Networking options, select it.
  4. Now select the USB mode you want to use from here. We selected the “MTP (Media Transfer Protocol)” from the list and it resolved our issue with Nexus 5 not connecting to the PC.