Android Framework 重启系统代码

private void RebootIntoRecovery() {
        PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
        pm.reboot("recovery");
}
<uses-permission android:name="android.permission.REBOOT" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.settings"
        coreApp="true"
        android:sharedUserId="android.uid.system">