From b52803f85513ebcb8fbdb3f08bd60a4c0d9bc215 Mon Sep 17 00:00:00 2001 From: jhenrique09 Date: Sun, 10 Oct 2021 15:33:05 -0300 Subject: [PATCH] recovery: Disable downgrade and signature checks Change-Id: I734fad12a54a232a00240ba105a79828135896a9 --- install/install.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/install.cpp b/install/install.cpp index ffb9d9b9..5c3c5328 100644 --- a/install/install.cpp +++ b/install/install.cpp @@ -167,7 +167,7 @@ static bool CheckAbSpecificMetadata(const std::map& me } // Check for downgrade version. - int64_t build_timestamp = + /*int64_t build_timestamp = android::base::GetIntProperty("ro.build.date.utc", std::numeric_limits::max()); int64_t pkg_post_timestamp = 0; // We allow to full update to the same version we are running, in case there @@ -201,7 +201,7 @@ static bool CheckAbSpecificMetadata(const std::map& me } return true; -} +}*/ bool CheckPackageMetadata(const std::map& metadata, OtaType ota_type) { auto package_ota_type = get_value(metadata, "ota-type"); @@ -607,10 +607,10 @@ static InstallResult VerifyAndInstallPackage(Package* package, bool* wipe_cache, ui->ShowProgress(VERIFICATION_PROGRESS_FRACTION, VERIFICATION_PROGRESS_TIME); // Verify package. - if (!verify_package(package, ui)) { + /*if (!verify_package(package, ui)) { log_buffer->push_back(android::base::StringPrintf("error: %d", kZipVerificationFailure)); return INSTALL_CORRUPT; - } + }*/ // Verify and install the contents of the package. ui->Print("Installing update...\n");