Find location of a removable SD card

Is there a universal way to find the location of an external SD card?

Please, do not be confused with External Storage.

Environment.getExternalStorageState() returns the path to the internal SD mount point, such as /mnt/sdcard. But the question is about the external SD. How do I get a path like /mnt/sdcard/external_sd (it may differ from device to device)?

I guess I will end with filtering of the output of the mount command by filesystem name. But I’m not sure this way is robust enough.

23 Answers
23

Leave a Comment