如果我想传送文件（将我的手机连接到我的电脑时几乎是我想做的），我必须选择chargt＆amp;数据模式 - ＆gt;传输文件。
我曾经有一个moto g gen 1（kitkat），这是默认情况下的，为什么不能在Nougat上表达。
When I connect my phone to my PC via USB. It automatically enters charge mode.
If I want to transfer files (which is almost always what I want to do when connecting my phone to my PC), I have to select charge & data mode --> transfer files.
Always doing this when connecting my phone to my PC is slightly laborious, and I was just wondering is there a way to connect my phone to my PC & cause to autmatically default to charge & data mode?
I used to have a Moto G Gen 1 (Kitkat), which did this by default, why can't this be the case on Nougat.
The default behaviour in Marshmallow upwards is to charge and other options have to be manually selected
Being an OS behaviour, you can't modify it without rooting device. If your device is rooted, you can install this Xposed module - USB for Marshmallow
Set MTP or PTP as Default USB Connection on Marshmallow with this app.
Once you connect the phone to the computer and select the USB option from the notification and selected option will be retained for every reconnect your phone to computer.
For example if you select the USB file transfer option, This app will retain that file transfer option for every reconnect your phone to computer.
It's also available on Play Store as an Xposed app
If you are on Nougat, this option may not be possible till Xposed framework is released - see Where can I find the Xposed Framework and installer for Nougat?
If you device is rooted, you may use Tasker app to run a command as root to enable tethering when USB is connected.
The command can be found here: Is it possible to activate the xe2x80x9cUSB Tetheringxe2x80x9d Android setting from the command line?