title: android: manipulate screen lock settings via adb?
body: <p>I'm in the process of setting up an automated testing environment which uses android emulators to test apps. This is a headless setup where the emulators are run under Xvfb, so manual interaction is not possible.</p>
  
  <p>I need a programatic way to change (via adb or telnet) the screen lock settings on the emulator to never lock (equivalent to manually changing settings in the "screen lock" menu to "None"), particularly the emulator must be in the unlocked state right after startup.</p>
  
  <p>Snapshots won't do because they must be taken after the change has been done, and reusing snapshots from other AVDs is not desireable because this setup must accommodate new android releases. </p>
  
  <p>In other words, setup of a new AVD must be completely unattended.</p>
  
  <p>I'm wondering if something like this would work, but I haven't been able to figure out how to get into the "Screen lock" sub-menu:</p>
  
  <pre><code>adb shell am start -a android.intent.action.MAIN -n com.android.settings/.SecuritySettings
  </code></pre>
  
  <p>Either way, is there a better way to achieve this?</p>