Add option to #define _DUMPSTATE_DRY_RUN_ to skip the actual dumps.
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 7560416..814b1c2 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -770,11 +770,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");