[转]在Google Android模拟器中使用SD卡(命令行和eclipse环境)
2012-04-24 15:18
387 查看
Android模拟器能够让我们使用fat32格式的磁盘镜像作为SD卡的模拟:
以下所有操作均在windows环境
首先,运行cmd,进入命令行界面(需要预先将你放置android sdk所在目录下的tools设置到环境变量path中)
以下除eclipse方式,其他均在命令行运行
1. 创建SD文件
命令行方式: mksdcard -l sdcard 512M d:/android/mysdcard/sdcard.img 这样就在d:/android/mysdcard/sdcard.img 创建了一个512M的SD卡镜像文件
mksdcard参数如下:
mksdcard: create a blank FAT32 image to be used with the Android emulator
usage: mksdcard [-l label] <size> <file>
if <size> is a simple integer, it specifies a size in bytes
if <size> is an integer followed by 'K', it specifies a size in KiB
if <size> is an integer followed by 'M', it specifies a size in MiB
2.在模拟器中加载刚创建的SD文件
命令行方式:emulator -sdcard d:/android/mysdcard/sdcard.img
eclipse方式:(前提是安装了google android 插件), 选择菜单“Run” -> "Run Configurations..." ,进入弹出页面,选择"Targets"标签,在最下面一行"Aditional Emulator Command Line Options"下面增加启动参数 -sdcard d:/android/mysdcard/sdcard.img
3.向SD卡传输文件(管理SD卡上的内容)
可以用mtools来做管理,也可以用android SDK带的命令:
adb push local_file sdcard/remote_file
local_file表示要传输的文件绝对路径,或与Tools目录的相对路径
remote_file为Qemu中Linux目录/sdcard/文件名
eclipse方式:
通过DDMS标签中的File Explorer文件浏览器在传输如图:
![](http://www.android123.com.cn/images/android_fileexplorer.jpg)
转自:http://www.cnblogs.com/jacktu/archive/2008/11/22/1338933.html
以下所有操作均在windows环境
首先,运行cmd,进入命令行界面(需要预先将你放置android sdk所在目录下的tools设置到环境变量path中)
以下除eclipse方式,其他均在命令行运行
1. 创建SD文件
命令行方式: mksdcard -l sdcard 512M d:/android/mysdcard/sdcard.img 这样就在d:/android/mysdcard/sdcard.img 创建了一个512M的SD卡镜像文件
mksdcard参数如下:
mksdcard: create a blank FAT32 image to be used with the Android emulator
usage: mksdcard [-l label] <size> <file>
if <size> is a simple integer, it specifies a size in bytes
if <size> is an integer followed by 'K', it specifies a size in KiB
if <size> is an integer followed by 'M', it specifies a size in MiB
2.在模拟器中加载刚创建的SD文件
命令行方式:emulator -sdcard d:/android/mysdcard/sdcard.img
eclipse方式:(前提是安装了google android 插件), 选择菜单“Run” -> "Run Configurations..." ,进入弹出页面,选择"Targets"标签,在最下面一行"Aditional Emulator Command Line Options"下面增加启动参数 -sdcard d:/android/mysdcard/sdcard.img
3.向SD卡传输文件(管理SD卡上的内容)
可以用mtools来做管理,也可以用android SDK带的命令:
adb push local_file sdcard/remote_file
local_file表示要传输的文件绝对路径,或与Tools目录的相对路径
remote_file为Qemu中Linux目录/sdcard/文件名
eclipse方式:
通过DDMS标签中的File Explorer文件浏览器在传输如图:
![](http://www.android123.com.cn/images/android_fileexplorer.jpg)
转自:http://www.cnblogs.com/jacktu/archive/2008/11/22/1338933.html
相关文章推荐
- 在Google Android模拟器中使用SD卡(命令行和eclipse环境)
- 在Google Android模拟器中使用SD卡(命令行和eclipse环境)
- [转]如何在Google Android模拟器中使用SD卡(命令行和eclipse环境)
- 在Google Android模拟器中使用SD卡
- 在Google Android模拟器中使用SD卡
- 在Google Android模拟器中使用SD卡
- Windows 下在Google Android模拟器中使用SD卡
- 【PE】Windows平台命令行中使用vcvarsall.bat配置编译环境
- Eclipse环境中使用RXTX
- 使用eclipse前的一些设置(环境配置好后)
- 整理:Eclipse集成开发环境使用说明
- Ubuntu(Linux)使用Eclipse搭建C/C++编译环境
- centos6.5 桌面环境下使用命令行对不支持中文的问题解决办法
- 在ubuntu下使用Eclipse搭建Hadoop开发环境《转》
- 使用adb命令向模拟器安装apk(windows环境)
- Ubuntu 12.04 使用Eclipse搭建C/C++编译环境
- Ubuntu(Linux)使用Eclipse搭建C/C++编译环境
- Eclipse上Maven环境配置使用 (全)
- 惊艳的 cygwin——Windows下的Linux命令行环境的配置和使用
- 在命令行中使用 Eclipse MAT 工具