如何将文件导入android模拟器上的sdcard? [英] how to import files into the sdcard on emulator in android?

查看:21
本文介绍了如何将文件导入android模拟器上的sdcard?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在模拟器中将一些照片加载到我的 sd 卡图像中.如何通过命令提示符执行此操作.如何执行此操作?

i want to load some photos into my sd card image in the emulator. how to do this by command prompt.how to do that?

推荐答案

我发现它非常笨拙并且不能很好地工作,但是使用的命令是: adb push yourfile.xxx/sdcard/yourfile.xxx.为此,您必须将该文件与 adb.exe 放在同一目录中,该目录位于 SDK 目录的 tools 文件夹中,或者已将 adb 设置为系统范围内可识别的命令.(我不记得该怎么做,但我知道可以做到).这还假设您已经通过 AVD 管理器设置了 SD 卡.但是,我这样做时遇到的问题是,有时文件会出现在模拟器上,大小为 0 字节.我的意思是我可以在 Eclipse 的 DDMS 文件浏览器中看到该文件,但是在重新启动必要的模拟器后,这些文件将以 0 字节大小显示.我找不到发生这种情况的规律,但连续尝试几次最终奏效了.

I've found it to be incredibly clumsy and not work very well, but the command to use is: adb push yourfile.xxx /sdcard/yourfile.xxx. For this to work you've got to have the file in the same directory as adb.exe, which is in the tools folder of your SDK directory, or have set up adb as a system-wide recognisable command. (I don't remember how to do that, but I know it can be done). This also assumes you've set up an SD card through the AVD manager. However, the problem I faced when doing this is that sometimes the file would appear on the emulator with a size of 0 bytes. What I mean is that I could see the file in the DDMS file browser in Eclipse, but after doing the necessary emulator restart, the files would then be shown with the 0 byte size. I couldn't find a pattern on why that happened, but trying a few times in a row eventually worked.

这篇关于如何将文件导入android模拟器上的sdcard?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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