summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--otautil/include/otautil/sysutil.h2
-rw-r--r--otautil/sysutil.cpp8
-rw-r--r--recovery.cpp8
-rw-r--r--recovery_ui/ui.cpp3
-rw-r--r--tools/recovery_l10n/res/values-ar/strings.xml4
-rw-r--r--tools/recovery_l10n/res/values-hy/strings.xml2
-rw-r--r--updater/install.cpp1
7 files changed, 11 insertions, 17 deletions
diff --git a/otautil/include/otautil/sysutil.h b/otautil/include/otautil/sysutil.h
index 326db8644..d0d2e67d7 100644
--- a/otautil/include/otautil/sysutil.h
+++ b/otautil/include/otautil/sysutil.h
@@ -103,7 +103,7 @@ class MemMapping {
// Reboots the device into the specified target, by additionally handling quiescent reboot mode.
// All unknown targets reboot into Android.
-bool Reboot(std::string_view target);
+[[noreturn]] void Reboot(std::string_view target);
// Triggers a shutdown.
bool Shutdown(std::string_view target);
diff --git a/otautil/sysutil.cpp b/otautil/sysutil.cpp
index 6cd46c6a9..b3ead9736 100644
--- a/otautil/sysutil.cpp
+++ b/otautil/sysutil.cpp
@@ -219,14 +219,18 @@ MemMapping::~MemMapping() {
ranges_.clear();
}
-bool Reboot(std::string_view target) {
+void Reboot(std::string_view target) {
std::string cmd = "reboot," + std::string(target);
// Honor the quiescent mode if applicable.
if (target != "bootloader" && target != "fastboot" &&
android::base::GetBoolProperty("ro.boot.quiescent", false)) {
cmd += ",quiescent";
}
- return android::base::SetProperty(ANDROID_RB_PROPERTY, cmd);
+ if (!android::base::SetProperty(ANDROID_RB_PROPERTY, cmd)) {
+ LOG(FATAL) << "Reboot failed";
+ }
+
+ while (true) pause();
}
bool Shutdown(std::string_view target) {
diff --git a/recovery.cpp b/recovery.cpp
index 0382697ab..7675121d4 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -781,13 +781,7 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri
ui->Print("Retry attempt %d\n", retry_count);
// Reboot back into recovery to retry the update.
- if (!Reboot("recovery")) {
- ui->Print("Reboot failed\n");
- } else {
- while (true) {
- pause();
- }
- }
+ Reboot("recovery");
}
// If this is an eng or userdebug build, then automatically
// turn the text display on if the script fails so the error
diff --git a/recovery_ui/ui.cpp b/recovery_ui/ui.cpp
index 6f5cbbca6..330721773 100644
--- a/recovery_ui/ui.cpp
+++ b/recovery_ui/ui.cpp
@@ -375,9 +375,6 @@ void RecoveryUI::ProcessKey(int key_code, int updown) {
case RecoveryUI::REBOOT:
if (reboot_enabled) {
Reboot("userrequested,recovery,ui");
- while (true) {
- pause();
- }
}
break;
diff --git a/tools/recovery_l10n/res/values-ar/strings.xml b/tools/recovery_l10n/res/values-ar/strings.xml
index 69191287d..a9cd2d133 100644
--- a/tools/recovery_l10n/res/values-ar/strings.xml
+++ b/tools/recovery_l10n/res/values-ar/strings.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="recovery_installing" msgid="2013591905463558223">"جارٍ تثبيت إعادة تحميل النظام"</string>
+ <string name="recovery_installing" msgid="2013591905463558223">"جارٍ تثبيت تحديث النظام"</string>
<string name="recovery_erasing" msgid="7334826894904037088">"جارٍ محو البيانات"</string>
<string name="recovery_no_command" msgid="4465476568623024327">"ليس هناك أي أمر"</string>
<string name="recovery_error" msgid="5748178989622716736">"خطأ!"</string>
- <string name="recovery_installing_security" msgid="9184031299717114342">"جارٍ تثبيت إعادة تحميل الأمان"</string>
+ <string name="recovery_installing_security" msgid="9184031299717114342">"جارٍ تثبيت تحديث الأمان"</string>
<string name="recovery_wipe_data_menu_header" msgid="550255032058254478">"‏يتعذَّر تحميل نظام Android، حيث قد تكون بياناتك تالفة. وإذا استمر ظهور هذه الرسالة، قد يتعيَّن عليك إجراء إعادة الضبط على الإعدادات الأصلية ومحو جميع بيانات المستخدم المُخزَّنة على هذا الجهاز."</string>
<string name="recovery_try_again" msgid="7168248750158873496">"إعادة المحاولة"</string>
<string name="recovery_factory_data_reset" msgid="7321351565602894783">"إعادة الضبط على الإعدادات الأصلية"</string>
diff --git a/tools/recovery_l10n/res/values-hy/strings.xml b/tools/recovery_l10n/res/values-hy/strings.xml
index 35a0ab113..76c28a707 100644
--- a/tools/recovery_l10n/res/values-hy/strings.xml
+++ b/tools/recovery_l10n/res/values-hy/strings.xml
@@ -9,6 +9,6 @@
<string name="recovery_wipe_data_menu_header" msgid="550255032058254478">"Չհաջողվեց բեռնել Android համակարգը։ Հնարավոր է՝ ձեր տվյալները վնասված են։ Եթե նորից տեսնեք այս հաղորդագրությունը, փորձեք վերակայել սարքի կարգավորումները և ջնջել օգտատիրոջ բոլոր տվյալները։"</string>
<string name="recovery_try_again" msgid="7168248750158873496">"Նորից փորձել"</string>
<string name="recovery_factory_data_reset" msgid="7321351565602894783">"Վերակայել բոլոր տվյալները"</string>
- <string name="recovery_wipe_data_confirmation" msgid="5439823343348043954">"Մաքրե՞լ օգտատիրոջ բոլոր տվյալները։\n\n ԱՅՍ ԳՈՐԾՈՂՈՒԹՅՈՒՆԸ ՀՆԱՐԱՎՈՐ ՉԻ ԼԻՆԻ ՀԵՏԱՐԿԵԼ"</string>
+ <string name="recovery_wipe_data_confirmation" msgid="5439823343348043954">"Ջնջե՞լ օգտատիրոջ բոլոր տվյալները։\n\n ԱՅՍ ԳՈՐԾՈՂՈՒԹՅՈՒՆԸ ՀՆԱՐԱՎՈՐ ՉԻ ԼԻՆԻ ՀԵՏԱՐԿԵԼ"</string>
<string name="recovery_cancel_wipe_data" msgid="66987687653647384">"Չեղարկել"</string>
</resources>
diff --git a/updater/install.cpp b/updater/install.cpp
index 62ff87e76..7608dc3cd 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -733,7 +733,6 @@ Value* RebootNowFn(const char* name, State* state, const std::vector<std::unique
Reboot(property);
- sleep(5);
return ErrorAbort(state, kRebootFailure, "%s() failed to reboot", name);
}