From dfdf5ad555e8d01096f20134644caf14e1154623 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 4 May 2020 15:56:36 -0400 Subject: [PATCH] recovery: Print the active slot Change-Id: I9fd731c3427c3a52641aa2e9c89eb9a20bafdd57 --- recovery.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recovery.cpp b/recovery.cpp index 2ce1b676..0544aabd 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -725,6 +725,12 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector title_lines = android::base::Split(android::base::GetProperty("ro.build.fingerprint", ""), ":"); title_lines.insert(std::begin(title_lines), "tequilaOS Recovery"); + + if (android::base::GetBoolProperty("ro.build.ab_update", false)) { + std::string slot = android::base::GetProperty("ro.boot.slot_suffix", ""); + if (android::base::StartsWith(slot, "_")) slot.erase(0, 1); + title_lines.push_back("Active slot: " + slot); + } ui->SetTitle(title_lines); ui->ResetKeyInterruptStatus();