diff options
author | Richard Hansen <rhansen@rhansen.org> | 2020-05-04 15:56:36 -0400 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2023-12-25 21:42:48 +0800 |
commit | cbc07926a1dc61a4f9a1c721978d2116c2ac1c7d (patch) | |
tree | 08051a4a5fe733ec8a06f5bba9b7e027ca28f6ed | |
parent | 53d34cf3b3d4907e1d2e38b8b6e2874131ea8710 (diff) |
recovery: Print the active slot
Addresses https://gitlab.com/LineageOS/issues/android/-/issues/1893
Change-Id: I9fd731c3427c3a52641aa2e9c89eb9a20bafdd57
-rw-r--r-- | recovery.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp index 5c053d28..2f87f07b 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -805,6 +805,11 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri std::vector<std::string> title_lines = android::base::Split(android::base::GetProperty("ro.ice.version", ""), ":"); title_lines.insert(std::begin(title_lines), "Project ICE 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(); |