fix(core): fix always active power management errors in emulator
What changed, and why it matters
This is a tiny emulator-only fix that fills in two missing status fields (battery and temperature sensor connected) in a fake power-management report used only on the Unix emulator build. It has no security relevance for real Trezor hardware or user funds.
No security action needed; treat as normal emulator maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds two boolean assignments in the Unix emulator implementation of pm_get_state(): state->ntc_connected = true and state->battery_connected = true. The emulator has no real battery or NTC thermistor, so this simply makes the emulated state consistent with the ‘always active’ power model. The change is guarded by the emulator/unix build and does not touch device firmware logic, cryptographic code, or secrets handling.
Changed components
core/embed/io/power_manager/unix/power_manager.cInspect captured patch +2 / −0
diff --git a/core/embed/io/power_manager/unix/power_manager.c b/core/embed/io/power_manager/unix/power_manager.c
index 4a1c6c930..9e712806e 100644
--- a/core/embed/io/power_manager/unix/power_manager.c
+++ b/core/embed/io/power_manager/unix/power_manager.c
@@ -69,6 +69,8 @@ pm_status_t pm_get_state(pm_state_t* state) {
state->charging_status = PM_BATTERY_IDLE;
state->power_status = PM_STATE_ACTIVE;
state->soc = 100;
+ state->ntc_connected = true;
+ state->battery_connected = true;
return PM_OK;
}
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.