title: Android Stop Emulator from Command Line
body: <p>This question is identical to <a href="https://stackoverflow.com/questions/5912403/how-to-shut-down-android-emulator-via-cmd">How to shut down Android emulator via command line</a>.</p>
  
  <p>However, after attempting the suggested solution from the first answer <code>adb emu kill</code> has not proven successful for me.</p>
  
  <p>I am automating unit tests for an android application. My bash script runs on a headless machine. It creates an android device using <code>android create avd</code> and executes <code>emulator</code> with the <code>-no-window</code> attribute. It then compiles the test project, connects to the emulator using <code>adb</code>, installs the project and executes my tests. This all works fine.</p>
  
  <p>Now I need to terminate the emulator process, and just like the referenced post, I am only able to do this using <code>kill -9</code>. </p>
  
  <p>The Google tutorial <a href="http://developer.android.com/tools/devices/managing-avds-cmdline.html" rel="noreferrer">Managing AVDs from the Command Line</a> only mentions how to stop emulators within a GUI environment. </p>
  
  <p>Any help is appreciated.</p>