title: How to get an instance of android.app.UiAutomation
body: <p>I am testing some new features of Android 5.0, and now is the round of the <code>UiAutomator</code> and the new method implemented. I've tried to search for an example/guide, then I've tried to get an instance of UiAutomator by</p>
  
  <pre><code>getSystemService()
  </code></pre>
  
  <p>but that was not helpful. My goal is to use <a href="https://developer.android.com/reference/android/app/UiAutomation.html#executeShellCommand%28java.lang.String%29" rel="noreferrer"><code>executeShellCommands(String str)</code></a>.</p>
  
  <p>Has anyone already implemented?</p>