summaryrefslogtreecommitdiff
path: root/fastboot/util.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-06-27 22:15:29 -0700
committerDavid Anderson <dvander@google.com>2019-06-28 21:09:03 +0000
commit7c84b9fea2937c467adb257e27a9cac0ce40f24d (patch)
tree2e930bf97b70bad497e5b3865986cbf62b8d8042 /fastboot/util.cpp
parent99087decb9c9bb63ea20e18f6fa5ccbcefe8cf2b (diff)
fastboot: add a wipe-super command.
Usage: fastboot wipe-super [super_empty.img] This command will read the given super_empty.img (using the default one in ANDROID_PRODUCT_OUT if not specified), and flash by generating a temporary super.img with no partition data. This command will even work on retrofit devices. This command is intended to be used either during device bringup or with scripts that will manually flash individual dynamic partitions, in place of using "fastboot flashall". Bug: 136282057 Test: fastboot wipe-super on retrofit and non-retrofit device Change-Id: Icab368a63ff36fcce9ac9304eb3966dd38bd78c4
Diffstat (limited to 'fastboot/util.cpp')
-rw-r--r--fastboot/util.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/fastboot/util.cpp b/fastboot/util.cpp
index d02b37fee..900d6ea87 100644
--- a/fastboot/util.cpp
+++ b/fastboot/util.cpp
@@ -53,6 +53,10 @@ void die(const char* fmt, ...) {
exit(EXIT_FAILURE);
}
+void die(const std::string& str) {
+ die("%s", str.c_str());
+}
+
void set_verbose() {
g_verbose = true;
}