1

I am using following command to execute specific package:

adb shell monkey -v -p com.google.android.apps.maps 500

adb shell monkey -p com.google.android.voicesearch 10

Q-1: But I want to execute all the packages in batch mode,can anyone please suggest? I have used a process like putting all the individual commands in batch file and executing but it is not working after first command execution.

Q-2: Can you please suggest what is the command only to put random key strokes through out the phone?

Thanks in Advance !!!

Donut
  • 110,061
  • 20
  • 134
  • 146
Elkay
  • 11
  • 1
  • 2

1 Answers1

0

You could try writing a monkey script (eg. test.txt):

# Start of Script
type= user
count= 1
speed= 1.0
UserWait(200)
start data >>

LaunchActivity(com.company.application1.Activity, com.company.application1.Activity)
UserWait(2000)
# Do stuff

LaunchActivity(com.company.application2.Activity, com.company.application2.Activity)
UserWait(2000)
# Do stuff

LaunchActivity(com.company.application3.Activity, com.company.application3.Activity)
UserWait(2000)
# Do stuff

and then run it by calling

monkey -f test.txt 1
Jakub Czaplicki
  • 1,787
  • 2
  • 28
  • 50