0

There is one post about the multiple sd card path Confused by the many locations of the virtual /sdcard/

My question is, how to detect 2 different paths point to the same sdcard? For example,[/storage/emulated/0, /storage/sdcard0] are in fact the same.

Our project uses some complicated procedure to retrive sd card(s), such as mount commend, reading fstab, etc. But it failed to distinguish two symlinks pointing to the same path. Then our file listing met some problem

Community
  • 1
  • 1
mianlaoshu
  • 2,342
  • 3
  • 27
  • 48
  • I'm not sure why you need to know this. Just use `getExternalStorageDirectory` to get the location where to read/write files. – Aleks G Mar 18 '14 at 17:31
  • in fact, our project uses some complicated procedure to retrive sd card(s), such as mount commend, reading fstab, etc. But it failed to distinguish two symlinks pointing to the same path. Then our file listing met some problem.... – mianlaoshu Mar 18 '14 at 17:36
  • @mianlaoshu do you want to know "how 2 different paths point to the same sdcard? I mean do you want to know how does this work internally?" (OR) do you want a reliable way to find out SD card path on phones irrespective of their model? Anyways, http://stackoverflow.com/a/38813578/2818583 and http://stackoverflow.com/documentation/android/150/storing-files-in-internal-external-storage/17144/android-internal-external-storage-terminology-clarification#t=201608071101080941839 may help. – AnV Aug 29 '16 at 12:07

0 Answers0