0

I use AndroidViewClient in order to use MonkeyRunner through Python. I need to start the AVD programmatically and get notified when the AVD start process is completed. How can I catch that event? The execution just does not reach the line after the subprocess.run() function.

Here is how I start my AVD:

subprocess.run('emulator -avd Nexus_5_API_26 -wipe-data', shell=True)
// the execution just does not reach this line
talha06
  • 6,206
  • 21
  • 92
  • 147

1 Answers1

0

You can detect that the AVD is ready using

adb wait-for-device

also, to start the emulator in the background you need Popen.

Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134