diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 5de7b68..8a4ebf3 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -267,6 +267,45 @@
     return false;
 }
 
+static void _run_dumpsys(const std::string& title, RootMode root_mode, int timeout_seconds,
+        const std::vector<std::string>& args) {
+    DurationReporter duration_reporter(title.c_str());
+
+    std::string timeout_string = std::to_string(timeout_seconds);
+
+    const char *dumpsys_args[ARG_MAX] = { "/system/bin/dumpsys", "-t", timeout_string.c_str()};
+
+    int index = 3; // 'dumpsys' '-t' 'TIMEOUT'
+    for (const std::string& arg : args) {
+        if (index > ARG_MAX - 2) {
+            MYLOGE("Too many arguments for '%s': %d\n", title.c_str(), (int) args.size());
+            return;
+        }
+        dumpsys_args[index++] = arg.c_str();
+    }
+    // Always terminate with nullptr.
+    dumpsys_args[index] = nullptr;
+
+    std::string args_string;
+    format_args(index, dumpsys_args, &args_string);
+    printf("------ %s (%s) ------\n", title.c_str(), args_string.c_str());
+    fflush(stdout);
+
+    ON_DRY_RUN({ update_progress(timeout_seconds); return; });
+
+    run_command_always(title.c_str(), root_mode, NORMAL_STDOUT, timeout_seconds, dumpsys_args);
+}
+
+static void run_dumpsys(const std::string& title, int timeout_seconds,
+        const std::vector<std::string>& args) {
+    _run_dumpsys(title, DONT_DROP_ROOT, timeout_seconds, args);
+}
+
+static void run_dumpsys_as_shell(const std::string& title, int timeout_seconds,
+        const std::vector<std::string>& args) {
+    _run_dumpsys(title, DROP_ROOT, timeout_seconds, args);
+}
+
 static const char mmcblk0[] = "/sys/block/mmcblk0/";
 unsigned long worst_write_perf = 20000; /* in KB/s */
 
@@ -889,7 +928,7 @@
 #endif
     dump_file("INTERRUPTS (1)", "/proc/interrupts");
 
-    run_command("NETWORK DIAGNOSTICS", 10, "dumpsys", "-t", "10", "connectivity", "--diag", NULL);
+    run_dumpsys("NETWORK DIAGNOSTICS", 10, {"connectivity", "--diag"});
 
 #ifdef FWDUMP_bcmdhd
     run_command("DUMP WIFI STATUS", 20,
@@ -959,36 +998,36 @@
     printf("== Android Framework Services\n");
     printf("========================================================\n");
 
-    run_command("DUMPSYS", 60, "dumpsys", "-t", "60", "--skip", "meminfo", "cpuinfo", NULL);
+    run_dumpsys("DUMPSYS", 60, {"--skip", "meminfo", "cpuinfo"});
 
     printf("========================================================\n");
     printf("== Checkins\n");
     printf("========================================================\n");
 
-    run_command("CHECKIN BATTERYSTATS", 30, "dumpsys", "-t", "30", "batterystats", "-c", NULL);
-    run_command("CHECKIN MEMINFO", 30, "dumpsys", "-t", "30", "meminfo", "--checkin", NULL);
-    run_command("CHECKIN NETSTATS", 30, "dumpsys", "-t", "30", "netstats", "--checkin", NULL);
-    run_command("CHECKIN PROCSTATS", 30, "dumpsys", "-t", "30", "procstats", "-c", NULL);
-    run_command("CHECKIN USAGESTATS", 30, "dumpsys", "-t", "30", "usagestats", "-c", NULL);
-    run_command("CHECKIN PACKAGE", 30, "dumpsys", "-t", "30", "package", "--checkin", NULL);
+    run_dumpsys("CHECKIN BATTERYSTATS", 30, {"batterystats", "-c"});
+    run_dumpsys("CHECKIN MEMINFO", 30, {"meminfo", "--checkin"});
+    run_dumpsys("CHECKIN NETSTATS", 30, {"netstats", "--checkin"});
+    run_dumpsys("CHECKIN PROCSTATS", 30, {"procstats", "-c"});
+    run_dumpsys("CHECKIN USAGESTATS", 30, {"usagestats", "-c"});
+    run_dumpsys("CHECKIN PACKAGE", 30, {"package", "--checkin"});
 
     printf("========================================================\n");
     printf("== Running Application Activities\n");
     printf("========================================================\n");
 
-    run_command("APP ACTIVITIES", 30, "dumpsys", "-t", "30", "activity", "all", NULL);
+    run_dumpsys("APP ACTIVITIES", 30, {"activity", "all"});
 
     printf("========================================================\n");
     printf("== Running Application Services\n");
     printf("========================================================\n");
 
-    run_command("APP SERVICES", 30, "dumpsys", "-t", "30", "activity", "service", "all", NULL);
+    run_dumpsys("APP SERVICES", 30, {"activity", "service", "all"});
 
     printf("========================================================\n");
     printf("== Running Application Providers\n");
     printf("========================================================\n");
 
-    run_command("APP PROVIDERS", 30, "dumpsys", "-t", "30", "activity", "provider", "all", NULL);
+    run_dumpsys("APP PROVIDERS", 30, {"activity", "provider", "all"});
 
 
     printf("========================================================\n");
@@ -1365,8 +1404,8 @@
 
     // Invoking the following dumpsys calls before dump_traces() to try and
     // keep the system stats as close to its initial state as possible.
-    run_command_as_shell("DUMPSYS MEMINFO", 90, "dumpsys", "-t", "90", "meminfo", "-a", NULL);
-    run_command_as_shell("DUMPSYS CPUINFO", 10, "dumpsys", "-t", "10", "cpuinfo", "-a", NULL);
+    run_dumpsys_as_shell("DUMPSYS MEMINFO", 90, {"meminfo", "-a"});
+    run_dumpsys_as_shell("DUMPSYS CPUINFO", 10, {"cpuinfo", "-a"});
 
     /* collect stack traces from Dalvik and native processes (needs root) */
     dump_traces_path = dump_traces();
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp
index c546f4b..3c9693f 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -644,7 +644,7 @@
     DurationReporter duration_reporter(title);
     fflush(stdout);
 
-    const char *args[1024] = {command};
+    const char *args[ARG_MAX] = {command};
     size_t arg;
     va_list ap;
     va_start(ap, command);
@@ -682,7 +682,7 @@
     DurationReporter duration_reporter(title);
     fflush(stdout);
 
-    const char *args[1024] = {command};
+    const char *args[ARG_MAX] = {command};
     size_t arg;
     va_list ap;
     va_start(ap, command);
@@ -871,14 +871,18 @@
         MYLOGE("send_broadcast: too many arguments (%d)\n", (int) args.size());
         return;
     }
-    const char *am_args[1024] = { "/system/bin/am", "broadcast", "--user", "0", "-a",
-                                  action.c_str() };
+    const char *am_args[ARG_MAX] = { "/system/bin/am", "broadcast", "--user", "0", "-a",
+                                     action.c_str() };
     size_t am_index = 5; // Starts at the index of last initial value above.
     for (const std::string& arg : args) {
+        if (am_index > ARG_MAX - 2) {
+            MYLOGE("send_broadcast: too many arguments (%d)\n", (int) args.size());
+            return;
+        }
         am_args[++am_index] = arg.c_str();
     }
-    // Always terminate with NULL.
-    am_args[am_index + 1] = NULL;
+    // Always terminate with nullptr.
+    am_args[am_index + 1] = nullptr;
     std::string args_string;
     format_args(am_index + 1, am_args, &args_string);
     MYLOGD("send_broadcast command: %s\n", args_string.c_str());
