Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php on line 141

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php on line 143

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php on line 141

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php on line 143

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php on line 141

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php on line 143

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php on line 141

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php on line 143

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/context/Context.class.php on line 143

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/context/Context.class.php on line 143

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/mobile/Mobile.class.php on line 85

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/mobile/Mobile.class.php on line 90

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 240

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 241

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 242

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 243

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 244

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 245

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 77

Warning: Cannot modify header information - headers already sent by (output started at /home1/dndnd222/public_html/zbxe/classes/db/DBMysql.class.php:141) in /home1/dndnd222/public_html/zbxe/classes/display/DisplayHandler.class.php on line 77
코드 클리핑 - adb monkey script
Android byDreamy postedJul 30, 2014

adb monkey script

?

Shortcut

PrevPrev Article

NextNext Article

ESCClose

+ - Up Down Comment Print

0. keycode

http://developer.android.com/reference/android/view/KeyEvent.html

http://developer.android.com/tools/help/monkey.html


1. monkey script 작성


type= user
speed= 1000
start data >>

DispatchPointer(0, 0, 0, 180,460, 0,0,0,0,0,0,0)
DispatchPointer(0, 0, 1, 180,460, 0,0,0,0,0,0,0)
UserWait(1000)

2. 실행

adb shell monkey -f /storage/sdcard0/script.txt 10



----------------------------------------------------------------------

[android/development/cmds/monkey/src/com/android/commands/monkey/MonkeySourceScript.java]


// event key word in the capture log
private static final String EVENT_KEYWORD_POINTER = "DispatchPointer";
private static final String EVENT_KEYWORD_TRACKBALL = "DispatchTrackball";
private static final String EVENT_KEYWORD_ROTATION = "RotateScreen";
private static final String EVENT_KEYWORD_KEY = "DispatchKey";
private static final String EVENT_KEYWORD_FLIP = "DispatchFlip";
private static final String EVENT_KEYWORD_KEYPRESS = "DispatchPress";
private static final String EVENT_KEYWORD_ACTIVITY = "LaunchActivity";
private static final String EVENT_KEYWORD_INSTRUMENTATION = "LaunchInstrumentation";
private static final String EVENT_KEYWORD_WAIT = "UserWait";
private static final String EVENT_KEYWORD_LONGPRESS = "LongPress";
private static final String EVENT_KEYWORD_POWERLOG = "PowerLog";
private static final String EVENT_KEYWORD_WRITEPOWERLOG = "WriteLog";
private static final String EVENT_KEYWORD_RUNCMD = "RunCmd";
private static final String EVENT_KEYWORD_TAP = "Tap";
private static final String EVENT_KEYWORD_PROFILE_WAIT = "ProfileWait";
private static final String EVENT_KEYWORD_DEVICE_WAKEUP = "DeviceWakeUp";
private static final String EVENT_KEYWORD_INPUT_STRING = "DispatchString";
private static final String EVENT_KEYWORD_PRESSANDHOLD = "PressAndHold";
private static final String EVENT_KEYWORD_DRAG = "Drag";
private static final String EVENT_KEYWORD_PINCH_ZOOM = "PinchZoom";
private static final String EVENT_KEYWORD_START_FRAMERATE_CAPTURE = "StartCaptureFramerate";
private static final String EVENT_KEYWORD_END_FRAMERATE_CAPTURE = "EndCaptureFramerate";
private static final String EVENT_KEYWORD_START_APP_FRAMERATE_CAPTURE = "StartCaptureAppFramerate";
private static final String EVENT_KEYWORD_END_APP_FRAMERATE_CAPTURE = "EndCaptureAppFramerate";



----------------------------------------------------------------------


Monkey Script – Example



# Start of Script
type= user
count= 49
speed= 1.0
start data >>
LaunchActivity(com.mpowerlabs.coin.android, com.mpowerlabs.coin.android.LoginActivity)
# 3120021258
DispatchPress(KEYCODE_3)
UserWait(200)
DispatchPress(KEYCODE_1)
UserWait(200)
DispatchPress(KEYCODE_3)
UserWait(200)
DispatchPress(KEYCODE_5)
UserWait(200)
DispatchPress(KEYCODE_0)
UserWait(200)
DispatchPress(KEYCODE_2)
UserWait(200)
DispatchPress(KEYCODE_1)
UserWait(200)
DispatchPress(KEYCODE_2)
UserWait(200)
DispatchPress(KEYCODE_5)
UserWait(200)
DispatchPress(KEYCODE_8)
UserWait(200)
# Pin 12345
DispatchPress(KEYCODE_DPAD_DOWN)
UserWait(250)
DispatchPress(KEYCODE_1)
UserWait(200)
DispatchPress(KEYCODE_2)
UserWait(200)
DispatchPress(KEYCODE_3)
UserWait(200)
DispatchPress(KEYCODE_4)
UserWait(200)
DispatchPress(KEYCODE_5)
UserWait(200)
# Down and enter
DispatchPress(KEYCODE_DPAD_DOWN)
UserWait(250)
DispatchPress(KEYCODE_ENTER)


나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 Cancel

Designed by sketchbooks.co.kr / sketchbook5 board skin

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5