bugreport/bugreportz: improve help/errors.
Fix bugreportz to report the usage error rather than ignore extra
arguments. Also fix the synopsis in the usage text to include -p.
Update the bugreport warnings to have the correct way to use bugreportz,
since we now know it doesn't actually take a filename and instead
chooses its own.
Bug: http://b/156667896
Bug: http://b/29448020
Test: adb shell bugreport
Test: adb shell bugreport --help
Test: adb shell bugreportz
Test: adb shell bugreportz file.zip
Change-Id: I10875067cf49a1d9869a4cb7a4051c309eed6b17
diff --git a/cmds/bugreport/bugreport.cpp b/cmds/bugreport/bugreport.cpp
index 258b367..e5c52d8 100644
--- a/cmds/bugreport/bugreport.cpp
+++ b/cmds/bugreport/bugreport.cpp
@@ -32,7 +32,8 @@
fprintf(stderr, "WARNING: Flat (text file, non-zipped) bugreports are deprecated.\n");
fprintf(stderr, "WARNING: Please generate zipped bugreports instead.\n");
fprintf(stderr, "WARNING: On the host use: adb bugreport filename.zip\n");
- fprintf(stderr, "WARNING: On the device use: bugreportz filename.zip\n");
+ fprintf(stderr, "WARNING: On the device use: bugreportz\n");
+ fprintf(stderr, "WARNING: bugreportz will output the filename to use with adb pull.\n");
fprintf(stderr, "=============================================================================\n\n\n");
if (argc != 1) {