Android储存位置 [英] Android Storage Locations

查看:69
本文介绍了Android储存位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以详细说明Android中的各种存储位置吗?

Can someone explain in detail about the various storage locations in Android,

  1. /sdcard/(以及/root/目录和其他系统级目录)
  2. /storage/emulated/0/
  3. /storage/emulated/legacy/
  4. /storage/sdcard0/

真的对这些感到困惑吗?是否有任何方法可以在需要时以编程方式访问它们?

Really confused with these? And are there any methods to access them programatically whenever needed?

推荐答案

我不能说所有手机上的存储路径.但是我可以就我的电话清楚地向你解释; Coolpad Note 3-在Android 5.1上运行.因为,根据您的供应商/制造商以及不同版本的Android OS,其他手机上的存储位置或路径可能会有所不同.

I can't speak for storage paths on all phones. But I can explain you clearly with respect to my phone; Coolpad Note 3 - running on Android 5.1. Because, the storage locations or paths may vary on other mobile phones depending on your vendor/manufacturer and different versions of Android OS.

通常,/someDirectory/root/someDirectory>root>someDirectory是相同的.选择其中的哪一个进行显示;取决于您的文件管理器.

Generally, /someDirectory or /root/someDirectory or >root>someDirectory are same. Which among them is picked to display; depends on your file manager.

在我的手机上

/root/sdcard电话内部存储器(在我的情况下为16 GB)的存储路径.

/root/sdcard is storage path to phone's internal memory(16 GB in my case).

/storage/emulated/0//storage/sdcard0/都是/root/sdcard的符号链接.这意味着,这两个路径也是我的手机内部存储器的存储路径.

Both /storage/emulated/0/ and /storage/sdcard0/ are symlinks to /root/sdcard. It means, these two paths are also storage paths of my phone's internal memory.

/storage/sdcard1/是我的 micro SD卡的存储路径.

在任何手机上:

在Android 4.2之前,只有一个用户可以使用您的手机. 没有的概念是两个或更多用户创建单独的配置文件并登录到同一部手机.

Before Android 4.2, only one user could user your phone. There was no concept of two or more users creating separate profiles and logging into the same phone.

因此,没有像/storage/emulated/someDirectory

在Android 4.2中引入了多用户API 后,出现了模拟目录.

The emulated directories came up after the introduction of multiuser API in Android 4.2.

来源:来源1 从那时起,

/storage/emulated/legacy/指向当前正在工作的用户的外部存储(Android术语).这将是一个符号链接.

/storage/emulated/legacy/ points to External Storage(Android terminology) of the currently working user. It would be a symlink.

/storage/emulated/anyNumber/指向特定用户的外部存储(Android术语).

/storage/emulated/anyNumber/ points to External Storage(Android terminology) of a specific user.

在我的手机上:我有两个用户.

user1(Ramesh)的内部存储器位置是:/storage/emulated/0/

internal memory location for user1 (Ramesh) is: /storage/emulated/0/

user2(Kishore)的内部存储器位置是:/storage/emulated/10/

internal memory location for user2 (Kishore) is: /storage/emulated/10/

因此,如果user1(Ramesh)登录&使用电话.在这种情况下,/storage/emulated/legacy/将是/storage/emulated/0/

So /storage/emulated/legacy/ would point to /storage/emulated/0/ if user1(Ramesh) logs in & uses the phone. In this case, /storage/emulated/legacy/ would be a symlink to /storage/emulated/0/

如果user2(Kishore)登录&并/storage/emulated/legacy/会指向/storage/emulated/10/.使用电话.在这种情况下,/storage/emulated/legacy/将是/storage/emulated/10/

And /storage/emulated/legacy/ would point to /storage/emulated/10/ if user2(Kishore) logs in & uses the phone. In this case, /storage/emulated/legacy/ would be a symlink to /storage/emulated/10/

如果您想进一步了解存储路径,请通过android.stackexchange.com上的答案

If you want to know more about storage paths, please go through this answer on android.stackexchange.com

我在上面特别提到了外部存储( Android术语).因为,根据Google/Android官方文档的内部和外部存储术语与普通Android OS用户完全不同.

I specifically mentioned External Storage(Android terminology) above. Because, the Internal and External Storage terminology according to Google/official Android documentation is quite different to that of normal Android OS user.

这篇关于Android储存位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆