原文地址:

/storage/sdcard, /sdcard, /mnt/sdcard 三者的区别 - petercao - 博客园
http://www.cnblogs.com/bluestorm/p/3694921.html

 

public static final String SDPATH = Environment .getExternalStorageDirectory().getAbsolutePath();
//获取外部存储的路径返回绝对路径的,其实就是你的SD卡的文件路径

/storage/sdcard
/sdcard
/mnt/sdcard

以上三者的区别?

/sdcard是/mnt/sdcard的符号链,指向/mnt/sdcard,

/storage/sdcard 是sdcard的分区……

/sdcard/: this is a symlink to...
/mnt/sdcard (Android < 4.0)
/storage/sdcard0 (Android 4.0+)

  • /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)

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/sdcard, /sdcard, /mnt/sdcard 三者的区别的更多相关文章

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

    本文针对Android 7.1 /sdcard是/mnt/sdcard的符号链,指向/storage/self/primary, /mnt/sdcard,也是符号链,指向/storage/self/p ...

  2. 我的Android进阶之旅------>/storage/sdcard0, /sdcard, /mnt/sdcard ,/storage/emulated/legacy 的区别

    转自:http://bbs.gfan.com/android-5382920-1-1.html 关于android的4.2的0文件夹的详解---- android 4.0 ----在galaxy ne ...

  3. (Android系统目录结构)/mnt/sdcard 和 sdcard 的区别

    mnt/是Unix/Linux系统下外部设备的专用目录,Linux默认挂载外部设备都会挂载到这个目录;如将SD卡挂载后,会生成目录:/mnt/sdcard/. shell@aeon6735m_65c_ ...

  4. /mnt/sdcard 是什么东西

    关于/mnt/sdcard和sdcard的区别,可以这样理解:其实,安卓系统是从Linux而衍生出来的,而mnt是unix/Linux传统系统下挂载外部设备的专用目录,Linux默认挂载外部设备都会挂 ...

  5. Android获取内置sdcard跟外置sdcard路径

    Android获取内置sdcard跟外置sdcard路径.(测试过两个手机,亲测可用) 1.先得到外置sdcard路径,这个接口是系统提供的标准接口. 2.得到上一级文件夹目录 3.得到该目录的所有文 ...

  6. string、Empty和null三者的区别

    string.Empty和null三者的区别 本文转自  http://www.bitscn.com/pdb/dotnet/201003/181883.html 时间:2010-03-01 00:00 ...

  7. android Activity类中的finish()、onDestory()和System.exit(0) 三者的区别

    android Activity类中的finish().onDestory()和System.exit(0) 三者的区别 Activity.finish() Call this when your a ...

  8. 菜鸟,大牛和教主三者的区别(转自hzwer)

    菜鸟,大牛和教主,三者的区别 对菜鸟来说题目有三种:会算法且能AC的,会算法但不能AC的,不会做的 对大牛来说题目有两种:会做的,不会做的 对教主来说题目有两种:能AC的,数据有错的 菜鸟提交WA了, ...

  9. UIColor,CGColor,CIColor三者的区别和联系

    UIColor,CGColor,CIColor三者的区别和联系((转)) 最近看了看CoreGraphics的东西,看到关于CGColor的东西,于是就想着顺便看看UIColor,CIColor,弄清 ...

随机推荐

  1. 动态链接库加载出错:cannot restore segment prot after reloc: Permission denied

    在执行可执行程序时,出现动态链接库加载出错:cannot restore segment prot after reloc: Permission denied. 主要是由于Linux 内核中提供的强 ...

  2. TIMAC 学习笔记(二)

    昨天大体上熟悉了TIMAC自带的CC2530的示范例程,今天先从演示抓包入手,分析四种不同的配置工程在空中传输的差异.随后,会按照扫描.组网.入网等MAC层接口函数入手,结合IEEE 802.15.4 ...

  3. Hits算法

    HITS(HITS(Hyperlink - Induced Topic Search) ) 算法是由康奈尔大学( Cornell University ) 的Jon Kleinberg 博士于1997 ...

  4. jQuery学习-----(一)JQuery的'$'符号用法

    1.jQuery的三种$() 1)$()可以是$(expresion),即css选择器.Xpath或html元素,也就是通过上述表达式来匹配目标元素.   比如:$("a")构造的 ...

  5. DTCMS中文章增加tags标签和关键词时中文,替换为英文状态,

    DTCMS.Web\admin\article\article_edit.aspx 找到添加和修改的方法 model.tags = txtTags.Text.Trim()model.seo_keywo ...

  6. Android核心组件 Service

    Service: 服务 Service 是Activity系统的核心组件之一. 因此需要继承和注册 Service 是内有界面的, 适合在后台长期的执行任务. (如放歌, 检测版本跟新, 下载, 上传 ...

  7. HTML5如何重塑O2O用户体验

    低频次垂直O2O服务应该继续开发原生APP吗?大家有没有发现做一个APP的推广成本和获取用户的成本越来越高?第二,用户安装APP之后,用户并不是经常点击使用APP的,那这是为什么?数据表明90%的O2 ...

  8. 直接下载完整chrome浏览器的方法

    目前通过下吗的链接可以获得独立的安装包. http://www.google.com/chrome/eula.html?standalone=1&hl=zh-CN

  9. php使用注意点

    php使用时间之前要将php.ini中时区设置好,否则会报警告.截图如下:“;date.timezone =”设置为“date.timezone =Asia/Shanghai”即可. apache如果 ...

  10. iOS 获取手机的型号,系统版本,软件名称,软件版本

    转载自:http://www.2cto.com/kf/201210/162333.html   网上搜索出来的,记录下来以后使用方便: [java]//手机序列号      NSString* ide ...