summaryrefslogtreecommitdiffstats
path: root/install.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-09-09 19:55:44 +0200
committerTianjie Xu <xunchang@google.com>2016-09-13 01:59:48 +0200
commite16e799dfdff5392d2bdc460f41353100d082e96 (patch)
tree8b331f896cbfeb0aede2ea3234eed989c63e310c /install.cpp
parent"view recovery logs" will show /tmp/recovery.log (diff)
downloadandroid_bootable_recovery-e16e799dfdff5392d2bdc460f41353100d082e96.tar
android_bootable_recovery-e16e799dfdff5392d2bdc460f41353100d082e96.tar.gz
android_bootable_recovery-e16e799dfdff5392d2bdc460f41353100d082e96.tar.bz2
android_bootable_recovery-e16e799dfdff5392d2bdc460f41353100d082e96.tar.lz
android_bootable_recovery-e16e799dfdff5392d2bdc460f41353100d082e96.tar.xz
android_bootable_recovery-e16e799dfdff5392d2bdc460f41353100d082e96.tar.zst
android_bootable_recovery-e16e799dfdff5392d2bdc460f41353100d082e96.zip
Diffstat (limited to 'install.cpp')
-rw-r--r--install.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/install.cpp b/install.cpp
index 02c845cb8..9227d5895 100644
--- a/install.cpp
+++ b/install.cpp
@@ -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>
@@ -54,6 +56,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;
@@ -539,6 +542,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;