summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorHridya Valsaraju <hridya@google.com>2018-08-31 20:57:51 +0200
committerHridya Valsaraju <hridya@google.com>2018-09-08 00:02:43 +0200
commite4ef453914235d1ac3bea1c1a27975ee1ea7da73 (patch)
treef421eef0a20c95c43cf006e1607fd8e75947ab8a /recovery.cpp
parentMerge "support mounting f2fs in recovery mode" (diff)
downloadandroid_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar
android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.gz
android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.bz2
android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.lz
android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.xz
android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.tar.zst
android_bootable_recovery-e4ef453914235d1ac3bea1c1a27975ee1ea7da73.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 01bd83b5e..5934b61d7 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -286,6 +286,12 @@ static bool erase_volume(const char* volume) {
return (result == 0);
}
+// Sets the usb config to 'state'
+bool SetUsbConfig(const std::string& state) {
+ android::base::SetProperty("sys.usb.config", state);
+ return android::base::WaitForProperty("sys.usb.state", state);
+}
+
// Returns the selected filename, or an empty string.
static std::string browse_directory(const std::string& path, Device* device) {
ensure_path_mounted(path.c_str());