原文地址:

/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. css笔记——区分css3中的transform transition animation

    出处:http://blog.csdn.net/dyllove98/article/details/8957232   CSS3中和动画有关的属性有三个  transform. transition  ...

  2. robolectric环境的搭建

    最近在学习测试驱动开发(Test-Driven Development),测试驱动开始是极限编程的一种方式,提倡在真正编写代码之前先根据需求编写测试代码(当然这个测试代码是不可能通过的),然后根据测试 ...

  3. echo & print

    在实际使用中, print 和 echo 两者的功能几乎是完全一样.可以这么说,凡是有一个可以使用的地方,另一个也可以使用.但是,两者之间也还是一个非常重要的区别:在 echo 函数中,可以同时输出多 ...

  4. Cursor--游标

    游标--cursor['kɜːsə]   概念:                         在执行SQL语句时,Oracle服务器将分配一个内存区域,不仅存储这个语句,还存储语句的结果 — 称为 ...

  5. linux make clean

    make clean仅仅是清除之前编译的可执行文件及配置文件. 而make distclean要清除所有生成的文件. Makefile 在符合GNU Makefiel惯例的Makefile中,包含了一 ...

  6. tomcat源码解读(1)–tomcat热部署实现原理

    tomcat的热部署实现原理:tomcat启动的时候会有启动一个线程每隔一段时间会去判断应用中加载的类是否发生变法(类总数的变化,类的修改),如果发生了变化就会把应用的启动的线程停止掉,清除引用,并且 ...

  7. CorelDRAW 文件实用工具 CDRTools 2

    随着 CorelDRAW 更新脚步越来越频繁,版本之间兼容性问题越来越突出,特别是跨版本之间打开会有很多问题,比如:文字跑位.透镜变向.位图出错.颜色改变,甚至会造成文件损坏.最好的办法就是哪一个版本 ...

  8. NYOJ 994 海盗分金 逆向递推

    链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=994 题意: 有n个海盗劫得了窖藏的m块金子,并准备瓜分这些战利品.按照古老流传下来的分金法则 ...

  9. VC++入门精通视频教程

    1.1.Windows程序运行原理-1 上传日期:2012-03-19 09:18:50  相关摘要:  - 在关闭一个windows窗口时,也关闭另一个吗 - 对纯面向对象的PHP程序有何看法? - ...

  10. 硬盘4k对齐教程总结

    4k对齐概念: 4K对齐相关联的是一个叫做“高级格式化”的分区技术.首先先来了解一下什么是叫做“4K 对齐”.其实“4K对齐”相关联的是一个叫做“高级格式化”的分区技术.“高级格式化”是国际硬盘设备与 ...