How to shutdown and reboot the emulator through code in android?
<p>I have implemented the code like:</p>

<pre><code>Intent i = new Intent(Intent.ACTION_REBOOT);
sendBroadcast(i);
</code></pre>

<p>it get the error(runtime):</p>

<pre><code>java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.REBOOT from pid=*** and uid=***
</code></pre>
