且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将Android M默认USB配置设置为MTP而非“仅充电"?

更新时间:2022-05-04 22:52:52

我刚刚在Nexus 5(Android 6.0.1)上尝试过此方法,并且有效:

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

  • 确保您的手机未通过USB电缆连接到任何设备
  • 转到设置"-开发人员"选项-选择USB配置"
  • 设置所需的默认连接类型

诀窍是让手机与USB断开连接.我猜想这种行为背后的想法是,如果在手机未连接到任何设备的情况下设置USB连接类型,它将被视为默认行为.

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.