save uncrypt status to last_install am: e16e799dfd
am: 4769f209dc
Change-Id: Ic9056d4af518df3747743ec6b2886fa437029395
This commit is contained in:
+13
@@ -30,6 +30,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/logging.h>
|
||||
#include <android-base/parseint.h>
|
||||
#include <android-base/stringprintf.h>
|
||||
#include <android-base/strings.h>
|
||||
@@ -53,6 +55,7 @@ static constexpr const char* AB_OTA_PAYLOAD_PROPERTIES = "payload_properties.txt
|
||||
static constexpr const char* AB_OTA_PAYLOAD = "payload.bin";
|
||||
#define PUBLIC_KEYS_FILE "/res/keys"
|
||||
static constexpr const char* METADATA_PATH = "META-INF/com/android/metadata";
|
||||
static constexpr const char* UNCRYPT_STATUS = "/cache/recovery/uncrypt_status";
|
||||
|
||||
// Default allocation of progress bar segments to operations
|
||||
static const int VERIFICATION_PROGRESS_TIME = 60;
|
||||
@@ -534,6 +537,16 @@ install_package(const char* path, bool* wipe_cache, const char* install_file,
|
||||
fprintf(install_log, "%s\n", s.c_str());
|
||||
}
|
||||
|
||||
if (ensure_path_mounted(UNCRYPT_STATUS) != 0) {
|
||||
LOG(WARNING) << "Can't mount " << UNCRYPT_STATUS;
|
||||
} else {
|
||||
std::string uncrypt_status;
|
||||
if (!android::base::ReadFileToString(UNCRYPT_STATUS, &uncrypt_status)) {
|
||||
PLOG(WARNING) << "failed to read uncrypt status";
|
||||
} else {
|
||||
fprintf(install_log, "%s\n", android::base::Trim(uncrypt_status).c_str());
|
||||
}
|
||||
}
|
||||
fclose(install_log);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user