Back to project page android-sms-relay.
The source code is released under:
GNU General Public License
If you think the Android project android-sms-relay listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.nyaruka.androidrelay; /*w w w. j a v a 2s.c o m*/ import android.app.IntentService; import android.content.Intent; public class RebootService extends IntentService { public RebootService() { super(RebootService.class.getName()); } @Override protected void onHandleIntent(Intent intent) { try { Runtime.getRuntime().exec(new String[]{ "su", "-c", "reboot" }); } catch (Exception e) { e.printStackTrace(); } } }