Android模拟器(Android Emulator )使用的快捷键、参数、注意事项

来源:互联网 发布:java cmd运行 编辑:程序博客网 时间:2024/06/05 13:26
 
Android Emulator是一款功能非常齐全的模拟器,电话本、通话等功能都可进行模拟。甚至其内置的浏览器和Google Maps都可以联网。用户可以使用键盘输入,单击模拟器按键输入,甚至还可以使用鼠标单击、拖动屏幕进行操作。
1.模拟器和真机的不同之处
    * 不支持呼叫和接听实际来电,但可以通过控制台模拟电话呼叫(呼入和呼出)。
    * 不支持USB连接。
    * 不支持相机/视频捕捉。
    * 不支持音频输入(捕捉),但支持输出(重放)。
    * 不支持扩展耳机。
    * 不能确定连接状态。
    * 不能确定电池电量水平和交流充电状态。
    * 不能确定SD卡的插入/弹出。
    * 不支持蓝牙。

2.参数大全
Android模拟器emulator.exe文件包含了很多参数,平时在Eclipse IDE中,模拟器运行自动调用的,如果仅仅使用Android emulator或采用NetBean这样的开放环境又如何设置呢? 我们总结了一下模拟器的所有参数及使用方法,具体如下所示。  

Android Emulator usage: emulator [options] [-qemu args]
  options:
    -system <dir>       read system images from <dir>
    -datadir <dir>      write user data into <dir>
    -kernel <file>      emulated kernel 指定内核文件
    -ramdisk <file>     ramdisk image (default <system>/ramdisk.img) 创建内存磁盘
    -image <file>       system image (default <system>/system.img)
    -initdata <file>    initial user image (default <system>/userdata.img)
    -data <file>        working user image (default <datadir>/userdata-qemu.img)
    -wipe-data          reset the user data image (copy it from initdata) 清除所有用户数据
    -nocache            disable the cache partition 禁止分区缓存
    -sdcard <file>      SD card image (default <system>/sdcard.img) 使用SD卡映像
    -skindir <dir>      search skins in <dir> (default <system>/skins) 搜索外观皮肤路径
    -skin <skin>        select a given skin 选择Android模拟器皮肤ID
    -noskin             don't use any emulator skin 不使用任何模拟器外观,这样有助于提高模拟器速度,内存小的用户可以尝试
    -netspeed <speed>   maximum network download/upload speeds 设置网络速度如GPRS、EDGE、3G更多详细的内容下面有介绍
    -netdelay <delay>   network latency emulation 网络延时设置
    -netfast            disable network shaping (full speed, no latency) 网络全速工作
    -trace <name>       enable code profiling (press F9 to start) 跟踪调试
    -debug-kernel       send kernel output to the console 内核调试
    -console            enable console shell on current terminal 启用控制台Shell在当前中端
    -nojni              disable JNI checks in the Dalvik runtime 禁用JNI检查
    -logcat <tags>      enable logcat output with given tags 设置log输出标签
    -noa io            disable android a io support 禁用音频支持
    -usea io           enable android a io support (default) 启用音频支持
    -mic <file>         WAV file for a io input 使用wav文件模拟mic麦克输入
    -flash-keys         flash key presses on the device skin
    -raw-keys           disable Unicode keyboard reverse-mapping
    -radio <device>     redirect radio modem interface to character device
    -oldradio           enable old VM-based simulated radio
    -onion <image>      use overlay image over screen
    -onion-alpha <%age> specify onion skin transl ency (default 50)
    -http-proxy <proxy> make TCP connections through a HTTP/HTTPS proxy 代理服务器设置
    -verbose            enable verbose output
    -verbose-keys       enable verbose key presses
    -verbose-proxy      enable proxy debug messages
    -version            display emulater version number
    -qemu               pass arguments to qemu
    -qemu -h            display qemu help
    -help               print this help
   Default network latency is 'none'
  <proxy> can be one of the following:
    
http://<server>:<port>
    
http://<username>:<password>@<server>:<port>
  the 'http://' prefix can be omitted. If '-http-proxy <proxy>' is not used,
  the 'http_proxy' environment variable is looked up and any val matching
  the <proxy> format will be used automatically
3.快捷键  
Android模拟器同样存在很多快捷键,当模拟器运行时,可以使用下面的快捷键来操作Android emulator,这样比用键盘和鼠标操作更高效,不妨试一下:
D:\unsetup\android-sdk-windows-1.1_r1\tools>emulator.exe -help-keys

  When running the emulator, use the following keypresses:

    HOME                    Home button 主界面键
    F2, PAGEUP              Menu (Soft-Left) button 左软键
    Shift-F2, PAGEDOWN      Star (Soft-Right) button 右软键
    ESCAPE                  Back button 后退键
    F3                      Call/Dial button 拨号/呼叫键
    F4                      Hangup/EndCall button 结束通话
    F4                      Power button 电源键
    F5                      Search button 搜索键
    KEYPAD_PLUS, Ctrl-F5    Volume up button 增大音量键  
    KEYPAD_MINUS, Ctrl-F6   Volume down button 减小音量键
    Ctrl-KEYPAD_5, Ctrl-F3  Camera button 相机键
    KEYPAD_7, Ctrl-F11      switch to previous layout 返回键
    KEYPAD_9, Ctrl-F12      switch to next layout 后一个界面
    F8                      toggle cell network on/off 禁止/启用所有网络
    F9                      toggle code profiling 开始跟踪
    Alt-ENTER               toggle fullscreen mode 打开/关闭全屏模式
    F6                      toggle trackball mode 打开/关闭轨迹球
    DELETE                  show trackball 显示轨迹球
    KEYPAD_5                DPad center 导航中建/OK键
    KEYPAD_4                DPad left 左键
    KEYPAD_6                DPad right 右键
    KEYPAD_8                DPad up shang 上键
    KEYPAD_2                DPad down 下键
    KEYPAD_MULTIPLY         increase onion alpha
    KEYPAD_DIVIDE           decrease onion alpha

4.模拟器使用注意事项
平时使用emulator测试开发程序时,可能会遇到系统关于C盘空间不足之类的提示,这是由于Android模拟器每次运行时会临时生成几个.tmp后缀的临时文件,一段时间后,其可能占用几G的磁盘空间。所以需要手工定期清理一下C:\Documents and Settings\sh\Local Settings\Temp\AndroidEmulator文件夹下的内容。
0 0
原创粉丝点击