I have a LG Nexus 5 with android marshmallow OS. I used to be able to connect my phone to a PC running Windows 10 with USB cable and browse the files from the PC's file explorer. Ever since I upgraded the OS to marshmallow whenever I connect the phone to PC with USB cable, the PC detects the connected phone but when I open the phone from file explorer there is nothing shown.

After a lot of exploration I found a setting in the notification area called 'USB for charging. Touch for more options'. From there I can choose charging only, MTP, PTP, or MIDI. After selecting MTP I can browse the phone content from PC. This setting used to be in Settings - Storage - USB computer connection.

The problem is the next time the phone is connected to the PC, the setting revert back to 'charging only'.

Can I set the default to MTP like it used to be in lollipop?

  • If phone is rooted, run the command setprop persist.sys.usb.config mtp in the terminal and reboot – Manubhargav Oct 17 '15 at 10:06
  • 4
    The reason for your problem is mentioned in the changelog of Android M: "Device connections through the USB port are now set to charge-only mode by default. To access the device and its content over a USB connection, users must explicitly grant permission for such interactions.". – Firelord Oct 17 '15 at 11:36