Android模擬器 參數大全

附錄  Android模擬器 參數大全

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
設置網絡速度如GPRSEDGE3G更多詳細的
內容下面有介紹
    -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輸出標籤
    -noaudio            disable android audio support
禁用音頻支持
    -useaudio           enable android audio support (default)
啓用音頻支持
    -mic <file>         WAV file for audio 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 translucency (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 value 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 結束通話

    F7                      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文件夾下的內容。

 

 

發佈了83 篇原創文章 · 獲贊 3 · 訪問量 5119
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章