简体   繁体   English

Android:传输错误:只读文件系统

[英]Android:transfer error: Read-only file system

I want to push a *.mp3 file in to my emulator, but it gives me these 2 errors: 我想将* .mp3文件推送到我的模拟器中,但它给了我这两个错误:

 transfer error: Read-only file system
 Failed to push selection: Read-only file system

To resolve the problem, i have done these works, but still not working: 要解决这个问题,我已经完成了这些工作,但仍然无法正常工作:

1-Using CMD to do this: c:\\android-sdk\\platform-tools\\>abd remount 1 - 使用CMD执行此操作: c:\\android-sdk\\platform-tools\\>abd remount

2-Add these 2 lines to the AndroidManifest.xml 2 - 将这两行添加到AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

3-Set the SDcard in emulator configuration as 1024 Mb 3 - 将仿真器配置中的SD卡设置为1024 Mb 在此输入图像描述

The thing that makes me wonderful is that the sdcard folder in file explorer has all the necessary permissions 让我精彩的是文件资源管理器中的sdcard文件夹具有所有必要的权限 在此输入图像描述

Here is a solution I found in other site, which is the only way that worked in my case: 这是我在其他网站上找到的解决方案,这是我的唯一方法:


In a terminal (I work on Mac OS X) I wnt to sdk/platform-tools directory (to get access to the adb shell) then I typed the following commands: 在一个终端(我在Mac OS X上工作)我去了sdk / platform-tools目录(为了访问adb shell)然后输入以下命令:

./adb shell
su
mount -o rw,remount rootfs / 
chmod 777 /mnt/sdcard 

and then typed exit to exit su , and exit again to exit the adb shell. 然后键入exit退出su ,并exit再次退出亚行外壳。

@atisman's answer got me working. @ atisman的回答让我工作。 There are two small bits to add to his response though: 虽然有两个小位可以添加到他的回复中:

First, picky as it seems, you might need an extra '-' in the unix command line, depending on your local OS. 首先,看起来很挑剔,你可能需要在unix命令行中额外添加' - ',具体取决于你的本地操作系统。 The only way it would work for me was: 它对我有用的唯一方法是:

mount -o -rw,remount rootfs / 

The other item is to make sure you have actually defined the device's SD card with some size. 另一项是确保您已经实际定义了具有某种尺寸的设备SD卡。 I see you have, but I didn't, so just putting it out there in case anyone else has a similar issue. 我看到你有,但我没有,所以只是把它放在那里以防其他人有类似的问题。

Open AVD manager, click on the device you are using... click 'edit' and go to the "SD Card" area. 打开AVD管理器,单击您正在使用的设备...单击“编辑”并转到“SD卡”区域。 Make sure if "Size" is clicked, that there is a number in the area next to it. 确保单击“大小”,并在其旁边的区域中有一个数字。 Otherwise the SD card can't hold any info. 否则SD卡无法保存任何信息。

if some one have same problem in new build of studio . 如果有人在新建工作室中有同样的问题。 0.8.9 and above see my solution and it will work like a charm , here : afra mehrparvar solution in the bottom of the page . 0.8.9及以上看到我的解决方案,它将像魅力一样工作,这里:afra mehrparvar解决方案在页面底部。

Android Emulator sdcard push error: Read-only file system Android Emulator sdcard推送错误:只读文件系统

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM