diff --git a/adb_install.cpp b/adb_install.cpp
index ac01306..4ee5333 100644
--- a/adb_install.cpp
+++ b/adb_install.cpp
@@ -70,7 +70,7 @@
   }
 }
 
-int apply_from_adb(bool* wipe_cache, const char* install_file) {
+int apply_from_adb(bool* wipe_cache) {
   modified_flash = true;
 
   stop_adbd();
@@ -113,7 +113,7 @@
         break;
       }
     }
-    result = install_package(FUSE_SIDELOAD_HOST_PATHNAME, wipe_cache, install_file, false, 0);
+    result = install_package(FUSE_SIDELOAD_HOST_PATHNAME, wipe_cache, false, 0);
     break;
   }
 
diff --git a/adb_install.h b/adb_install.h
index e654c89..cc3ca26 100644
--- a/adb_install.h
+++ b/adb_install.h
@@ -17,6 +17,6 @@
 #ifndef _ADB_INSTALL_H
 #define _ADB_INSTALL_H
 
-int apply_from_adb(bool* wipe_cache, const char* install_file);
+int apply_from_adb(bool* wipe_cache);
 
 #endif
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index db7530b..39b8030 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -40,7 +40,7 @@
 
 #include "edify/expr.h"
 #include "otafault/ota_io.h"
-#include "otautil/cache_location.h"
+#include "otautil/paths.h"
 #include "otautil/print_sha1.h"
 
 static int LoadPartitionContents(const std::string& filename, FileContents* file);
@@ -403,7 +403,7 @@
     // If the source file is missing or corrupted, it might be because we were killed in the middle
     // of patching it.  A copy of it should have been made in cache_temp_source.  If that file
     // exists and matches the sha1 we're looking for, the check still passes.
-    if (LoadFileContents(CacheLocation::location().cache_temp_source().c_str(), &file) != 0) {
+    if (LoadFileContents(Paths::Get().cache_temp_source().c_str(), &file) != 0) {
       printf("failed to load cache file\n");
       return 1;
     }
@@ -525,7 +525,7 @@
   printf("source file is bad; trying copy\n");
 
   FileContents copy_file;
-  if (LoadFileContents(CacheLocation::location().cache_temp_source().c_str(), &copy_file) < 0) {
+  if (LoadFileContents(Paths::Get().cache_temp_source().c_str(), &copy_file) < 0) {
     printf("failed to read copy file\n");
     return 1;
   }
@@ -620,7 +620,7 @@
     printf("not enough free space on /cache\n");
     return 1;
   }
-  if (SaveFileContents(CacheLocation::location().cache_temp_source().c_str(), &source_file) < 0) {
+  if (SaveFileContents(Paths::Get().cache_temp_source().c_str(), &source_file) < 0) {
     printf("failed to back up source file\n");
     return 1;
   }
@@ -685,7 +685,7 @@
   }
 
   // Delete the backup copy of the source.
-  unlink(CacheLocation::location().cache_temp_source().c_str());
+  unlink(Paths::Get().cache_temp_source().c_str());
 
   // Success!
   return 0;
diff --git a/applypatch/freecache.cpp b/applypatch/freecache.cpp
index cfab0f6..dbd4b72 100644
--- a/applypatch/freecache.cpp
+++ b/applypatch/freecache.cpp
@@ -38,7 +38,7 @@
 #include <android-base/strings.h>
 
 #include "applypatch/applypatch.h"
-#include "otautil/cache_location.h"
+#include "otautil/paths.h"
 
 static int EliminateOpenFiles(const std::string& dirname, std::set<std::string>* files) {
   std::unique_ptr<DIR, decltype(&closedir)> d(opendir("/proc"), closedir);
@@ -95,7 +95,7 @@
 
     // We can't delete cache_temp_source; if it's there we might have restarted during
     // installation and could be depending on it to be there.
-    if (path == CacheLocation::location().cache_temp_source()) {
+    if (path == Paths::Get().cache_temp_source()) {
       continue;
     }
 
@@ -142,7 +142,7 @@
   return 0;
 #endif
 
-  std::vector<std::string> dirs = { "/cache", CacheLocation::location().cache_log_directory() };
+  std::vector<std::string> dirs = { "/cache", Paths::Get().cache_log_directory() };
   for (const auto& dirname : dirs) {
     if (RemoveFilesInDirectory(bytes_needed, dirname, FreeSpaceForFile)) {
       return 0;
@@ -172,7 +172,7 @@
   }
 
   std::vector<std::string> files;
-  if (dirname == CacheLocation::location().cache_log_directory()) {
+  if (dirname == Paths::Get().cache_log_directory()) {
     // Deletes the log files only.
     auto log_filter = [](const std::string& file_name) {
       return android::base::StartsWith(file_name, "last_log") ||
diff --git a/applypatch/imgpatch.cpp b/applypatch/imgpatch.cpp
index 9794a48..b06a64f 100644
--- a/applypatch/imgpatch.cpp
+++ b/applypatch/imgpatch.cpp
@@ -38,6 +38,7 @@
 #include <zlib.h>
 
 #include "edify/expr.h"
+#include "otautil/print_sha1.h"
 
 static inline int64_t Read8(const void *address) {
   return android::base::get_unaligned<int64_t>(address);
@@ -76,8 +77,10 @@
   size_t actual_target_length = 0;
   size_t total_written = 0;
   static constexpr size_t buffer_size = 32768;
+  SHA_CTX sha_ctx;
+  SHA1_Init(&sha_ctx);
   auto compression_sink = [&strm, &actual_target_length, &expected_target_length, &total_written,
-                           &ret, &sink](const uint8_t* data, size_t len) -> size_t {
+                           &ret, &sink, &sha_ctx](const uint8_t* data, size_t len) -> size_t {
     // The input patch length for an update never exceeds INT_MAX.
     strm.avail_in = len;
     strm.next_in = data;
@@ -98,6 +101,20 @@
 
       size_t have = buffer_size - strm.avail_out;
       total_written += have;
+
+      // TODO(b/67849209) Remove after debugging the unit test flakiness.
+      if (android::base::GetMinimumLogSeverity() <= android::base::LogSeverity::DEBUG &&
+          have != 0) {
+        SHA1_Update(&sha_ctx, data, len - strm.avail_in);
+        SHA_CTX temp_ctx;
+        memcpy(&temp_ctx, &sha_ctx, sizeof(SHA_CTX));
+        uint8_t digest_so_far[SHA_DIGEST_LENGTH];
+        SHA1_Final(digest_so_far, &temp_ctx);
+        LOG(DEBUG) << "Processed " << actual_target_length + len - strm.avail_in
+                   << " bytes input data in the sink function, sha1 so far: "
+                   << short_sha1(digest_so_far);
+      }
+
       if (sink(buffer.data(), have) != have) {
         LOG(ERROR) << "Failed to write " << have << " compressed bytes to output.";
         return 0;
@@ -111,6 +128,11 @@
   int bspatch_result = ApplyBSDiffPatch(src_data, src_len, patch, patch_offset, compression_sink);
   deflateEnd(&strm);
 
+  if (android::base::GetMinimumLogSeverity() <= android::base::LogSeverity::DEBUG) {
+    uint8_t digest[SHA_DIGEST_LENGTH];
+    SHA1_Final(digest, &sha_ctx);
+    LOG(DEBUG) << "sha1 of " << actual_target_length << " bytes input data: " << short_sha1(digest);
+  }
   if (bspatch_result != 0) {
     return false;
   }
diff --git a/common.h b/common.h
index 8b336f8..a851306 100644
--- a/common.h
+++ b/common.h
@@ -17,8 +17,8 @@
 #ifndef RECOVERY_COMMON_H
 #define RECOVERY_COMMON_H
 
-#include <stdio.h>
 #include <stdarg.h>
+#include <stdio.h>
 
 #include <string>
 
@@ -38,7 +38,7 @@
 extern const char* reason;
 
 // fopen a file, mounting volumes and making parent dirs as necessary.
-FILE* fopen_path(const char *path, const char *mode);
+FILE* fopen_path(const std::string& path, const char* mode);
 
 void ui_print(const char* format, ...);
 
diff --git a/install.cpp b/install.cpp
index d058931..30fd2c6 100644
--- a/install.cpp
+++ b/install.cpp
@@ -52,6 +52,7 @@
 #include "otautil/SysUtil.h"
 #include "otautil/ThermalUtil.h"
 #include "otautil/error_code.h"
+#include "otautil/paths.h"
 #include "private/install.h"
 #include "roots.h"
 #include "ui.h"
@@ -627,10 +628,8 @@
   return result;
 }
 
-int install_package(const std::string& path, bool* wipe_cache, const std::string& install_file,
-                    bool needs_mount, int retry_count) {
+int install_package(const std::string& path, bool* wipe_cache, bool needs_mount, int retry_count) {
   CHECK(!path.empty());
-  CHECK(!install_file.empty());
   CHECK(wipe_cache != nullptr);
 
   modified_flash = true;
@@ -693,6 +692,7 @@
 
   std::string log_content =
       android::base::Join(log_header, "\n") + "\n" + android::base::Join(log_buffer, "\n") + "\n";
+  const std::string& install_file = Paths::Get().temporary_install_file();
   if (!android::base::WriteStringToFile(log_content, install_file)) {
     PLOG(ERROR) << "failed to write " << install_file;
   }
diff --git a/install.h b/install.h
index f3fda30..0f6670a 100644
--- a/install.h
+++ b/install.h
@@ -17,7 +17,10 @@
 #ifndef RECOVERY_INSTALL_H_
 #define RECOVERY_INSTALL_H_
 
+#include <stddef.h>
+
 #include <string>
+
 #include <ziparchive/zip_archive.h>
 
 enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT, INSTALL_NONE, INSTALL_SKIPPED,
@@ -25,8 +28,8 @@
 
 // Installs the given update package. If INSTALL_SUCCESS is returned and *wipe_cache is true on
 // exit, caller should wipe the cache partition.
-int install_package(const std::string& package, bool* wipe_cache, const std::string& install_file,
-                    bool needs_mount, int retry_count);
+int install_package(const std::string& package, bool* wipe_cache, bool needs_mount,
+                    int retry_count);
 
 // Verify the package by ota keys. Return true if the package is verified successfully,
 // otherwise return false.
diff --git a/otautil/Android.bp b/otautil/Android.bp
index 75cf691..958f98b 100644
--- a/otautil/Android.bp
+++ b/otautil/Android.bp
@@ -21,7 +21,7 @@
         "SysUtil.cpp",
         "DirUtil.cpp",
         "ThermalUtil.cpp",
-        "cache_location.cpp",
+        "paths.cpp",
         "rangeset.cpp",
     ],
 
diff --git a/otautil/include/otautil/cache_location.h b/otautil/include/otautil/cache_location.h
deleted file mode 100644
index 005395e..0000000
--- a/otautil/include/otautil/cache_location.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _OTAUTIL_OTAUTIL_CACHE_LOCATION_H_
-#define _OTAUTIL_OTAUTIL_CACHE_LOCATION_H_
-
-#include <string>
-
-#include "android-base/macros.h"
-
-// A singleton class to maintain the update related locations. The locations should be only set
-// once at the start of the program.
-class CacheLocation {
- public:
-  static CacheLocation& location();
-
-  // getter and setter functions.
-  std::string cache_temp_source() const {
-    return cache_temp_source_;
-  }
-  void set_cache_temp_source(const std::string& temp_source) {
-    cache_temp_source_ = temp_source;
-  }
-
-  std::string last_command_file() const {
-    return last_command_file_;
-  }
-  void set_last_command_file(const std::string& last_command) {
-    last_command_file_ = last_command;
-  }
-
-  std::string stash_directory_base() const {
-    return stash_directory_base_;
-  }
-  void set_stash_directory_base(const std::string& base) {
-    stash_directory_base_ = base;
-  }
-
-  std::string cache_log_directory() const {
-    return cache_log_directory_;
-  }
-  void set_cache_log_directory(const std::string& log_dir) {
-    cache_log_directory_ = log_dir;
-  }
-
- private:
-  CacheLocation();
-  DISALLOW_COPY_AND_ASSIGN(CacheLocation);
-
-  // When there isn't enough room on the target filesystem to hold the patched version of the file,
-  // we copy the original here and delete it to free up space.  If the expected source file doesn't
-  // exist, or is corrupted, we look to see if the cached file contains the bits we want and use it
-  // as the source instead.  The default location for the cached source is "/cache/saved.file".
-  std::string cache_temp_source_;
-
-  // Location to save the last command that stashes blocks.
-  std::string last_command_file_;
-
-  // The base directory to write stashes during update.
-  std::string stash_directory_base_;
-
-  // The location of last_log & last_kmsg.
-  std::string cache_log_directory_;
-};
-
-#endif  // _OTAUTIL_OTAUTIL_CACHE_LOCATION_H_
diff --git a/otautil/include/otautil/paths.h b/otautil/include/otautil/paths.h
new file mode 100644
index 0000000..788c3de
--- /dev/null
+++ b/otautil/include/otautil/paths.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _OTAUTIL_PATHS_H_
+#define _OTAUTIL_PATHS_H_
+
+#include <string>
+
+#include <android-base/macros.h>
+
+// A singleton class to maintain the update related paths. The paths should be only set once at the
+// start of the program.
+class Paths {
+ public:
+  static Paths& Get();
+
+  std::string cache_log_directory() const {
+    return cache_log_directory_;
+  }
+  void set_cache_log_directory(const std::string& log_dir) {
+    cache_log_directory_ = log_dir;
+  }
+
+  std::string cache_temp_source() const {
+    return cache_temp_source_;
+  }
+  void set_cache_temp_source(const std::string& temp_source) {
+    cache_temp_source_ = temp_source;
+  }
+
+  std::string last_command_file() const {
+    return last_command_file_;
+  }
+  void set_last_command_file(const std::string& last_command_file) {
+    last_command_file_ = last_command_file;
+  }
+
+  std::string stash_directory_base() const {
+    return stash_directory_base_;
+  }
+  void set_stash_directory_base(const std::string& base) {
+    stash_directory_base_ = base;
+  }
+
+  std::string temporary_install_file() const {
+    return temporary_install_file_;
+  }
+  void set_temporary_install_file(const std::string& install_file) {
+    temporary_install_file_ = install_file;
+  }
+
+  std::string temporary_log_file() const {
+    return temporary_log_file_;
+  }
+  void set_temporary_log_file(const std::string& log_file) {
+    temporary_log_file_ = log_file;
+  }
+
+ private:
+  Paths();
+  DISALLOW_COPY_AND_ASSIGN(Paths);
+
+  // Path to the directory that contains last_log and last_kmsg log files.
+  std::string cache_log_directory_;
+
+  // Path to the temporary source file on /cache. When there isn't enough room on the target
+  // filesystem to hold the patched version of the file, we copy the original here and delete it to
+  // free up space. If the expected source file doesn't exist, or is corrupted, we look to see if
+  // the cached file contains the bits we want and use it as the source instead.
+  std::string cache_temp_source_;
+
+  // Path to the last command file.
+  std::string last_command_file_;
+
+  // Path to the base directory to write stashes during update.
+  std::string stash_directory_base_;
+
+  // Path to the temporary file that contains the install result.
+  std::string temporary_install_file_;
+
+  // Path to the temporary log file while under recovery.
+  std::string temporary_log_file_;
+};
+
+#endif  // _OTAUTIL_PATHS_H_
diff --git a/otautil/cache_location.cpp b/otautil/paths.cpp
similarity index 68%
rename from otautil/cache_location.cpp
rename to otautil/paths.cpp
index 6139bf1..ad9ec11 100644
--- a/otautil/cache_location.cpp
+++ b/otautil/paths.cpp
@@ -14,20 +14,24 @@
  * limitations under the License.
  */
 
-#include "otautil/cache_location.h"
+#include "otautil/paths.h"
 
+constexpr const char kDefaultCacheLogDirectory[] = "/cache/recovery";
 constexpr const char kDefaultCacheTempSource[] = "/cache/saved.file";
 constexpr const char kDefaultLastCommandFile[] = "/cache/recovery/last_command";
 constexpr const char kDefaultStashDirectoryBase[] = "/cache/recovery";
-constexpr const char kDefaultCacheLogDirectory[] = "/cache/recovery";
+constexpr const char kDefaultTemporaryInstallFile[] = "/tmp/last_install";
+constexpr const char kDefaultTemporaryLogFile[] = "/tmp/recovery.log";
 
-CacheLocation& CacheLocation::location() {
-  static CacheLocation cache_location;
-  return cache_location;
+Paths& Paths::Get() {
+  static Paths paths;
+  return paths;
 }
 
-CacheLocation::CacheLocation()
-    : cache_temp_source_(kDefaultCacheTempSource),
+Paths::Paths()
+    : cache_log_directory_(kDefaultCacheLogDirectory),
+      cache_temp_source_(kDefaultCacheTempSource),
       last_command_file_(kDefaultLastCommandFile),
       stash_directory_base_(kDefaultStashDirectoryBase),
-      cache_log_directory_(kDefaultCacheLogDirectory) {}
+      temporary_install_file_(kDefaultTemporaryInstallFile),
+      temporary_log_file_(kDefaultTemporaryLogFile) {}
diff --git a/recovery.cpp b/recovery.cpp
index ceb1941..dbbac7a 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -68,6 +68,7 @@
 #include "minui/minui.h"
 #include "otautil/DirUtil.h"
 #include "otautil/error_code.h"
+#include "otautil/paths.h"
 #include "roots.h"
 #include "rotate_logs.h"
 #include "screen_ui.h"
@@ -110,8 +111,6 @@
 static const char *DATA_ROOT = "/data";
 static const char* METADATA_ROOT = "/metadata";
 static const char *SDCARD_ROOT = "/sdcard";
-static const char *TEMPORARY_LOG_FILE = "/tmp/recovery.log";
-static const char *TEMPORARY_INSTALL_FILE = "/tmp/last_install";
 static const char *LAST_KMSG_FILE = "/cache/recovery/last_kmsg";
 static const char *LAST_LOG_FILE = "/cache/recovery/last_log";
 // We will try to apply the update package 5 times at most in case of an I/O error or
@@ -185,8 +184,8 @@
  */
 
 // Open a given path, mounting partitions as necessary.
-FILE* fopen_path(const char* path, const char* mode) {
-  if (ensure_path_mounted(path) != 0) {
+FILE* fopen_path(const std::string& path, const char* mode) {
+  if (ensure_path_mounted(path.c_str()) != 0) {
     LOG(ERROR) << "Can't mount " << path;
     return nullptr;
   }
@@ -196,19 +195,19 @@
   if (strchr("wa", mode[0])) {
     mkdir_recursively(path, 0777, true, sehandle);
   }
-  return fopen(path, mode);
+  return fopen(path.c_str(), mode);
 }
 
 // close a file, log an error if the error indicator is set
-static void check_and_fclose(FILE *fp, const char *name) {
-    fflush(fp);
-    if (fsync(fileno(fp)) == -1) {
-        PLOG(ERROR) << "Failed to fsync " << name;
-    }
-    if (ferror(fp)) {
-        PLOG(ERROR) << "Error in " << name;
-    }
-    fclose(fp);
+static void check_and_fclose(FILE* fp, const std::string& name) {
+  fflush(fp);
+  if (fsync(fileno(fp)) == -1) {
+    PLOG(ERROR) << "Failed to fsync " << name;
+  }
+  if (ferror(fp)) {
+    PLOG(ERROR) << "Error in " << name;
+  }
+  fclose(fp);
 }
 
 bool is_ro_debuggable() {
@@ -408,27 +407,27 @@
     android::base::WriteStringToFile(buffer, destination);
 }
 
-// write content to the current pmsg session.
-static ssize_t __pmsg_write(const char *filename, const char *buf, size_t len) {
-    return __android_log_pmsg_file_write(LOG_ID_SYSTEM, ANDROID_LOG_INFO,
-                                         filename, buf, len);
+// Writes content to the current pmsg session.
+static ssize_t __pmsg_write(const std::string& filename, const std::string& buf) {
+  return __android_log_pmsg_file_write(LOG_ID_SYSTEM, ANDROID_LOG_INFO, filename.c_str(),
+                                       buf.data(), buf.size());
 }
 
-static void copy_log_file_to_pmsg(const char* source, const char* destination) {
-    std::string content;
-    android::base::ReadFileToString(source, &content);
-    __pmsg_write(destination, content.c_str(), content.length());
+static void copy_log_file_to_pmsg(const std::string& source, const std::string& destination) {
+  std::string content;
+  android::base::ReadFileToString(source, &content);
+  __pmsg_write(destination, content);
 }
 
 // How much of the temp log we have copied to the copy in cache.
 static off_t tmplog_offset = 0;
 
-static void copy_log_file(const char* source, const char* destination, bool append) {
+static void copy_log_file(const std::string& source, const std::string& destination, bool append) {
   FILE* dest_fp = fopen_path(destination, append ? "ae" : "we");
   if (dest_fp == nullptr) {
     PLOG(ERROR) << "Can't open " << destination;
   } else {
-    FILE* source_fp = fopen(source, "re");
+    FILE* source_fp = fopen(source.c_str(), "re");
     if (source_fp != nullptr) {
       if (append) {
         fseeko(source_fp, tmplog_offset, SEEK_SET);  // Since last write
@@ -448,39 +447,38 @@
 }
 
 static void copy_logs() {
-    // We only rotate and record the log of the current session if there are
-    // actual attempts to modify the flash, such as wipes, installs from BCB
-    // or menu selections. This is to avoid unnecessary rotation (and
-    // possible deletion) of log files, if it does not do anything loggable.
-    if (!modified_flash) {
-        return;
-    }
+  // We only rotate and record the log of the current session if there are actual attempts to modify
+  // the flash, such as wipes, installs from BCB or menu selections. This is to avoid unnecessary
+  // rotation (and possible deletion) of log files, if it does not do anything loggable.
+  if (!modified_flash) {
+    return;
+  }
 
-    // Always write to pmsg, this allows the OTA logs to be caught in logcat -L
-    copy_log_file_to_pmsg(TEMPORARY_LOG_FILE, LAST_LOG_FILE);
-    copy_log_file_to_pmsg(TEMPORARY_INSTALL_FILE, LAST_INSTALL_FILE);
+  // Always write to pmsg, this allows the OTA logs to be caught in `logcat -L`.
+  copy_log_file_to_pmsg(Paths::Get().temporary_log_file(), LAST_LOG_FILE);
+  copy_log_file_to_pmsg(Paths::Get().temporary_install_file(), LAST_INSTALL_FILE);
 
-    // We can do nothing for now if there's no /cache partition.
-    if (!has_cache) {
-        return;
-    }
+  // We can do nothing for now if there's no /cache partition.
+  if (!has_cache) {
+    return;
+  }
 
-    ensure_path_mounted(LAST_LOG_FILE);
-    ensure_path_mounted(LAST_KMSG_FILE);
-    rotate_logs(LAST_LOG_FILE, LAST_KMSG_FILE);
+  ensure_path_mounted(LAST_LOG_FILE);
+  ensure_path_mounted(LAST_KMSG_FILE);
+  rotate_logs(LAST_LOG_FILE, LAST_KMSG_FILE);
 
-    // Copy logs to cache so the system can find out what happened.
-    copy_log_file(TEMPORARY_LOG_FILE, LOG_FILE, true);
-    copy_log_file(TEMPORARY_LOG_FILE, LAST_LOG_FILE, false);
-    copy_log_file(TEMPORARY_INSTALL_FILE, LAST_INSTALL_FILE, false);
-    save_kernel_log(LAST_KMSG_FILE);
-    chmod(LOG_FILE, 0600);
-    chown(LOG_FILE, AID_SYSTEM, AID_SYSTEM);
-    chmod(LAST_KMSG_FILE, 0600);
-    chown(LAST_KMSG_FILE, AID_SYSTEM, AID_SYSTEM);
-    chmod(LAST_LOG_FILE, 0640);
-    chmod(LAST_INSTALL_FILE, 0644);
-    sync();
+  // Copy logs to cache so the system can find out what happened.
+  copy_log_file(Paths::Get().temporary_log_file(), LOG_FILE, true);
+  copy_log_file(Paths::Get().temporary_log_file(), LAST_LOG_FILE, false);
+  copy_log_file(Paths::Get().temporary_install_file(), LAST_INSTALL_FILE, false);
+  save_kernel_log(LAST_KMSG_FILE);
+  chmod(LOG_FILE, 0600);
+  chown(LOG_FILE, AID_SYSTEM, AID_SYSTEM);
+  chmod(LAST_KMSG_FILE, 0600);
+  chown(LAST_KMSG_FILE, AID_SYSTEM, AID_SYSTEM);
+  chmod(LAST_LOG_FILE, 0640);
+  chmod(LAST_INSTALL_FILE, 0644);
+  sync();
 }
 
 // Clear the recovery command and prepare to boot a (hopefully working) system,
@@ -966,10 +964,10 @@
     }
   } else {
     // If cache partition is not found, view /tmp/recovery.log instead.
-    if (access(TEMPORARY_LOG_FILE, R_OK) == -1) {
+    if (access(Paths::Get().temporary_log_file().c_str(), R_OK) == -1) {
       return;
     } else {
-      entries.push_back(TEMPORARY_LOG_FILE);
+      entries.push_back(Paths::Get().temporary_log_file());
     }
   }
 
@@ -1091,8 +1089,7 @@
             }
         }
 
-        result = install_package(FUSE_SIDELOAD_HOST_PATHNAME, wipe_cache,
-                                 TEMPORARY_INSTALL_FILE, false, 0/*retry_count*/);
+        result = install_package(FUSE_SIDELOAD_HOST_PATHNAME, wipe_cache, false, 0 /*retry_count*/);
         break;
     }
 
@@ -1169,7 +1166,7 @@
         {
           bool adb = (chosen_action == Device::APPLY_ADB_SIDELOAD);
           if (adb) {
-            status = apply_from_adb(&should_wipe_cache, TEMPORARY_INSTALL_FILE);
+            status = apply_from_adb(&should_wipe_cache);
           } else {
             status = apply_from_sdcard(device, &should_wipe_cache);
           }
@@ -1351,19 +1348,20 @@
   return false;
 }
 
-static void log_failure_code(ErrorCode code, const char *update_package) {
-    std::vector<std::string> log_buffer = {
-        update_package,
-        "0",  // install result
-        "error: " + std::to_string(code),
-    };
-    std::string log_content = android::base::Join(log_buffer, "\n");
-    if (!android::base::WriteStringToFile(log_content, TEMPORARY_INSTALL_FILE)) {
-        PLOG(ERROR) << "failed to write " << TEMPORARY_INSTALL_FILE;
-    }
+static void log_failure_code(ErrorCode code, const std::string& update_package) {
+  std::vector<std::string> log_buffer = {
+    update_package,
+    "0",  // install result
+    "error: " + std::to_string(code),
+  };
+  std::string log_content = android::base::Join(log_buffer, "\n");
+  const std::string& install_file = Paths::Get().temporary_install_file();
+  if (!android::base::WriteStringToFile(log_content, install_file)) {
+    PLOG(ERROR) << "Failed to write " << install_file;
+  }
 
-    // Also write the info into last_log.
-    LOG(INFO) << log_content;
+  // Also write the info into last_log.
+  LOG(INFO) << log_content;
 }
 
 int main(int argc, char **argv) {
@@ -1396,7 +1394,7 @@
 
   // redirect_stdio should be called only in non-sideload mode. Otherwise
   // we may have two logger instances with different timestamps.
-  redirect_stdio(TEMPORARY_LOG_FILE);
+  redirect_stdio(Paths::Get().temporary_log_file().c_str());
 
   printf("Starting recovery (pid %d) on %s", getpid(), ctime(&start));
 
@@ -1565,8 +1563,7 @@
         set_retry_bootloader_message(retry_count + 1, args);
       }
 
-      status = install_package(update_package, &should_wipe_cache, TEMPORARY_INSTALL_FILE, true,
-                               retry_count);
+      status = install_package(update_package, &should_wipe_cache, true, retry_count);
       if (status == INSTALL_SUCCESS && should_wipe_cache) {
         wipe_cache(false, device);
       }
@@ -1627,7 +1624,7 @@
     if (!sideload_auto_reboot) {
       ui->ShowText(true);
     }
-    status = apply_from_adb(&should_wipe_cache, TEMPORARY_INSTALL_FILE);
+    status = apply_from_adb(&should_wipe_cache);
     if (status == INSTALL_SUCCESS && should_wipe_cache) {
       if (!wipe_cache(false, device)) {
         status = INSTALL_ERROR;
diff --git a/tests/component/applypatch_test.cpp b/tests/component/applypatch_test.cpp
index 292d76e..4e44309 100644
--- a/tests/component/applypatch_test.cpp
+++ b/tests/component/applypatch_test.cpp
@@ -16,7 +16,6 @@
 
 #include <dirent.h>
 #include <fcntl.h>
-#include <gtest/gtest.h>
 #include <libgen.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -36,16 +35,59 @@
 #include <android-base/test_utils.h>
 #include <android-base/unique_fd.h>
 #include <bsdiff/bsdiff.h>
+#include <gtest/gtest.h>
 #include <openssl/sha.h>
+#include <zlib.h>
 
 #include "applypatch/applypatch.h"
 #include "applypatch/applypatch_modes.h"
 #include "common/test_constants.h"
-#include "otautil/cache_location.h"
+#include "otautil/paths.h"
 #include "otautil/print_sha1.h"
 
 using namespace std::string_literals;
 
+// TODO(b/67849209) Remove after debug the flakiness.
+static void DecompressAndDumpRecoveryImage(const std::string& image_path) {
+  // Expected recovery_image structure
+  // chunk normal:  45066 bytes
+  // chunk deflate: 479442 bytes
+  // chunk normal:  5199 bytes
+  std::string recovery_content;
+  ASSERT_TRUE(android::base::ReadFileToString(image_path, &recovery_content));
+  ASSERT_GT(recovery_content.size(), 45066 + 5199);
+
+  z_stream strm = {};
+  strm.avail_in = recovery_content.size() - 45066 - 5199;
+  strm.next_in =
+      const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(recovery_content.data())) + 45066;
+
+  ASSERT_EQ(Z_OK, inflateInit2(&strm, -15));
+
+  constexpr unsigned int BUFFER_SIZE = 32768;
+  std::vector<uint8_t> uncompressed_data(BUFFER_SIZE);
+  size_t uncompressed_length = 0;
+  SHA_CTX ctx;
+  SHA1_Init(&ctx);
+  int ret;
+  do {
+    strm.avail_out = BUFFER_SIZE;
+    strm.next_out = uncompressed_data.data();
+
+    ret = inflate(&strm, Z_NO_FLUSH);
+    ASSERT_GE(ret, 0);
+
+    SHA1_Update(&ctx, uncompressed_data.data(), BUFFER_SIZE - strm.avail_out);
+    uncompressed_length += BUFFER_SIZE - strm.avail_out;
+  } while (ret != Z_STREAM_END);
+  inflateEnd(&strm);
+
+  uint8_t digest[SHA_DIGEST_LENGTH];
+  SHA1_Final(digest, &ctx);
+  GTEST_LOG_(INFO) << "uncompressed length " << uncompressed_length
+                   << " sha1: " << short_sha1(digest);
+}
+
 static void sha1sum(const std::string& fname, std::string* sha1, size_t* fsize = nullptr) {
   ASSERT_TRUE(sha1 != nullptr);
 
@@ -110,14 +152,14 @@
  protected:
   void SetUp() override {
     ApplyPatchTest::SetUp();
-    CacheLocation::location().set_cache_temp_source(old_file);
+    Paths::Get().set_cache_temp_source(old_file);
   }
 };
 
 class ApplyPatchModesTest : public ::testing::Test {
  protected:
   void SetUp() override {
-    CacheLocation::location().set_cache_temp_source(cache_source.path);
+    Paths::Get().set_cache_temp_source(cache_source.path);
     android::base::InitLogging(nullptr, &test_logger);
     android::base::SetMinimumLogSeverity(android::base::LogSeverity::DEBUG);
   }
@@ -157,7 +199,7 @@
   }
 
   void SetUp() override {
-    CacheLocation::location().set_cache_log_directory(mock_log_dir.path);
+    Paths::Get().set_cache_log_directory(mock_log_dir.path);
   }
 
   // A mock method to calculate the free space. It assumes the partition has a total size of 40960
@@ -317,7 +359,11 @@
                                     recovery_img_sha1.c_str(),
                                     recovery_img_size_arg.c_str(),
                                     patch_arg.c_str() };
-  ASSERT_EQ(0, applypatch_modes(args.size(), args.data()));
+
+  if (applypatch_modes(args.size(), args.data()) != 0) {
+    DecompressAndDumpRecoveryImage(tgt_file.path);
+    FAIL();
+  }
 }
 
 TEST_F(ApplyPatchModesTest, PatchModeEmmcTargetWithMultiplePatches) {
@@ -360,7 +406,11 @@
   for (const auto& arg : args) {
     printf("  %s\n", arg);
   }
-  ASSERT_EQ(0, applypatch_modes(args.size(), args.data()));
+
+  if (applypatch_modes(args.size(), args.data()) != 0) {
+    DecompressAndDumpRecoveryImage(tgt_file.path);
+    FAIL();
+  }
 }
 
 // Ensures that applypatch works with a bsdiff based recovery-from-boot.p.
diff --git a/tests/component/updater_test.cpp b/tests/component/updater_test.cpp
index 5bfd7cb..5d3b2d9 100644
--- a/tests/component/updater_test.cpp
+++ b/tests/component/updater_test.cpp
@@ -41,8 +41,8 @@
 #include "common/test_constants.h"
 #include "edify/expr.h"
 #include "otautil/SysUtil.h"
-#include "otautil/cache_location.h"
 #include "otautil/error_code.h"
+#include "otautil/paths.h"
 #include "otautil/print_sha1.h"
 #include "updater/blockimg.h"
 #include "updater/install.h"
@@ -106,10 +106,9 @@
     RegisterInstallFunctions();
     RegisterBlockImageFunctions();
 
-    // Mock the location of last_command_file.
-    CacheLocation::location().set_cache_temp_source(temp_saved_source_.path);
-    CacheLocation::location().set_last_command_file(temp_last_command_.path);
-    CacheLocation::location().set_stash_directory_base(temp_stash_base_.path);
+    Paths::Get().set_cache_temp_source(temp_saved_source_.path);
+    Paths::Get().set_last_command_file(temp_last_command_.path);
+    Paths::Get().set_stash_directory_base(temp_stash_base_.path);
   }
 
   TemporaryFile temp_saved_source_;
@@ -719,7 +718,7 @@
 }
 
 TEST_F(UpdaterTest, last_command_update) {
-  std::string last_command_file = CacheLocation::location().last_command_file();
+  std::string last_command_file = Paths::Get().last_command_file();
 
   std::string block1 = std::string(4096, '1');
   std::string block2 = std::string(4096, '2');
@@ -806,7 +805,7 @@
 }
 
 TEST_F(UpdaterTest, last_command_update_unresumable) {
-  std::string last_command_file = CacheLocation::location().last_command_file();
+  std::string last_command_file = Paths::Get().last_command_file();
 
   std::string block1 = std::string(4096, '1');
   std::string block2 = std::string(4096, '2');
@@ -861,7 +860,7 @@
 }
 
 TEST_F(UpdaterTest, last_command_verify) {
-  std::string last_command_file = CacheLocation::location().last_command_file();
+  std::string last_command_file = Paths::Get().last_command_file();
 
   std::string block1 = std::string(4096, '1');
   std::string block2 = std::string(4096, '2');
diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp
index e7d213a..d767d44 100644
--- a/updater/blockimg.cpp
+++ b/updater/blockimg.cpp
@@ -15,8 +15,8 @@
  */
 
 #include <ctype.h>
-#include <errno.h>
 #include <dirent.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <linux/fs.h>
@@ -25,13 +25,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/ioctl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <sys/ioctl.h>
 #include <time.h>
 #include <unistd.h>
-#include <fec/io.h>
 
 #include <functional>
 #include <limits>
@@ -47,14 +46,15 @@
 #include <android-base/unique_fd.h>
 #include <applypatch/applypatch.h>
 #include <brotli/decode.h>
+#include <fec/io.h>
 #include <openssl/sha.h>
 #include <private/android_filesystem_config.h>
 #include <ziparchive/zip_archive.h>
 
 #include "edify/expr.h"
 #include "otafault/ota_io.h"
-#include "otautil/cache_location.h"
 #include "otautil/error_code.h"
+#include "otautil/paths.h"
 #include "otautil/print_sha1.h"
 #include "otautil/rangeset.h"
 #include "updater/install.h"
@@ -74,7 +74,7 @@
 static std::unordered_map<std::string, RangeSet> stash_map;
 
 static void DeleteLastCommandFile() {
-  std::string last_command_file = CacheLocation::location().last_command_file();
+  const std::string& last_command_file = Paths::Get().last_command_file();
   if (unlink(last_command_file.c_str()) == -1 && errno != ENOENT) {
     PLOG(ERROR) << "Failed to unlink: " << last_command_file;
   }
@@ -83,7 +83,7 @@
 // Parse the last command index of the last update and save the result to |last_command_index|.
 // Return true if we successfully read the index.
 static bool ParseLastCommandFile(int* last_command_index) {
-  std::string last_command_file = CacheLocation::location().last_command_file();
+  const std::string& last_command_file = Paths::Get().last_command_file();
   android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(last_command_file.c_str(), O_RDONLY)));
   if (fd == -1) {
     if (errno != ENOENT) {
@@ -119,7 +119,7 @@
 // Update the last command index in the last_command_file if the current command writes to the
 // stash either explicitly or implicitly.
 static bool UpdateLastCommandIndex(int command_index, const std::string& command_string) {
-  std::string last_command_file = CacheLocation::location().last_command_file();
+  const std::string& last_command_file = Paths::Get().last_command_file();
   std::string last_command_tmp = last_command_file + ".tmp";
   std::string content = std::to_string(command_index) + "\n" + command_string;
   android::base::unique_fd wfd(
@@ -672,15 +672,11 @@
 }
 
 static std::string GetStashFileName(const std::string& base, const std::string& id,
-        const std::string& postfix) {
-    if (base.empty()) {
-        return "";
-    }
-
-    std::string fn(CacheLocation::location().stash_directory_base());
-    fn += "/" + base + "/" + id + postfix;
-
-    return fn;
+                                    const std::string& postfix) {
+  if (base.empty()) {
+    return "";
+  }
+  return Paths::Get().stash_directory_base() + "/" + base + "/" + id + postfix;
 }
 
 // Does a best effort enumeration of stash files. Ignores possible non-file items in the stash
diff --git a/updater/updater.cpp b/updater/updater.cpp
index 1d6b172..bf7c36c 100644
--- a/updater/updater.cpp
+++ b/updater/updater.cpp
@@ -17,9 +17,9 @@
 #include "updater/updater.h"
 
 #include <stdio.h>
-#include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <string>
 
@@ -34,7 +34,6 @@
 #include "otafault/config.h"
 #include "otautil/DirUtil.h"
 #include "otautil/SysUtil.h"
-#include "otautil/cache_location.h"
 #include "otautil/error_code.h"
 #include "updater/blockimg.h"
 #include "updater/install.h"
diff --git a/updater_sample/tests/res/raw/ota_002_package.zip b/updater_sample/tests/res/raw/ota_002_package.zip
new file mode 100644
index 0000000..3bfe377
--- /dev/null
+++ b/updater_sample/tests/res/raw/ota_002_package.zip
Binary files differ
diff --git a/updater_sample/tests/res/raw/update_config_stream_001.json b/updater_sample/tests/res/raw/update_config_stream_001.json
new file mode 100644
index 0000000..965f737
--- /dev/null
+++ b/updater_sample/tests/res/raw/update_config_stream_001.json
@@ -0,0 +1,14 @@
+{
+    "name": "streaming-001",
+    "url": "http://foo.bar/update.zip",
+    "type": "STREAMING",
+    "streaming_metadata": {
+        "property_files": [
+            {
+                "filename": "payload.bin",
+                "offset": 531,
+                "size": 5012323
+            }
+        ]
+    }
+}
diff --git a/updater_sample/tests/res/raw/update_config_stream_002.json b/updater_sample/tests/res/raw/update_config_stream_002.json
new file mode 100644
index 0000000..36c5722
--- /dev/null
+++ b/updater_sample/tests/res/raw/update_config_stream_002.json
@@ -0,0 +1,35 @@
+{
+    "__": "*** Generated using tools/gen_update_config.py ***",
+    "name": "S ota_002",
+    "streaming_metadata": {
+        "property_files": [
+            {
+                "filename": "payload.bin",
+                "offset": 195,
+                "size": 8
+            },
+            {
+                "filename": "payload_properties.txt",
+                "offset": 276,
+                "size": 19
+            },
+            {
+                "filename": "care_map.txt",
+                "offset": 42,
+                "size": 9
+            },
+            {
+                "filename": "compatibility.zip",
+                "offset": 119,
+                "size": 14
+            },
+            {
+                "filename": "metadata",
+                "offset": 375,
+                "size": 9
+            }
+        ]
+    },
+    "type": "STREAMING",
+    "url": "file:///data/sample-ota-packages/ota_002_package.zip"
+}
