问题描述
我一直在Google上搜寻周围,但它是SOOOOO很难找厂家/型号使用的这些路径SD卡/外部存储。
I've been Googling around but it is sooooo hard to find what manufacturers/models use which path for sdcard/external storage.
- 在我说的不是内部存储路径可通过找到:
Environment.getExternalStorageDirectory()
我知道 getExternalStorageDirectory()
有时指向某些设备上外接SD卡。的
I know that getExternalStorageDirectory()
sometimes points to external sdcard on some devices.
下面是我已经找到了为外部路径(制造商使用哪条路不知道)一些常见的路径:
Here's what I've found some common path for external path (Not sure which manufacturer uses which path):
/emmc
/mnt/sdcard/external_sd
/mnt/external_sd
/sdcard/sd
/mnt/sdcard/bpemmctest
/mnt/sdcard/_ExternalSD
/mnt/sdcard-ext
/mnt/Removable/MicroSD
/Removable/MicroSD
/mnt/external1
/mnt/extSdCard
/mnt/extsd
/mnt/usb_storage <-- usb flash mount
/mnt/extSdCard <-- usb flash mount
/mnt/UsbDriveA <-- usb flash mount
/mnt/UsbDriveB <-- usb flash mount
这些是我发现谷歌搜索左右。
These are what I found by Googling around.
我需要扫描整个内部+外部存储+ USB闪存驱动器,以寻找一个特定的文件。如果我错过任何路径,请添加到上面的列表中。如果有人知道所使用的每一个制造商的路径,请与我们分享。
I need to scan entire internal + external storage + USB flash drive to look for a certain file. If I am missing any path, please add to the above list. If someone knows paths used by each manufacturers, please share with us.
推荐答案
我也开始像你这样的名单,从什么地方(抱歉,没有找到原始出处),并不断增加,从用户反馈收集了一些路径。有重复上面的列表中。
I also started with a list like yours from somewhere (sorry couldn't find the original source) and continue to add some paths collected from user feedback. There are duplicate to the above list.
/storage/sdcard1 //!< Motorola Xoom
/storage/extsdcard //!< Samsung SGS3
/storage/sdcard0/external_sdcard // user request
/mnt/extsdcard
/mnt/sdcard/external_sd //!< Samsung galaxy family
/mnt/external_sd
/mnt/media_rw/sdcard1 //!< 4.4.2 on CyanogenMod S3
/removable/microsd //!< Asus transformer prime
/mnt/emmc
/storage/external_SD //!< LG
/storage/ext_sd //!< HTC One Max
/storage/removable/sdcard1 //!< Sony Xperia Z1
/data/sdext
/data/sdext2
/data/sdext3
/data/sdext4
对于要实现(扫描某些文件的所有可能的路径)是什么,我认为这是完全不可能做这种方式(使用已知路径的列表)。在同一台设备的一些路径的Android升级之间甚至改变。
For what you want to achieve (scanning all possible paths for certain files), I think it's quite impossible to do it this way (using a list of known paths). Some paths on same device even changed between android upgrade.
这篇关于制造商可移动存储(外部)SD卡路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!