Android模擬器使用的快捷鍵、參數(shù)、注意事項(xiàng) 轉(zhuǎn)
Posted on 2010-07-29 15:39 oathleo 閱讀(546) 評(píng)論(0) 編輯 收藏 所屬分類: AndroidAndroid Emulator是一款功能非常齊全的模擬器,電話本、通話等功能都可進(jìn)行模擬。甚至其內(nèi)置的瀏覽器和Google Maps都可以聯(lián)網(wǎng)。用戶可以使用鍵盤輸入,單擊模擬器按鍵輸入,甚至還可以使用鼠標(biāo)單擊、拖動(dòng)屏幕進(jìn)行操作。
1.模擬器和真機(jī)的不同之處
* 不支持呼叫和接聽實(shí)際來電,但可以通過控制臺(tái)模擬電話呼叫(呼入和呼出)。
* 不支持USB連接。
* 不支持相機(jī)/視頻捕捉。
* 不支持音頻輸入(捕捉),但支持輸出(重放)。
* 不支持?jǐn)U展耳機(jī)。
* 不能確定連接狀態(tài)。
* 不能確定電池電量水平和交流充電狀態(tài)。
* 不能確定SD卡的插入/彈出。
* 不支持藍(lán)牙。
2.參數(shù)大全
Android模擬器emulator.exe文件包含了很多參數(shù),平時(shí)在Eclipse IDE中,模擬器運(yùn)行被自動(dòng)調(diào)用的,如果僅僅使用Android emulator或采用NetBean這樣的開放環(huán)境又如何設(shè)置呢? 我們總結(jié)了一下模擬器的所有參數(shù)及使用方法,具體如下所示。
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 指定內(nèi)核文件
-ramdisk <file> ramdisk image (default <system>/ramdisk.img) 創(chuàng)建內(nèi)存磁盤
-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)
-nocache disable the cache partition 禁止分區(qū)緩存
-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 不使用任何模擬器外觀,這樣有助于提高模擬器速度,內(nèi)存小的用戶可以嘗試
-netspeed <speed> maximum network download/upload speeds 設(shè)置網(wǎng)絡(luò)速度如GPRS、EDGE、3G更多詳細(xì)的內(nèi)容下面有介紹
-netdelay <delay> network latency emulation 網(wǎng)絡(luò)延時(shí)設(shè)置
-netfast disable network shaping (full speed, no latency) 網(wǎng)絡(luò)全速工作
-trace <name> enable code profiling (press F9 to start) 跟蹤調(diào)試
-debug-kernel send kernel output to the console 內(nèi)核調(diào)試
-console enable console shell on current terminal 啟用控制臺(tái)Shell在當(dāng)前中端
-nojni disable JNI checks in the Dalvik runtime 禁用JNI檢查
-logcat <tags> enable logcat output with given tags 設(shè)置log輸出標(biāo)簽
-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 代理服務(wù)器設(shè)置
-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模擬器同樣存在很多快捷鍵,當(dāng)模擬器運(yùn)行時(shí),可以使用下面的快捷鍵來操作Android emulator,這樣比用鍵盤和鼠標(biāo)操作更高效,不妨試一下:
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 撥號(hào)/呼叫鍵
F4 Hangup/EndCall button 結(jié)束通話
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 相機(jī)鍵
KEYPAD_7, Ctrl-F11 switch to previous layout 返回鍵
KEYPAD_9, Ctrl-F12 switch to next layout 后一個(gè)界面
F8 toggle cell network on/off 禁止/啟用所有網(wǎng)絡(luò)
F9 toggle code profiling 開始跟蹤
Alt-ENTER toggle fullscreen mode 打開/關(guān)閉全屏模式
F6 toggle trackball mode 打開/關(guān)閉軌跡球
DELETE show trackball 顯示軌跡球
KEYPAD_5 DPad center 導(dǎo)航中建/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
Ctrl+F11 對(duì)模擬器的屏幕切換。
4.模擬器使用注意事項(xiàng)
平時(shí)使用emulator測(cè)試開發(fā)程序時(shí),可能會(huì)遇到系統(tǒng)關(guān)于C盤空間不足之類的提示,這是由于Android模擬器每次運(yùn)行時(shí)會(huì)臨時(shí)生成幾個(gè).tmp后綴的臨時(shí)文件,一段時(shí)間后,其可能占用幾G的磁盤空間。所以需要手工定期清理一下C:"Documents and Settings"sh"Local Settings"Temp"AndroidEmulator文件夾下的內(nèi)容。