本文介绍了以编程方式访问Verizon HTC Droid Incredible(Android)上的内部存储(不是SD卡)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试查找有关如何以编程方式访问内部存储内存 8GB HTC Droid Incredible 的信息./code>.

要确定外部存储(SD卡)的位置,我正在使用以下命令:

  android.os.Environment.getExternalStorageDirectory(). 

我无法找到内部电话存储的任何推论.

在检查 HTC/Google Nexus One Motorola Droid HTC Dream/G1手机时,确实(确实如此)似乎没有这样的任意内部存储的任何 Mount Point .

在这些手机上,内部存储被划分为/data /system /cache 分区.

不可思议的内部存储当然不会位于/system 中.鉴于/cache 在全球范围内不可读/不可执行,因此也不大可能.

我在评论中读到,对于应用程序,手机仍将限制为 512MB 左右,这表明它不只是/data 的子目录./p>

我自己当然无法访问 Droid Incredible 单元.

解决方案

此处有更多信息: Droid令人难以置信的存储安装点.似乎Droid Incredible将其内部存储安装到了/emmc,据称是r/w.尚未验证是否需要 WRITE_EXTERNAL_STORAGE 权限才能获得读写访问权限-我正在尝试从 Google代码

我可能会通过允许用户使用两个选项来存储数据来解决此问题:

  1. SD卡
  2. Droid Incredible-only内部存储

似乎 WRITE_EXTERNAL_STORAGE 权限就足够了:根据 droidForums /sdcard和/emmc具有相同的GID1015年.

Edit2:根据 Google网上论坛线程 Incredible返回/sdcard作为 Environment.getExternalStorageDirectory()的结果值.因此,用户需要决定是否要使用/sdcard或/emmc.自动检测不可思议"可能基于/emmc路径的存在.

I'm trying to find information on how to programmatically access the HTC Droid Incredible's supposed 8GB of Internal Storage Memory.

To determine the External Storage (SD Card) Location, I'm using the command:

android.os.Environment.getExternalStorageDirectory().

I've not been able to find any corollary for Internal phone Storage.

In examining HTC/Google Nexus One, Motorola Droid, and HTC Dream/G1 phones, there (as would be expected) does not appear to be any Mount Point for such Arbitrary Internal Storage.

On these phones the Internal Storage is divided amongst /data, /system, and /cache partitions.

The Incredible's Internal Storage is certainly not going to be located in /system. /cache is also unlikely given that it is globally non-readable/non-executable.

I'd read in reviews that the phone will still be limited to 512MB or so for apps, suggesting that it is not simply a subdirectory of /data.

I do not have access to a Droid Incredible unit myself, of course.

解决方案

There is more information here: Droid Incredible storage mount points. It seems that Droid Incredible mounts its internal storage to /emmc, supposedly mounted r/w. It is not yet verified whether the WRITE_EXTERNAL_STORAGE permission is necessary in order to gain r/w access - I'm trying to get this information from Google Code

I will probably solve this by allowing the user two options to store the data:

  1. SD-Card
  2. Droid Incredible-only Internal storage

Edit: It seems that the WRITE_EXTERNAL_STORAGE permission is sufficient: according to droidForums both /sdcard and /emmc has the same GID of 1015.

Edit2: According to Google Group Thread the Incredible returns /sdcard as the result value of Environment.getExternalStorageDirectory(). Therefore, the user needs to decide whether he wants to use /sdcard or /emmc. The auto-detection of Incredible may be based on existence of the /emmc path.

这篇关于以编程方式访问Verizon HTC Droid Incredible(Android)上的内部存储(不是SD卡)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 05:54