diff options
author | Tianjie Xu <xunchang@google.com> | 2016-09-09 19:55:44 +0200 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2016-09-13 00:55:36 +0200 |
commit | fe16b5ccaf80f6e04d5b722c37c1abd70457ad28 (patch) | |
tree | c384a11d41d2ce932a2dba8b791e72dcabdb7111 /install.cpp | |
parent | Merge "Switch recovery to libbase logging" (diff) | |
download | android_bootable_recovery-fe16b5ccaf80f6e04d5b722c37c1abd70457ad28.tar android_bootable_recovery-fe16b5ccaf80f6e04d5b722c37c1abd70457ad28.tar.gz android_bootable_recovery-fe16b5ccaf80f6e04d5b722c37c1abd70457ad28.tar.bz2 android_bootable_recovery-fe16b5ccaf80f6e04d5b722c37c1abd70457ad28.tar.lz android_bootable_recovery-fe16b5ccaf80f6e04d5b722c37c1abd70457ad28.tar.xz android_bootable_recovery-fe16b5ccaf80f6e04d5b722c37c1abd70457ad28.tar.zst android_bootable_recovery-fe16b5ccaf80f6e04d5b722c37c1abd70457ad28.zip |
Diffstat (limited to 'install.cpp')
-rw-r--r-- | install.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/install.cpp b/install.cpp index 92a62db5f..fac6151b3 100644 --- a/install.cpp +++ b/install.cpp @@ -27,10 +27,11 @@ #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> -#include <android-base/logging.h> #include "common.h" #include "error_code.h" @@ -47,6 +48,7 @@ extern RecoveryUI* ui; #define ASSUMED_UPDATE_BINARY_NAME "META-INF/com/google/android/update-binary" #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; @@ -384,6 +386,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; |