修改frameworks/base/services/core/java/com/android/server/MountService.java文件中的onVolumeCreatedLocked函数将如下行
// Adoptable public disks are visible to apps, since they meet
// public API requirement of being in a stable location.
if (vol.disk.isAdoptable() || vol.isPhoneStorage()) {
vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE;
}
改成
// Adoptable public disks are visible to apps, since they meet
// public API requirement of being in a stable location.
if (vol.disk.isAdoptable() || vol.isPhoneStorage() || vol.isUSBOTG()) {
//额外增加USBOTG
vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE;
}