diff options
author | Hongguang Chen <hgchen@google.com> | 2020-04-22 05:58:04 +0200 |
---|---|---|
committer | Hongguang Chen <hgchen@google.com> | 2020-05-19 21:11:13 +0200 |
commit | 4d0df88d88db381422ee912f2609258d72eca4cf (patch) | |
tree | 959cfb41f4a1a056fc8d08f6f301e43ca3e9e9da /recovery_main.cpp | |
parent | Merge changes from topic "nonab_on_vab_r" into rvc-dev (diff) | |
download | android_bootable_recovery-4d0df88d88db381422ee912f2609258d72eca4cf.tar android_bootable_recovery-4d0df88d88db381422ee912f2609258d72eca4cf.tar.gz android_bootable_recovery-4d0df88d88db381422ee912f2609258d72eca4cf.tar.bz2 android_bootable_recovery-4d0df88d88db381422ee912f2609258d72eca4cf.tar.lz android_bootable_recovery-4d0df88d88db381422ee912f2609258d72eca4cf.tar.xz android_bootable_recovery-4d0df88d88db381422ee912f2609258d72eca4cf.tar.zst android_bootable_recovery-4d0df88d88db381422ee912f2609258d72eca4cf.zip |
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"; |