What is wrong with this script?
# Imports the monkeyrunner modules used by this program
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
# Connects to the current device, returning a MonkeyDevice object
device = MonkeyRunner.waitForConnection()
#Reboot
device.reboot('None')
I also tried changing the bootloadType. Insted of the last line I tried with, device.reboot('bootloader') and device.reboot('recovery'), but it didn't work either.
Post by an Android dev here says the following:
For emulator ideally you should be able to use:
... but there is a bug raised here against start/stop for emulators >= 2.2.
Personally, I use a nasty little shell script to kill off all emulator instances and then start the emulator again:
This script can be refined by passing in a serial number of a particular emulator to kill off (can get the serial number using "adb get-serialno")
I'd be intereted in seeing what others think/ways they are automating restart of emulator.