summaryrefslogtreecommitdiffstats
path: root/otautil
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-06-19 21:43:43 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-06-19 21:43:43 +0200
commit9fb0d8958323c1da6a73b5a42f89a6766a40bfa1 (patch)
treefc2eb8fc1ee87c50e6b2b454e1726b2b52f3e44d /otautil
parentMerge "updater_sample: run as a systemp app" (diff)
parentDrop the dependency on AB_OTA_UPDATER flag. (diff)
downloadandroid_bootable_recovery-9fb0d8958323c1da6a73b5a42f89a6766a40bfa1.tar
android_bootable_recovery-9fb0d8958323c1da6a73b5a42f89a6766a40bfa1.tar.gz
android_bootable_recovery-9fb0d8958323c1da6a73b5a42f89a6766a40bfa1.tar.bz2
android_bootable_recovery-9fb0d8958323c1da6a73b5a42f89a6766a40bfa1.tar.lz
android_bootable_recovery-9fb0d8958323c1da6a73b5a42f89a6766a40bfa1.tar.xz
android_bootable_recovery-9fb0d8958323c1da6a73b5a42f89a6766a40bfa1.tar.zst
android_bootable_recovery-9fb0d8958323c1da6a73b5a42f89a6766a40bfa1.zip
Diffstat (limited to 'otautil')
-rw-r--r--otautil/include/otautil/paths.h10
-rw-r--r--otautil/paths.cpp4
2 files changed, 13 insertions, 1 deletions
diff --git a/otautil/include/otautil/paths.h b/otautil/include/otautil/paths.h
index 39088f100..f95741a24 100644
--- a/otautil/include/otautil/paths.h
+++ b/otautil/include/otautil/paths.h
@@ -76,6 +76,13 @@ class Paths {
temporary_log_file_ = log_file;
}
+ std::string temporary_update_binary() const {
+ return temporary_update_binary_;
+ }
+ void set_temporary_update_binary(const std::string& update_binary) {
+ temporary_update_binary_ = update_binary;
+ }
+
private:
Paths();
DISALLOW_COPY_AND_ASSIGN(Paths);
@@ -103,6 +110,9 @@ class Paths {
// Path to the temporary log file while under recovery.
std::string temporary_log_file_;
+
+ // Path to the temporary update binary while installing a non-A/B package.
+ std::string temporary_update_binary_;
};
#endif // _OTAUTIL_PATHS_H_
diff --git a/otautil/paths.cpp b/otautil/paths.cpp
index f08e51c7a..33ab4a5d4 100644
--- a/otautil/paths.cpp
+++ b/otautil/paths.cpp
@@ -23,6 +23,7 @@ constexpr const char kDefaultResourceDirectory[] = "/res/images";
constexpr const char kDefaultStashDirectoryBase[] = "/cache/recovery";
constexpr const char kDefaultTemporaryInstallFile[] = "/tmp/last_install";
constexpr const char kDefaultTemporaryLogFile[] = "/tmp/recovery.log";
+constexpr const char kDefaultTemporaryUpdateBinary[] = "/tmp/update-binary";
Paths& Paths::Get() {
static Paths paths;
@@ -36,4 +37,5 @@ Paths::Paths()
resource_dir_(kDefaultResourceDirectory),
stash_directory_base_(kDefaultStashDirectoryBase),
temporary_install_file_(kDefaultTemporaryInstallFile),
- temporary_log_file_(kDefaultTemporaryLogFile) {}
+ temporary_log_file_(kDefaultTemporaryLogFile),
+ temporary_update_binary_(kDefaultTemporaryUpdateBinary) {}