Support Android 11 SELinux paths

This is NOT proper Android 11 support
This commit is contained in:
topjohnwu
2020-02-21 00:49:33 -08:00
parent 3b8ea599f0
commit 0d229dac3b
2 changed files with 9 additions and 0 deletions

View File

@@ -83,6 +83,14 @@ static bool check_precompiled(const char *precompiled) {
return false;
}
actual_sha = SYSEXT_POLICY_DIR "system_ext_sepolicy_and_mapping.sha256";
if (access(actual_sha, R_OK) == 0) {
ok = true;
sprintf(compiled_sha, "%s.system_ext_sepolicy_and_mapping.sha256", precompiled);
if (!cmp_sha256(actual_sha, compiled_sha) != 0)
return false;
}
return ok;
}