title: How can I sign my application with the system signature key?
body: <p>I need to create a Robotium application that would use Settings application to turn ON/OFF WIFi from menu Settings->Wireless &amp; networks->Wi-Fi. I managed to find some sample code <a href="http://code.google.com/p/robotium/wiki/RobotiumForAPKFiles" rel="noreferrer">here</a> that demonstrates how to launch application by having apk file only. The problem is that my Robotium application should have the same signature with the (system) Settings application. While trying to run application I get the error message: </p>
  
  <blockquote>
    <p>Test run failed: Permission Denial:
    starting instrumentation
    ComponentInfo{com.jayway.test/android.test.InstrumentationTestRunner}
    from pid=354, uid=354 not allowed
    because package com.jayway.test does
    not have a signature matching the
    target com.android.settings</p>
  </blockquote>
  
  <ol>
  <li>Can I somehow make it work with the Android Emulator?</li>
  <li>If I compile an Android phone image, how can I use the Android system signature with my application?</li>
  </ol>