From d6f914ea4bd09f2d60db2783f7a3fd93d3ec0afb Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 15 Feb 2018 13:56:50 +0000 Subject: Full-stack integrity: check vdex contents. For priv-apps, if a vdex on /data has dex code, it must be because the APK has compressed dex code. Fall back to APK if not. For test convenience, update --copy-dex-files to also take a "always" variant. bug: 30972906 Test: 677-fsi Change-Id: I49f0eab46650145316a86de2971a3b9c140bcff7 --- libdexfile/dex/dex_file_loader.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libdexfile/dex/dex_file_loader.cc') diff --git a/libdexfile/dex/dex_file_loader.cc b/libdexfile/dex/dex_file_loader.cc index f0e54eab27..758a2f0599 100644 --- a/libdexfile/dex/dex_file_loader.cc +++ b/libdexfile/dex/dex_file_loader.cc @@ -204,10 +204,12 @@ std::string DexFileLoader::GetDexCanonicalLocation(const char* dex_location) { // All of the implementations here should be independent of the runtime. // TODO: implement all the virtual methods. -bool DexFileLoader::GetMultiDexChecksums(const char* filename ATTRIBUTE_UNUSED, - std::vector* checksums ATTRIBUTE_UNUSED, - std::string* error_msg, - int zip_fd ATTRIBUTE_UNUSED) const { +bool DexFileLoader::GetMultiDexChecksums( + const char* filename ATTRIBUTE_UNUSED, + std::vector* checksums ATTRIBUTE_UNUSED, + std::string* error_msg, + int zip_fd ATTRIBUTE_UNUSED, + bool* zip_file_only_contains_uncompress_dex ATTRIBUTE_UNUSED) const { *error_msg = "UNIMPLEMENTED"; return false; } -- cgit v1.2.3-59-g8ed1b