1,如何修改MTP设备名:
frameworks/base/media/java/android/mtp/MtpDatabase.java
找到
private int getDeviceProperty(int property, long[] outIntValue, char[] outStringValue) 函数找到
case MtpConstants.DEVICE_PROPERTY_DEVICE_FRIENDLY_NAME:
该事件将其中value直接赋值为我们需要显示的名称即可如:
android P 如何修改mtp和ptp模式下手机连接电脑显示在电脑上的名字
2,如何修改PTP设备名:
路径:frameworks/av/media/mtp/MtpServer.cpp
if (mPtp) {
// no extensions
string.set(""); //此处写默认值
} else {
// MTP extensions
string.set(“microsoft.com: 1.0; android.com: 1.0;”);
}
如:
android P 如何修改mtp和ptp模式下手机连接电脑显示在电脑上的名字

相关文章:

  • 2021-11-26
  • 2021-12-12
  • 2021-05-15
  • 2021-12-22
  • 2022-12-23
  • 2022-01-06
  • 2021-09-16
猜你喜欢
  • 2021-07-22
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2021-07-12
  • 2021-11-23
  • 2021-10-10
相关资源
相似解决方案