diff --git a/screen_ui.cpp b/screen_ui.cpp
index dc59631..522aa6b 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -51,6 +51,7 @@
 }
 
 ScreenRecoveryUI::ScreenRecoveryUI() :
+    currentIcon(NONE),
     installingFrame(0),
     locale(nullptr),
     rtl_locale(false),
@@ -75,8 +76,7 @@
     animation_fps(-1),
     installing_frames(-1),
     stage(-1),
-    max_stage(-1),
-    currentIcon(NONE) {
+    max_stage(-1) {
 
     for (int i = 0; i < 5; i++) {
         backgroundIcon[i] = nullptr;
diff --git a/screen_ui.h b/screen_ui.h
index 386deac..08a5f44 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -68,6 +68,7 @@
     void SetColor(UIElement e);
 
   private:
+    Icon currentIcon;
     int installingFrame;
     const char* locale;
     bool rtl_locale;
@@ -138,8 +139,6 @@
     void LoadBitmap(const char* filename, GRSurface** surface);
     void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface);
     void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
-  protected:
-    Icon currentIcon;
 };
 
 #endif  // RECOVERY_UI_H
diff --git a/wear_ui.cpp b/wear_ui.cpp
index ef48b78..65bcd84 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -59,6 +59,7 @@
     intro_frames(22),
     loop_frames(60),
     animation_fps(30),
+    currentIcon(NONE),
     intro_done(false),
     current_frame(0),
     rtl_locale(false),
@@ -365,6 +366,57 @@
     RecoveryUI::Init();
 }
 
+void WearRecoveryUI::SetBackground(Icon icon)
+{
+    pthread_mutex_lock(&updateMutex);
+    currentIcon = icon;
+    update_screen_locked();
+    pthread_mutex_unlock(&updateMutex);
+}
+
+void WearRecoveryUI::SetProgressType(ProgressType type)
+{
+    pthread_mutex_lock(&updateMutex);
+    if (progressBarType != type) {
+        progressBarType = type;
+    }
+    progressScopeStart = 0;
+    progressScopeSize = 0;
+    progress = 0;
+    update_screen_locked();
+    pthread_mutex_unlock(&updateMutex);
+}
+
+void WearRecoveryUI::ShowProgress(float portion, float seconds)
+{
+    pthread_mutex_lock(&updateMutex);
+    progressBarType = DETERMINATE;
+    progressScopeStart += progressScopeSize;
+    progressScopeSize = portion;
+    progressScopeTime = now();
+    progressScopeDuration = seconds;
+    progress = 0;
+    update_screen_locked();
+    pthread_mutex_unlock(&updateMutex);
+}
+
+void WearRecoveryUI::SetProgress(float fraction)
+{
+    pthread_mutex_lock(&updateMutex);
+    if (fraction < 0.0) fraction = 0.0;
+    if (fraction > 1.0) fraction = 1.0;
+    if (progressBarType == DETERMINATE && fraction > progress) {
+        // Skip updates that aren't visibly different.
+        int width = progress_bar_width;
+        float scale = width * progressScopeSize;
+        if ((int) (progress * scale) != (int) (fraction * scale)) {
+            progress = fraction;
+            update_screen_locked();
+        }
+    }
+    pthread_mutex_unlock(&updateMutex);
+}
+
 void WearRecoveryUI::SetStage(int current, int max)
 {
 }
@@ -447,6 +499,16 @@
     return sel;
 }
 
+void WearRecoveryUI::EndMenu() {
+    int i;
+    pthread_mutex_lock(&updateMutex);
+    if (show_menu > 0 && text_rows > 0 && text_cols > 0) {
+        show_menu = 0;
+        update_screen_locked();
+    }
+    pthread_mutex_unlock(&updateMutex);
+}
+
 bool WearRecoveryUI::IsTextVisible()
 {
     pthread_mutex_lock(&updateMutex);
@@ -477,6 +539,13 @@
     pthread_mutex_unlock(&updateMutex);
 }
 
+void WearRecoveryUI::Redraw()
+{
+    pthread_mutex_lock(&updateMutex);
+    update_screen_locked();
+    pthread_mutex_unlock(&updateMutex);
+}
+
 void WearRecoveryUI::ShowFile(FILE* fp) {
     std::vector<long> offsets;
     offsets.push_back(ftell(fp));
diff --git a/wear_ui.h b/wear_ui.h
index 63a2572..35ea516 100644
--- a/wear_ui.h
+++ b/wear_ui.h
@@ -24,6 +24,13 @@
     WearRecoveryUI();
 
     void Init();
+    // overall recovery state ("background image")
+    void SetBackground(Icon icon);
+
+    // progress indicator
+    void SetProgressType(ProgressType type);
+    void ShowProgress(float portion, float seconds);
+    void SetProgress(float fraction);
 
     void SetStage(int current, int max);
 
@@ -42,6 +49,9 @@
     void StartMenu(const char* const * headers, const char* const * items,
                            int initial_selection);
     int SelectMenu(int sel);
+    void EndMenu();
+
+    void Redraw();
 
     enum UIElement { HEADER, MENU, MENU_SEL_BG, MENU_SEL_FG, LOG, TEXT_FILL };
     virtual void SetColor(UIElement e);
@@ -68,6 +78,8 @@
     int animation_fps;
 
   private:
+    Icon currentIcon;
+
     bool intro_done;
 
     int current_frame;
