AndroidRuntime: pass odsign verification status to ART

ART will refuse to load on-device generated artifacts if odsign
verification status suggests files have been tampered with.

Bug: 180949581
Test: manual
Change-Id: I772b5b7b191310bf7c7797161a304a1ab6f53c5e
This commit is contained in:
Orion Hodson
2021-07-01 12:14:47 +01:00
parent 8bae06f66d
commit a8b24392a1

View File

@@ -743,6 +743,11 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
//addOption("-verbose:jni");
}
const bool odsignVerificationSuccess = GetBoolProperty("odsign.verification.success", false);
if (!odsignVerificationSuccess) {
addOption("-Xdeny-art-apex-data-files");
}
property_get("dalvik.vm.execution-mode", propBuf, "");
if (strcmp(propBuf, "int:portable") == 0) {
executionMode = kEMIntPortable;