eclipse 获取sd卡的写权限

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10679770/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 18:13:01  来源:igfitidea点击:

getting the write permission for sd card

androideclipsepermissionsandroid-emulator

提问by Suhail Gupta

I can't mount my sd card on the emulator and it gives me only a read option for the sd card as shown below :

我无法在模拟器上安装我的 SD 卡,它只给我一个 SD 卡的读取选项,如下所示:

enter image description here

在此处输入图片说明

How do i get the write permission on the virtual sd card so that i am able to push some media onto the sd card to test my applications ?

我如何获得虚拟 SD 卡的写权限,以便我能够将一些媒体推送到 SD 卡上以测试我的应用程序?

采纳答案by Kazekage Gaara

Open the shell. Open your prompt, type:

打开外壳。打开你的提示,输入:

adb shell

Then, remount your sdcard with rw permissions.

然后,使用 rw 权限重新挂载您的 SD 卡。

mount -o remount rw /sdcard

EDIT

编辑

sdcard without permissions:

没有权限的sdcard:

enter image description here

在此处输入图片说明

Opening the shell:

打开外壳:

enter image description here

在此处输入图片说明

change of permissions:

权限变更:

enter image description here

在此处输入图片说明

回答by Lalit Poptani

Make sure that you can created the SDCard for the Emulator by giving its sizeunder

确保您可以通过提供其size下为模拟器创建 SDCard

SD Card- Tab and also you have added SD Card Supportto your device under Hardware- Tab

SD Card- Tab 以及您已SD Card SupportHardware- Tab下添加到您的设备

enter image description here

在此处输入图片说明

回答by mr.j05hua

use your AVD manager and specify that the AVD target has an sd card on the virtualization. Also Google limits the emulated card to 50Mb, at least they used to. So just open eclipse, bring up your AVD manager from the menu bar and edit the target AVD emulation to have a card installed, then input write permission in your android manifest file for permission, should work fine from there.

使用您的 AVD 管理器并指定 AVD 目标在虚拟化上有一个 SD 卡。此外,谷歌将模拟卡限制为 50Mb,至少他们曾经如此。因此,只需打开 eclipse,从菜单栏中调出您的 AVD 管理器并编辑目标 AVD 仿真以安装卡,然后在您的 android 清单文件中输入写入权限以获得权限,从那里应该可以正常工作。

回答by sangat

less then 1024 MB size of sdcard in avd ->to edit then save then run

avd 中 sdcard 的大小小于 1024 MB -> 编辑然后保存然后运行