如何列出其他外部存储文件夹(安装点)?(How to list additional external storage folders (mount points)?)

默认情况下,Android上的“外部”存储显示为/ sdcard文件夹。 在某些设备上,它不是SD卡,而是内存。

某些设备允许附加额外的SD卡,或者在华硕变压器的情况下,还可以附加2个USB闪存盘。

这种增加的内存驱动器显示为某个文件夹,该位置取决于设备制造商。 在某些设备上,它位于/ sdcard文件夹内,其他设备位于其他文件夹中的其他位置。

现在我的问题是,如果有一些功能列出除标准/ SD卡文件夹之外的所有可能的外部存储。

By default, "external" storage on Android is presented as /sdcard folder. On some devices it's not SD card but internal memory.

Some devices allow attachment of additional SD card, or in case of Asus Transformer, also additional 2 USB flash discs.

Such added memory drive appears as some folder, which location depends on device manufacturer. On some devices it's inside /sdcard folder, on others it's elsewhere in other folder.

Now my question is, if there's some function to list all possible external storages besides standard /sdcard folder.

最满意答案

您可以阅读/proc/mounts来查找当前安装的内容。

或者你可以阅读/etc/vold.conf或/etc/vold.fstab (它取决于配置文件的版本)。 该文件包含可移动存储的配置。 平板电脑默认存储通常不存在于vold中。

You can read /proc/mounts to find out what is currently mounted.

Or you can read /etc/vold.conf or /etc/vold.fstab (it depends on version what config file is present). This files contains config for removable storages. At tablet default storage is not usually present in vold.

如何列出其他外部存储文件夹(安装点)?(How to list additional external storage folders (mount points)?)

默认情况下,Android上的“外部”存储显示为/ sdcard文件夹。 在某些设备上,它不是SD卡,而是内存。

某些设备允许附加额外的SD卡,或者在华硕变压器的情况下,还可以附加2个USB闪存盘。

这种增加的内存驱动器显示为某个文件夹,该位置取决于设备制造商。 在某些设备上,它位于/ sdcard文件夹内,其他设备位于其他文件夹中的其他位置。

现在我的问题是,如果有一些功能列出除标准/ SD卡文件夹之外的所有可能的外部存储。

By default, "external" storage on Android is presented as /sdcard folder. On some devices it's not SD card but internal memory.

Some devices allow attachment of additional SD card, or in case of Asus Transformer, also additional 2 USB flash discs.

Such added memory drive appears as some folder, which location depends on device manufacturer. On some devices it's inside /sdcard folder, on others it's elsewhere in other folder.

Now my question is, if there's some function to list all possible external storages besides standard /sdcard folder.

最满意答案

您可以阅读/proc/mounts来查找当前安装的内容。

或者你可以阅读/etc/vold.conf或/etc/vold.fstab (它取决于配置文件的版本)。 该文件包含可移动存储的配置。 平板电脑默认存储通常不存在于vold中。

You can read /proc/mounts to find out what is currently mounted.

Or you can read /etc/vold.conf or /etc/vold.fstab (it depends on version what config file is present). This files contains config for removable storages. At tablet default storage is not usually present in vold.