Replace fix permissions with fix contexts for emulated storage

Fix permissions rarely fixed anything on more recent versions of
Android and usually made things worse. Instead we will replace it
with a more dumbed down option that should fix contexts on
/data/media with a few improvements to ensure that contexts get
fixed for multiple users and on adopted storage.

Change-Id: If5523781936a0b04196e2ad871cae767ebae2583
This commit is contained in:
Ethan Yonker
2016-01-28 14:03:33 -06:00
committed by Dees Troy
parent ebc4cfae31
commit b5fab76bea
16 changed files with 274 additions and 698 deletions
+2 -2
View File
@@ -381,8 +381,8 @@ int OpenRecoveryScript::run_script_file(void) {
}
property_set("ctl.start", "adbd");
gui_msg("done=Done.");
} else if (strcmp(command, "fixperms") == 0 || strcmp(command, "fixpermissions") == 0) {
ret_val = PartitionManager.Fix_Permissions();
} else if (strcmp(command, "fixperms") == 0 || strcmp(command, "fixpermissions") == 0 || strcmp(command, "fixcontexts") == 0) {
ret_val = PartitionManager.Fix_Contexts();
if (ret_val != 0)
ret_val = 1; // failure
} else if (strcmp(command, "decrypt") == 0) {