odrefresh: check artifacts using cache and filesystem metadata
Renables checking of artifacts when invoked with "--check".
Replaces the former "--check" code with a lightweight method based on
artifact cache metadata and filesystem metadata. The worst case checks
take 60ms on aosp_blueline-userdebug.
The old "--check code" is now invoked with "--verify". This remains
for testing purposes and as an option for post-compilation checking.
Bug: 160683548
Bug: 181689036
Test: manual module installs, reboots, deleting artifacts.
Change-Id: I2a75e0fde032a8e3a29d105d8b52e1ede6cb764d
diff --git a/odrefresh/Android.bp b/odrefresh/Android.bp
index 26dfacd..a3fa07c 100644
--- a/odrefresh/Android.bp
+++ b/odrefresh/Android.bp
@@ -32,10 +32,14 @@
],
local_include_dirs: ["include"],
header_libs: ["dexoptanalyzer_headers"],
- generated_sources: ["apex-info-list"],
+ generated_sources: [
+ "apex-info-list",
+ "art-apex-cache-info",
+ ],
shared_libs: [
"libartpalette",
"libbase",
+ "libdexfile",
"liblog",
],
static_libs: ["libxml2"],
@@ -126,3 +130,11 @@
"libbase",
],
}
+
+xsd_config {
+ name: "art-apex-cache-info",
+ srcs: ["CacheInfo.xsd"],
+ package_name: "com.android.art",
+ api_dir: "schema",
+ gen_writer: true,
+}