adb 命令(模擬器控制)

1 篇文章 / 0 new
author
adb 命令(模擬器控制)
►連線模擬器
telnet localhost 5554(依實際port)
► 電源相關命令
power display
power ac off/on
power capacity 0-100
► 模擬器取得 root 權限執行動作如下
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
exit
►鍵盤操作
Emulated Device Key Keyboard Key
Home HOME
Menu (left softkey) F2 or Page-up button
Star (right softkey) Shift-F2 or Page Down
Back ESC
Call/dial button F3
Hangup/end call button F4
Search F5
Power button F7
Audio volume up button KEYPAD_PLUS, Ctrl-F5
Audio volume down button KEYPAD_MINUS, Ctrl-F6
Camera button Ctrl-KEYPAD_5, Ctrl-F3
Switch to previous layout orientation (for example, portrait, landscape) KEYPAD_7, Ctrl-F11
Switch to next layout orientation (for example, portrait, landscape) KEYPAD_9, Ctrl-F12
Toggle cell networking on/off F8
Toggle code profiling F9 (only with -trace startup option)
Toggle fullscreen mode Alt-Enter
Toggle trackball mode F6
Enter trackball mode temporarily (while key is pressed) Delete
DPad left/up/right/down KEYPAD_4/8/6/2
DPad center click KEYPAD_5
Onion alpha increase/decrease KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)

其它參考
http://developer.android.com/tools/help/emulator.html#controlling
http://developer.android.com/tools/help/adb.html
Free Web Hosting