(重新)安装在Android模拟器的SD卡 [英] (re)mounting the SD card on android emulator

查看:150
本文介绍了(重新)安装在Android模拟器的SD卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在模拟器中,我可以从设置卸载SD卡。

On the emulator, I can unmount the SD card from the Settings.

然后我就可以将其安装我的操作系统,然后将其卸载正常。

I can then mount it on my OS, then unmount it normally.

我一直无法弄清楚如何重新安装它,然后在模拟器上(无需重新启动的话)。

I haven't been able to figure out how to re-mount it then on the emulator (without rebooting it).

提示:

  • 亚洲开发银行命令重新装入是无关的:它是关于 /系统
  • 模拟器命令是不相关的:它是只有大约启动模拟器
  • 安装在SD卡,当然两个地方都搞乱了(我想)
  • the adb command remount is unrelated: it's about /system
  • the emulator command is unrelated: it's only about starting the emulator
  • mounting the SD card in two places of course messing everything up (I tried)

更多:

  • 安装输出如下:

的/ dev /块//进程vold / 179:0 / SD卡VFAT rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,$c$cpage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

试图从外壳卸载它,使用与上面相同的选项后再次安装,给人以段错误

trying to mount again from the shell after unmounting it, using the same options as above, gives a segfault

推荐答案

开发者指南表明,这是不可能的:

The developers guide suggests that this isn't possible:

SD卡仿真

您可以创建磁盘映像,然后   其加载到仿真器在启动时,要   模拟用户的SD的presence   卡在设备中。要做到这一点,你   可以使用android工具创建   一个新的AVD,或新的SD卡图像   您可以使用mksdcard工具   包含在SDK中。

You can create a disk image and then load it to the emulator at startup, to simulate the presence of a user's SD card in the device. To do this, you can use the android tool to create a new SD card image with a new AVD, or you can use the mksdcard utility included in the SDK.

下面的章节描述了如何   创建一个SD卡磁盘映像,如何   文件复制到它,以及如何加载它   在模拟器启动。

The sections below describe how to create an SD card disk image, how to copy files to it, and how to load it in the emulator at startup.

请注意,您只能加载磁盘映像   在模拟器启动。同样的,你   不能删除模拟SD卡   从运行中的仿真器。但是,   可以浏览,发送文件,并   复制/从模拟标清删除文件   卡或者与ADB或模拟器。

Note that you can only load disk image at emulator startup. Similarly, you can not remove a simulated SD card from a running emulator. However, you can browse, send files to, and copy/remove files from a simulated SD card either with adb or the emulator.

该仿真器支持仿真SDHC   卡,这样你就可以创建一个SD卡   图像的任何尺寸可达128千兆字节。

The emulator supports emulated SDHC cards, so you can create an SD card image of any size up to 128 gigabytes.

尽管Android将卸载SD卡,仿真过程中保持备份文件打开。

While Android will unmount the SD card, the emulator process keeps the backing file open.

$ ls -go /proc/`pidof emulator`/fd | grep sdcard.img
lrwx------ 1 64 2010-05-13 01:50 10 -> /home/x/.android/avd/WithSD.avd/sdcard.img

有人更熟悉QEMU也许能提供进一步的深入了解,但是,如果我是你,我只是尝试使用NFS来解决这个问题。

Someone more familiar with QEMU may be able to provide further insight but, if I were you, I would just try to use NFS to solve this problem.

这篇关于(重新)安装在Android模拟器的SD卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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