summaryrefslogtreecommitdiffstats
path: root/recovery_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'recovery_main.cpp')
-rw-r--r--recovery_main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp
index 56ebe16fa..b41368d7b 100644
--- a/recovery_main.cpp
+++ b/recovery_main.cpp
@@ -178,6 +178,12 @@ static std::string load_locale_from_cache() {
return android::base::Trim(content);
}
+// Sets the usb config to 'state'.
+static bool SetUsbConfig(const std::string& state) {
+ android::base::SetProperty("sys.usb.config", state);
+ return android::base::WaitForProperty("sys.usb.state", state);
+}
+
static void ListenRecoverySocket(RecoveryUI* ui, std::atomic<Device::BuiltinAction>& action) {
android::base::unique_fd sock_fd(android_get_control_socket("recovery"));
if (sock_fd < 0) {