ui/waiting: start with logo, not lockscreen
What changed, and why it matters
This commit fixes a UI bug in the BitBox02 hardware wallet where the device showed the lockscreen instead of the company logo when first powered on. It restores the intended startup sequence: logo appears first, then switches to the lockscreen once the orientation/setup timer finishes and USB starts. There is no security issue here—only a visual display-order correction.
No security action required. Treat as a normal UI regression fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A prior refactor accidentally changed the waiting screen’s initial sub-component from the logo image to the lockscreen. This commit reverts that by initializing data->show_logo = true and adding waiting_switch_to_lockscreen() so the orientation_screen workflow can transition to the lockscreen at the appropriate point (after usb_start()). It also adds wrapper functions in screen_process. The change is purely presentational and restores pre-regression behavior.
Changed components
src/ui/components/waiting.csrc/ui/components/waiting.hsrc/ui/screen_process.csrc/ui/screen_process.hsrc/workflow/orientation_screen.cInspect captured patch +49 / −3
diff --git a/src/ui/components/waiting.c b/src/ui/components/waiting.c
index 409d478..88c06e9 100644
--- a/src/ui/components/waiting.c
+++ b/src/ui/components/waiting.c
@@ -52,6 +52,7 @@ component_t* waiting_create(void)
Abort("Error: malloc waiting data");
}
memset(data, 0, sizeof(data_t));
+ data->show_logo = true;
component_t* waiting = malloc(sizeof(component_t));
if (!waiting) {
@@ -65,7 +66,16 @@ component_t* waiting_create(void)
waiting->position.left = 0;
waiting->data = data;
- ui_util_add_sub_component(waiting, lockscreen_create());
+ image_logo_data_t logo = image_logo_data();
+ component_t* bb2_logo = image_create(
+ logo.buffer.data,
+ logo.buffer.len,
+ logo.dimensions.width,
+ logo.dimensions.height,
+ CENTER,
+ waiting);
+
+ ui_util_add_sub_component(waiting, bb2_logo);
return waiting;
}
@@ -97,3 +107,22 @@ void waiting_switch_to_logo(component_t* component)
component->sub_components.sub_components[0] = bb2_logo;
}
+
+void waiting_switch_to_lockscreen(component_t* component)
+{
+ data_t* data = (data_t*)component->data;
+ if (!data->show_logo) {
+ return;
+ }
+ data->show_logo = false;
+
+ if (component->sub_components.amount != 1) {
+ // Sanity check to avoid memory bugs, should never happen.
+ Abort("waiting_switch_to_lockscreen");
+ return;
+ }
+
+ ui_util_component_cleanup(component->sub_components.sub_components[0]);
+
+ component->sub_components.sub_components[0] = lockscreen_create();
+}
diff --git a/src/ui/components/waiting.h b/src/ui/components/waiting.h
index 6fecc9d..4fd2bb9 100644
--- a/src/ui/components/waiting.h
+++ b/src/ui/components/waiting.h
@@ -18,8 +18,8 @@
#include <ui/component.h>
/**
- * Creates a waiting screen. It starts out with a lockscreen (see lockscreen.c). Once
- * `waiting_switch_to_logo()` is called, the waiting screen will switch to showing the logo image.
+ * Creates a waiting screen. It starts out with the logo. Use `waiting_switch_to_lockscreen()` and
+ * `waiting_switch_to_logo()` to change the display between logo and lockscreen.
*/
component_t* waiting_create(void);
@@ -28,4 +28,9 @@ component_t* waiting_create(void);
*/
void waiting_switch_to_logo(component_t* component);
+/**
+ * Switch the waiting screen to show the lockscreen instead (see lockscreen.c).
+ */
+void waiting_switch_to_lockscreen(component_t* component);
+
#endif
diff --git a/src/ui/screen_process.c b/src/ui/screen_process.c
index 9e84a09..fa87e36 100644
--- a/src/ui/screen_process.c
+++ b/src/ui/screen_process.c
@@ -49,6 +49,11 @@ void screen_process_waiting_switch_to_logo(void)
waiting_switch_to_logo(_get_waiting_screen());
}
+void screen_process_waiting_switch_to_lockscreen(void)
+{
+ waiting_switch_to_lockscreen(_get_waiting_screen());
+}
+
component_t* screen_process_get_top_component(void)
{
component_t* saver = screen_saver_get();
diff --git a/src/ui/screen_process.h b/src/ui/screen_process.h
index 699754b..7f245bf 100644
--- a/src/ui/screen_process.h
+++ b/src/ui/screen_process.h
@@ -32,6 +32,11 @@ component_t* screen_process_get_top_component(void);
*/
void screen_process_waiting_switch_to_logo(void);
+/**
+ * Wraps `waiting_switch_to_lockscreen()` for the waiting screen.
+ */
+void screen_process_waiting_switch_to_lockscreen(void);
+
/**
* Runs the UI once.
*
diff --git a/src/workflow/orientation_screen.c b/src/workflow/orientation_screen.c
index 5a0a2e0..f698479 100644
--- a/src/workflow/orientation_screen.c
+++ b/src/workflow/orientation_screen.c
@@ -25,6 +25,7 @@
#include <screen.h>
#include <ui/components/lockscreen.h>
#include <ui/components/orientation_arrows.h>
+#include <ui/screen_process.h>
#include <ui/screen_stack.h>
#include <usb/usb.h>
#include <utils_ringbuffer.h>
@@ -73,6 +74,7 @@ static void _idle_timer_cb(const struct timer_task* const timer_task)
}
usb_start();
+ screen_process_waiting_switch_to_lockscreen();
}
#endif
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.