title: Get status of activity manager
body: <p>I'm writing a python script that makes calls to adb to perform JUnit tests.  I've used 'adb get-state' and 'adb wait-for-device' to wait for when the emulator is booted and ready to go, but for some reason, both of these kick off too early.  After these functions return, I get this error when I start to run my tests:</p>
  
  <pre><code>android.util.AndroidException: Can't connect to activity manager; is the system running?
  </code></pre>
  
  <p>Is there a way I can get the status of the activity manager?  If I could just poll that status that should be sufficient.</p>
  
  <p>Thanks!</p>