diff --git a/device.h b/device.h
index 8788b2d..9510fbe 100644
--- a/device.h
+++ b/device.h
@@ -58,6 +58,12 @@
     return ui_;
   }
 
+  // Sets the UI object to the given UI. Used to override the default UI in case initialization
+  // failed, or we want a stub for some reason.
+  virtual void SetUI(RecoveryUI* ui) {
+    ui_ = ui;
+  }
+
   // Called when recovery starts up (after the UI has been obtained and initialized and after the
   // arguments have been parsed, but before anything else).
   virtual void StartRecovery() {};
diff --git a/recovery.cpp b/recovery.cpp
index 8dc04a8..95118ff 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -88,7 +88,6 @@
 // into target_files.zip. Assert the version defined in code and in Android.mk are consistent.
 static_assert(kRecoveryApiVersion == RECOVERY_API_VERSION, "Mismatching recovery API versions.");
 
-static std::string locale;
 static bool has_cache = false;
 
 RecoveryUI* ui = nullptr;
@@ -231,7 +230,8 @@
 // Clear the recovery command and prepare to boot a (hopefully working) system,
 // copy our log file to cache as well (for the system to read). This function is
 // idempotent: call it as many times as you like.
-static void finish_recovery() {
+static void finish_recovery(Device* device) {
+  std::string locale = device->GetUI()->GetLocale();
   // Save the locale to cache, so if recovery is next started up without a '--locale' argument
   // (e.g., directly from the bootloader) it will use the last-known locale.
   if (!locale.empty() && has_cache) {
@@ -808,7 +808,7 @@
 // which is to reboot or shutdown depending on if the --shutdown_after flag was passed to recovery.
 static Device::BuiltinAction prompt_and_wait(Device* device, int status) {
   for (;;) {
-    finish_recovery();
+    finish_recovery(device);
     switch (status) {
       case INSTALL_SUCCESS:
       case INSTALL_NONE:
@@ -896,7 +896,7 @@
 
       case Device::RUN_LOCALE_TEST: {
         ScreenRecoveryUI* screen_ui = static_cast<ScreenRecoveryUI*>(ui);
-        screen_ui->CheckBackgroundTextImages(locale);
+        screen_ui->CheckBackgroundTextImages();
         break;
       }
       case Device::MOUNT_SYSTEM:
@@ -1104,6 +1104,7 @@
   bool shutdown_after = false;
   int retry_count = 0;
   bool security_update = false;
+  std::string locale;
 
   int arg;
   int option_index;
@@ -1181,6 +1182,7 @@
       ui = new StubRecoveryUI();
     }
   }
+  device->SetUI(ui);
 
   // Set background string to "installing security update" for security update,
   // otherwise set it to "installing system update".
@@ -1347,7 +1349,7 @@
   }
 
   // Save logs and clean up before rebooting or shutting down.
-  finish_recovery();
+  finish_recovery(device);
 
   switch (after) {
     case Device::SHUTDOWN:
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 7ae81e5..90e0e30 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -372,7 +372,7 @@
   std::string header = "Show background text image";
   text_y += DrawTextLine(text_x, text_y, header, true);
   std::string locale_selection = android::base::StringPrintf(
-      "Current locale: %s, %zu/%zu", locales_entries[sel].c_str(), sel, locales_entries.size());
+      "Current locale: %s, %zu/%zu", locales_entries[sel].c_str(), sel + 1, locales_entries.size());
   // clang-format off
   std::vector<std::string> instruction = {
     locale_selection,
@@ -395,13 +395,14 @@
   pthread_mutex_unlock(&updateMutex);
 }
 
-void ScreenRecoveryUI::CheckBackgroundTextImages(const std::string& saved_locale) {
+void ScreenRecoveryUI::CheckBackgroundTextImages() {
   // Load a list of locales embedded in one of the resource files.
   std::vector<std::string> locales_entries = get_locales_in_png("installing_text");
   if (locales_entries.empty()) {
     Print("Failed to load locales from the resource files\n");
     return;
   }
+  std::string saved_locale = locale_;
   size_t selected = 0;
   SelectAndShowBackgroundText(locales_entries, selected);
 
@@ -748,6 +749,10 @@
   return true;
 }
 
+std::string ScreenRecoveryUI::GetLocale() {
+  return locale_;
+}
+
 void ScreenRecoveryUI::LoadAnimation() {
   std::unique_ptr<DIR, decltype(&closedir)> dir(opendir("/res/images"), closedir);
   dirent* de;
diff --git a/screen_ui.h b/screen_ui.h
index fb811ce..d4923f5 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -114,6 +114,7 @@
   explicit ScreenRecoveryUI(bool scrollable_menu);
 
   bool Init(const std::string& locale) override;
+  std::string GetLocale() override;
 
   // overall recovery state ("background image")
   void SetBackground(Icon icon) override;
@@ -147,9 +148,9 @@
 
   void SetColor(UIElement e) const;
 
-  // Check the background text image. Use volume up/down button to cycle through the locales
-  // embedded in the png file, and power button to go back to recovery main menu.
-  void CheckBackgroundTextImages(const std::string& saved_locale);
+  // Checks the background text image, for debugging purpose. It iterates the locales embedded in
+  // the on-device resource files and shows the localized text, for manual inspection.
+  void CheckBackgroundTextImages();
 
  protected:
   // The margin that we don't want to use for showing texts (e.g. round screen, or screen with
diff --git a/stub_ui.h b/stub_ui.h
index 2ccd491..fddf4e7 100644
--- a/stub_ui.h
+++ b/stub_ui.h
@@ -28,6 +28,9 @@
  public:
   StubRecoveryUI() = default;
 
+  std::string GetLocale() override {
+    return "";
+  }
   void SetBackground(Icon /* icon */) override {}
   void SetSystemUpdateText(bool /* security_update */) override {}
 
diff --git a/ui.h b/ui.h
index 35cc36e..f867790 100644
--- a/ui.h
+++ b/ui.h
@@ -57,6 +57,8 @@
   // the given locale. Returns true on success.
   virtual bool Init(const std::string& locale);
 
+  virtual std::string GetLocale() = 0;
+
   // Shows a stage indicator. Called immediately after Init().
   virtual void SetStage(int current, int max) = 0;
 
