android 模擬器快速鍵

來源:互聯網
上載者:User

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輸出標籤
    -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 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 結束通話
    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檔案夾下的內容。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.