You might have noticed that when you connect your new Nexus 5X or Nexus 6P to your PC via USB-C cable, it will default to ‘Charging’ mode (both phones have USB-C ports instead of micro USB). To access files from your PC or transfer files to your phone, you need to pull down the notification shade, tap ‘USB for Charging’ and then tap on ‘File transfers’ option. You have to repeat this step every time you connect your phone to your computer.
Android Marshmallow does not have an option to make ‘File transfers’ your default option, but there is a way to do it. In this tutorial, we will let you know how to make ‘File Transfers’ your default instead of Charging. This method requires root access, but can be useful for those who want to access files more frequently.
To make file transfers your default option (or any other options like MTP, PTP or MIDI) on Marshmallow, you need a rooted phone with Xposed Framework installed. Read this guide [HERE] to know how to install Xposed Framework on Android 6.0 Marshmallow.
How to Make File Transfers to Default in Android 6.0 Marshmallow
1. This guide is assuming that you have already installed Xposed Framework on your phone.
3. The ‘Use USB for Marshmallow’ app has no settings. Just enable this app in the Xposed Installer and then reboot your phone.
4. Now, connect the phone to your computer, pull down the notification shade, select the USB option and then choose File transfers, for instance.
The selected option will be retained whenever you connect your phone to your computer. (source)