summaryrefslogtreecommitdiff
path: root/recovery.cpp
diff options
context:
space:
mode:
authorRichard Hansen <rhansen@rhansen.org>2020-05-04 15:56:36 -0400
committeralk3pInjection <webmaster@raspii.tech>2022-01-29 00:06:32 +0800
commit3c38a55912e342762221752ea90407e0807e1cb3 (patch)
tree411146c1474b37e24bd2d4d669242c7018ad7b35 /recovery.cpp
parent3bc558d1b65410ef5b11f3199e3db12e023e9338 (diff)
recovery: Print the active slot
Addresses https://gitlab.com/LineageOS/issues/android/-/issues/1893 Change-Id: I9fd731c3427c3a52641aa2e9c89eb9a20bafdd57
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index afeee7ce..4bf5f129 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -796,6 +796,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();