jsjrobotics jsjrobotics - 1 year ago 151
Android Question

Android Stop Emulator from Command Line

This question is identical to How to shut down android emulator via cmd.

However, after attempting the suggested solution from the first answer

adb emu kill
has not proven successful for me.

I am automating unit tests for an android application. My bash script runs on a headless machine. It creates an android device using
android create avd
and executes
with the
attribute. It then compiles the test project, connects to the emulator using
, installs the project and executes my tests. This all works fine.

Now I need to terminate the emulator process, and just like the referenced post, I am only able to do this using
kill -9

The Google tutorial Managing AVDs from the Command Line only mentions how to stop emulators within a GUI environment.

Any help is appreciated.

Answer Source

May be adb kill-server helps for you?


adb -s emulator-5554 emu kill

Also read : http://devmaze.wordpress.com/2011/12/12/starting-and-stopping-android-emulators/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download