Encrypted File Systems. Recovery changes for framework.
Modifications to allow for new call to recovery to toggle EFS settings.
diff --git a/services/java/com/android/server/FallbackCheckinService.java b/services/java/com/android/server/FallbackCheckinService.java
index cf22446..32c15e9 100644
--- a/services/java/com/android/server/FallbackCheckinService.java
+++ b/services/java/com/android/server/FallbackCheckinService.java
@@ -66,6 +66,23 @@
}
}
+ public void masterClearAndToggleEFS(boolean efsEnabled) {
+ if (mContext.checkCallingOrSelfPermission("android.permission.MASTER_CLEAR") !=
+ PackageManager.PERMISSION_GRANTED) {
+ Log.e(TAG, "Permission Denial: can't invoke masterClearAndToggleEFS from "
+ + "pid=" + Binder.getCallingPid() + ", "
+ + "uid=" + Binder.getCallingUid());
+ return;
+ }
+
+ // Save the android ID so the new system can get it erased.
+ try {
+ RecoverySystem.rebootAndToggleEFS(efsEnabled);
+ } catch (IOException e) {
+ Log.e(TAG, "Reboot for toggle EFS failed", e);
+ }
+ }
+
public void getParentalControlState(IParentalControlCallback p, String requestingApp)
throws android.os.RemoteException {
ParentalControlState state = new ParentalControlState();