Search code examples
androidusbgoogle-tv

Labels of USB-drives mounted to Google TV


When I plug an USB flash drive to my Logitech Revue, it is mounted into /mnt/media/usb.C7E3-1E08.

C7E3-1E08 looks like to be some usb device id, but I want my app to show the label of the USB-drive (like MYFLASH).

GoogleTV knows this label, because in logcat I have this:

I/MediaVolume(141): New volume - Label:[FLASH4GB] FsType:vfat UUID:C7E3-1E08

Here FLASH4GB is the label of my USB drive. Of course, I can try to parse logcat in my app, but maybe there is some better way to get this label?

Also if I go Home-Notifications, I can see "Synced USB Storage "FLASH4GB"".


Solution

  • Currently, there is no public API for getting the label of volume. There is a chance we will make related API public at some point, but timeline is not decided.