summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Egnor <egnor@google.com>2010-01-20 13:50:36 -0800
committerMike Lockwood <lockwood@android.com>2010-02-15 11:59:47 -0500
commit7eced2b86aa4ad91307b6531cae73ce1a4064b18 (patch)
treef97ca76f800a541709db0253e4a1d6f68b4c989d
parent429c5ae4618a454120a0fa353a378916f38d2fd7 (diff)
downloadsystem_core-7eced2b86aa4ad91307b6531cae73ce1a4064b18.zip
system_core-7eced2b86aa4ad91307b6531cae73ce1a4064b18.tar.gz
system_core-7eced2b86aa4ad91307b6531cae73ce1a4064b18.tar.bz2
make "adb bugreport" run "bugreport" (which invokes "dumpstate"
indirectly via system service) rather than "dumpstate", that way even when adb is not running as root, dumpstate does run as root, and can do things like collect VM traces.
-rw-r--r--adb/commandline.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/adb/commandline.c b/adb/commandline.c
index 2f429ef..8781081 100644
--- a/adb/commandline.c
+++ b/adb/commandline.c
@@ -951,10 +951,8 @@ top:
}
if(!strcmp(argv[0], "bugreport")) {
- if (argc != 1) {
- return 1;
- }
- do_cmd(ttype, serial, "shell", "dumpstate", "-", 0);
+ if (argc != 1) return usage();
+ do_cmd(ttype, serial, "shell", "bugreport", 0);
return 0;
}