diff options
Diffstat (limited to '')
-rw-r--r-- | recovery_main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp index 30a1fc0a4..80cba61d3 100644 --- a/recovery_main.cpp +++ b/recovery_main.cpp @@ -471,6 +471,11 @@ int main(int argc, char** argv) { std::string usb_config = fastboot ? "fastboot" : IsRoDebuggable() || IsDeviceUnlocked() ? "adb" : "none"; std::string usb_state = android::base::GetProperty("sys.usb.state", "none"); + if (fastboot) { + device->PreFastboot(); + } else { + device->PreRecovery(); + } if (usb_config != usb_state) { if (!SetUsbConfig("none")) { LOG(ERROR) << "Failed to clear USB config"; |