Loading services/core/java/com/android/server/recoverysystem/RecoverySystemService.java +1 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ public class RecoverySystemService extends IRecoverySystem.Stub implements Reboo if (DEBUG) Slog.d(TAG, "rebootRecoveryWithCommand: [" + command + "]"); synchronized (sRequestLock) { if (!setupOrClearBcb(true, command)) { Slog.e(TAG, "rebootRecoveryWithCommand failed to setup BCB"); return; } Loading services/core/java/com/android/server/recoverysystem/RecoverySystemShellCommand.java +15 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ public class RecoverySystemShellCommand extends ShellCommand { return isLskfCaptured(); case "reboot-and-apply": return rebootAndApply(); case "wipe": return wipe(); default: return handleDefaultCommands(cmd); } Loading @@ -58,6 +60,18 @@ public class RecoverySystemShellCommand extends ShellCommand { } } private int wipe() throws RemoteException { PrintWriter pw = getOutPrintWriter(); String newFsType = getNextArg(); String command = "--wipe_data"; if (newFsType != null && !newFsType.isEmpty()) { command += "\n--reformat_data=" + newFsType; } pw.println("Rebooting into recovery with " + command.replaceAll("\n", " ")); mService.rebootRecoveryWithCommand(command); return 0; } private int requestLskf() throws RemoteException { String packageName = getNextArgRequired(); boolean success = mService.requestLskf(packageName, null); Loading Loading @@ -104,5 +118,6 @@ public class RecoverySystemShellCommand extends ShellCommand { pw.println(" clear-lskf"); pw.println(" is-lskf-captured <package_name>"); pw.println(" reboot-and-apply <package_name> <reason>"); pw.println(" wipe <new filesystem type ext4/f2fs>"); } } Loading
services/core/java/com/android/server/recoverysystem/RecoverySystemService.java +1 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ public class RecoverySystemService extends IRecoverySystem.Stub implements Reboo if (DEBUG) Slog.d(TAG, "rebootRecoveryWithCommand: [" + command + "]"); synchronized (sRequestLock) { if (!setupOrClearBcb(true, command)) { Slog.e(TAG, "rebootRecoveryWithCommand failed to setup BCB"); return; } Loading
services/core/java/com/android/server/recoverysystem/RecoverySystemShellCommand.java +15 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ public class RecoverySystemShellCommand extends ShellCommand { return isLskfCaptured(); case "reboot-and-apply": return rebootAndApply(); case "wipe": return wipe(); default: return handleDefaultCommands(cmd); } Loading @@ -58,6 +60,18 @@ public class RecoverySystemShellCommand extends ShellCommand { } } private int wipe() throws RemoteException { PrintWriter pw = getOutPrintWriter(); String newFsType = getNextArg(); String command = "--wipe_data"; if (newFsType != null && !newFsType.isEmpty()) { command += "\n--reformat_data=" + newFsType; } pw.println("Rebooting into recovery with " + command.replaceAll("\n", " ")); mService.rebootRecoveryWithCommand(command); return 0; } private int requestLskf() throws RemoteException { String packageName = getNextArgRequired(); boolean success = mService.requestLskf(packageName, null); Loading Loading @@ -104,5 +118,6 @@ public class RecoverySystemShellCommand extends ShellCommand { pw.println(" clear-lskf"); pw.println(" is-lskf-captured <package_name>"); pw.println(" reboot-and-apply <package_name> <reason>"); pw.println(" wipe <new filesystem type ext4/f2fs>"); } }