On 11/15/2013 09:55 AM, Jon Medhurst (Tixy) wrote:
So, hacking getFatVolumeId to return a value other than -1 means the system works and files on 'external' sdcard are seen and usable by apps.
I guess the issue is that the file system is 'fuse' not 'vfat' and the fuse filesystem doesn't implement VFAT_IOCTL_GET_VOLUME_ID.
So it would seem logical that the config is wrong somehow the the non-emulated external media shouldn't be using fuse. However, the description at http://source.android.com/devices/tech/storage/index.html says:
Starting in Android 4.4, the owner, group and modes of files on external storage devices are now synthesized based on directory structure. [...] These synthesized permissions are accomplished by wrapping raw storage devices in a FUSE daemon.
???
So I've just been barely following along here, but that quoted paragraph is a little frightening. Instead of using a filesystem with actual granular permissions, they've added a permissions meta-layer over FAT via fuse? Eww.
As far as the rest of the issue goes, it sounds like you've managed to work it out. But if it ends up being a problem with either of the GET_VOLUME_ID ioctls, let me know.
By the way, this sort of hiccup (and its workaround) is something we probably should be documenting and publicizing.
thanks -john