Loading adb_install.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -175,11 +175,14 @@ void stop_sideload() { } int wait_sideload() { set_perf_mode(true); pthread_join(sideload_thread, nullptr); ui->FlushKeys(); maybe_restart_adbd(); set_perf_mode(false); return sideload_data.result; } install.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ #include <vintf/VintfObjectRecovery.h> #include <ziparchive/zip_archive.h> #include <cutils/properties.h> #include "common.h" #include "error_code.h" #include "otautil/SysUtil.h" Loading Loading @@ -601,8 +603,10 @@ static int really_install_package(std::string path, bool* wipe_cache, bool needs } // Verify package. set_perf_mode(true); if (!verify_package(map.addr, map.length)) { log_buffer->push_back(android::base::StringPrintf("error: %d", kZipVerificationFailure)); set_perf_mode(false); return INSTALL_CORRUPT; } Loading @@ -614,6 +618,7 @@ static int really_install_package(std::string path, bool* wipe_cache, bool needs log_buffer->push_back(android::base::StringPrintf("error: %d", kZipOpenFailure)); CloseArchive(zip); set_perf_mode(false); return INSTALL_CORRUPT; } Loading @@ -635,6 +640,7 @@ static int really_install_package(std::string path, bool* wipe_cache, bool needs ui->Print("\n"); CloseArchive(zip); set_perf_mode(false); return result; } Loading Loading @@ -748,3 +754,8 @@ bool verify_package(const unsigned char* package_data, size_t package_size) { } return true; } void set_perf_mode(bool enable) { property_set("recovery.perf.mode", enable ? "1" : "0"); } install.h +2 −0 Original line number Diff line number Diff line Loading @@ -40,4 +40,6 @@ bool read_metadata_from_package(ZipArchiveHandle zip, std::string* metadata); // entry doesn't exist. bool verify_package_compatibility(ZipArchiveHandle package_zip); void set_perf_mode(bool enable); #endif // RECOVERY_INSTALL_H_ Loading
adb_install.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -175,11 +175,14 @@ void stop_sideload() { } int wait_sideload() { set_perf_mode(true); pthread_join(sideload_thread, nullptr); ui->FlushKeys(); maybe_restart_adbd(); set_perf_mode(false); return sideload_data.result; }
install.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ #include <vintf/VintfObjectRecovery.h> #include <ziparchive/zip_archive.h> #include <cutils/properties.h> #include "common.h" #include "error_code.h" #include "otautil/SysUtil.h" Loading Loading @@ -601,8 +603,10 @@ static int really_install_package(std::string path, bool* wipe_cache, bool needs } // Verify package. set_perf_mode(true); if (!verify_package(map.addr, map.length)) { log_buffer->push_back(android::base::StringPrintf("error: %d", kZipVerificationFailure)); set_perf_mode(false); return INSTALL_CORRUPT; } Loading @@ -614,6 +618,7 @@ static int really_install_package(std::string path, bool* wipe_cache, bool needs log_buffer->push_back(android::base::StringPrintf("error: %d", kZipOpenFailure)); CloseArchive(zip); set_perf_mode(false); return INSTALL_CORRUPT; } Loading @@ -635,6 +640,7 @@ static int really_install_package(std::string path, bool* wipe_cache, bool needs ui->Print("\n"); CloseArchive(zip); set_perf_mode(false); return result; } Loading Loading @@ -748,3 +754,8 @@ bool verify_package(const unsigned char* package_data, size_t package_size) { } return true; } void set_perf_mode(bool enable) { property_set("recovery.perf.mode", enable ? "1" : "0"); }
install.h +2 −0 Original line number Diff line number Diff line Loading @@ -40,4 +40,6 @@ bool read_metadata_from_package(ZipArchiveHandle zip, std::string* metadata); // entry doesn't exist. bool verify_package_compatibility(ZipArchiveHandle package_zip); void set_perf_mode(bool enable); #endif // RECOVERY_INSTALL_H_