Add option to #define _DUMPSTATE_DRY_RUN_ to skip the actual dumps.
(cherry picked from commit 93d705b6d742e8f00167ff2384e35c2205a6f9da)
Such option is useful when debugging dumpstate itself, since it will
finish much sooner and its output will be much smaller.
Change-Id: If821ed21715461bf82eea0b2be4b926239ad69da
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index db12bf2..808d0c2 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -885,11 +885,12 @@
/* tell activity manager we're done */
if (do_broadcast && use_outfile && do_fb) {
- run_command(NULL, 5, "/system/bin/am", "broadcast", "--user", "0",
+ const char *args[] = { "/system/bin/am", "broadcast", "--user", "0",
"-a", "android.intent.action.BUGREPORT_FINISHED",
"--es", "android.intent.extra.BUGREPORT", path,
"--es", "android.intent.extra.SCREENSHOT", screenshot_path,
- "--receiver-permission", "android.permission.DUMP", NULL);
+ "--receiver-permission", "android.permission.DUMP", NULL };
+ run_command_always(NULL, 5, args);
}
ALOGI("done\n");