/storage/xx-xx/, /sdcard, /mnt/sdcard 三者的区别

Posted AYE89

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了/storage/xx-xx/, /sdcard, /mnt/sdcard 三者的区别相关的知识,希望对你有一定的参考价值。

本文针对android 7.1

 

/sdcard是/mnt/sdcard的符号链,指向/storage/self/primary,

/mnt/sdcard,也是符号链,指向/storage/self/primary,

/storage/10F5-111D 是sdcard的分区……

内部存储:

internal storage - Confused by the many locations of the virtual /sdcard/ - Android Enthusiasts Stack Exchange
http://android.stackexchange.com/questions/39542/confused-by-the-many-locations-of-the-virtual-sdcard

一些路径的解释:

  • /storage/emulated/0/: to my knowledge, this refers to the "emulated MMC" ("owner part"). Usually this is the internal one. The "0" stands for the user here, "0" is the first user aka device-owner. If you create additional users, this number will increment for each.
  • /storage/emulated/legacy/ as before, but pointing to the part of the currently working user (for the owner, this would be a symlink to /storage/emulated/0/). So this path should bring every user to his "part".
  • /sdcard/: According to a comment by Shywim, this is a symlink to...
    • /mnt/sdcard (Android < 4.0)
    • /storage/sdcard0 (Android 4.0+)
  • /storage/sdcard0/: As there\'s no legacy pendant here (see comments below), the "0" in this case rather identifies the device (card) itself. One could, eventually, connect a card reader with another SDCard via OTG, which then would become /storage/sdcard1 (no proof for that, just a guess -- but I\'d say a good one)

以上是关于/storage/xx-xx/, /sdcard, /mnt/sdcard 三者的区别的主要内容,如果未能解决你的问题,请参考以下文章

/sdcard/emulated/0 和 /sdcard 之间的区别

sdcard是啥文件夹?

android Q sdcard权限详解

通过 adb 获取 sdcard 目录

Android如何扫描sdcard中的音乐文件,并加载到ListView中?

求助!把emmc改为sdcard