개요
: Android OS 에서 monkey 를 사용 자동 touch 를 동작 하게 한다.


Script

// monkey.txt


type= user

speed= 1000

start data >>

DispatchPointer(0, 0, 0, 1155, 1158, 0,0,0,0,0,0,0) // touch

DispatchPointer(0, 0, 1, 1155, 1158, 0,0,0,0,0,0,0) // release

UserWait(32000) // wait for 32s

DispatchPointer(0, 0, 0, 42, 45, 0,0,0,0,0,0,0) // touch

DispatchPointer(0, 0, 1, 42, 45, 0,0,0,0,0,0,0) // release

UserWait(1000)

DispatchPointer(0, 0, 0, 2025, 36, 0,0,0,0,0,0,0) // touch

DispatchPointer(0, 0, 1, 2025, 36, 0,0,0,0,0,0,0) // release

quit 


PC 사용 command

 $adb push monkey.txt /data/log/monkey.txt      // monkey script 를 phone 에 밀어 넣기

 $adb shell monkey -f /data/log/monkey.txt 1     // monkey 실행 마지막 숫자는 반복 횟수 


monkey 멈추기

 $adb shell

 $ps | grep monkey

 $kill <process id>


ex)

greatlteks:/ $ ps | grep monkey

shell     18286 16512 2142876 110416 futex_wait 74baca4f70 S com.android.commands.monkey

greatlteks:/ $ kill 18286




설정

트랙백

댓글