7.0和8.0log对比
不同在于 mountFlags=VISIBLE
04-08 17:13:07.560 1897 1897 D StorageNotification: Notifying about public volume: VolumeInfo{public:8,3}:04-08 17:13:07.560 1897 1897 D StorageNotification: type=PUBLIC diskId=disk:8,0 partGuid=null mountFlags=0 mountUserId=0
04-08 17:13:07.560 1897 1897 D StorageNotification: state=MOUNTED
04-08 17:13:07.560 1897 1897 D StorageNotification: fsType=vfat fsUuid=6433-427D fsLabel=EFI
04-08 17:13:07.560 1897 1897 D StorageNotification: path=/mnt/media_rw/6433-427D internalPath=/mnt/media_rw/6433-427D
04-08 17:48:59.126 5224 5224 D StorageNotification: Notifying about public volume: VolumeInfo{public:8,3}:
04-08 17:48:59.126 5224 5224 D StorageNotification: type=PUBLIC diskId=disk:8,0 partGuid=null mountFlags=VISIBLE mountUserId=0
04-08 17:48:59.126 5224 5224 D StorageNotification: state=MOUNTED
04-08 17:48:59.126 5224 5224 D StorageNotification: fsType=vfat fsUuid=6433-427D fsLabel=EFI
04-08 17:48:59.126 5224 5224 D StorageNotification: path=/storage/6433-427D internalPath=/mnt/media_rw/6433-427D
修改如下
StorageManagerService.java
if (vol.disk.isAdoptable() ||vol.disk.isUsb()) {
vol.mountFlags |= VolumeInfo.MOUNT_FLAG_VISIBLE;
}