Ensure verifier deps in the vdex file are 4-byte aligned. am: 2ef367acf3 am: 9b733f884a am: f684ebdddc
Original change: https://android-review.googlesource.com/c/platform/art/+/1701125
Change-Id: Iedfe0f97c67633f21ab099d11de11a1e1763eaa6
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index a90881c..fae3418 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -87,6 +87,8 @@
bionic_binaries_both = [
"linker",
+ // To validate the zip file generated by cloud server.
+ "ziptool",
]
// - Debug variants (binaries for which a 32-bit version is preferred on device, but for which
diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp
index 5bae16f..77eed44 100644
--- a/dex2oat/Android.bp
+++ b/dex2oat/Android.bp
@@ -67,6 +67,7 @@
shared_libs: [
"libbase",
"libcrypto", // For SHA-1 checksumming of build ID
+ "liblog",
"liblz4",
"libz",
],
@@ -78,6 +79,7 @@
whole_static_libs: [
"libbase",
"libcrypto",
+ "liblog",
"liblz4",
"libz",
],
@@ -211,6 +213,7 @@
"libbase",
"libcrypto",
"liblz4", // libart(d)-dex2oat dependency; must be repeated here since it's a static lib.
+ "liblog",
"libsigchain",
"libz",
],
@@ -421,6 +424,7 @@
"libartd-disassembler",
"libbase",
"liblz4", // libartd-dex2oat dependency; must be repeated here since it's a static lib.
+ "liblog",
],
static_libs: [
"libartd-dex2oat",
@@ -509,6 +513,7 @@
"libbase",
"libcrypto",
"liblz4", // libartd-dex2oat dependency; must be repeated here since it's a static lib.
+ "liblog",
"libprofiled",
"libsigchain",
"libziparchive",
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 042d671..58221c3 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -24,6 +24,7 @@
#include <fstream>
#include <iostream>
#include <limits>
+#include <log/log.h>
#include <sstream>
#include <string>
#include <type_traits>
@@ -1349,6 +1350,7 @@
} else {
if (input_vdex_file_->HasDexSection()) {
LOG(ERROR) << "The dex metadata is not allowed to contain dex files";
+ android_errorWriteLog(0x534e4554, "178055795"); // Report to SafetyNet.
return false;
}
VLOG(verifier) << "Doing fast verification with vdex from DexMetadata archive";
diff --git a/libartservice/service/java/com/android/server/art/ArtManagerLocal.java b/libartservice/service/java/com/android/server/art/ArtManagerLocal.java
index aac4b25..04629cb 100644
--- a/libartservice/service/java/com/android/server/art/ArtManagerLocal.java
+++ b/libartservice/service/java/com/android/server/art/ArtManagerLocal.java
@@ -16,8 +16,6 @@
package com.android.server.art;
-import libcore.api.CorePlatformApi;
-
/**
* This class provides a system API for functionality provided by the ART
* module.