(重新)在 Android 模拟器上安装 SD 卡
在模拟器上,我可以从“设置”中卸载 SD 卡。
然后我可以将其安装到我的操作系统上,然后正常卸载它。
我无法弄清楚如何在模拟器上重新安装它(无需重新启动它)。
提示:
adb
命令remount
无关:它与/system
无关;emulator
命令无关:它仅与启动模拟器- 在两个地方安装 SD 卡,当然会搞乱一切(我尝试过)
更多:
mount
输出以下内容:/dev/block//vold/179:0 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020, codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
在卸载 shell 后,使用与上面相同的选项再次尝试从 shell 挂载,会出现段错误
- 不知道为什么
block//vold
中的双斜杠,我猜这只是一个拼写错误
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).
hints:
- the
adb
commandremount
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)
more:
mount
outputs the following:/dev/block//vold/179:0 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=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
- no idea why the double slash in
block//vold
, I guess it's just a typo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
开发人员指南表明这是不可能的:
虽然 Android 将卸载 SD 卡,但模拟器进程会保持备份文件打开。
更熟悉 QEMU 的人可能能够提供进一步的见解,但如果我是你,我会尝试使用 NFS 来解决这个问题。
The developers guide suggests that this isn't possible:
While Android will unmount the SD card, the emulator process keeps the backing file open.
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.
我尝试进入“设置”并卸载 SD 卡,效果很好。尝试一下;重新安装它非常简单。
不过,这似乎不能通过 adb/cli 来完成。
I tried going to Settings and unmounting the SD card and this worked fine. Give it a try; remounting it is quite simple.
Doesn't seem like this can be done via adb/cli though.