Add fix permissions to OpenRecoveryScript
Change-Id: I2419cba26fcf046833b5a02fd1b95d6d6e542b8a
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index bede6d7..4479ec9 100644
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -349,6 +349,10 @@
sideload = 1; // Causes device to go to the home screen afterwards
gui_print("Sideload finished.\n");
}
+ } else if (strcmp(command, "fixperms") == 0 || strcmp(command, "fixpermissions") == 0) {
+ ret_val = PartitionManager.Fix_Permissions();
+ if (ret_val != 0)
+ ret_val = 1; // failure
} else {
LOGERR("Unrecognized script command: '%s'\n", command);
ret_val = 1;