Is it possible to find out volume label of SD card inserted into Android device?
I understand that Android is designed to have just one "external storage" (as returned by Environment.getExternalStorageDirectory()
), but there are quite a few devices in the wild that have internal flash as "external storage" and an SD card mounted under that or even wilder combinations (see this other question). It is possible to enumerate these additional devices by reading /proc/mounts
, but we need something to identify them to the user. Is there any chance to get to their volume labels?
I checked that Linux vfat driver ignores the volume label dentry altogether and that blkid
from util-linux reads the vfat itself. I also checked that, at least on device I have, the block device of the SD card has mode 660
and owner root.root
, so I can't do that. So basically it boils down to whether there is any utility that could read it available.