Streaming bugreport content to stdout 1/2

Add a -s option to bugreportz to support streaming data.

Bug: 162910469
Test: adb bugreport --stream > test.txt
Test: adb shell bugreportz -s > test2.txt
Test: atest dumpstate_test
Test: atest bugreportz_test

Change-Id: I33d68bf742c92a7359a925838827a0033ee68658
diff --git a/cmds/bugreportz/bugreportz.h b/cmds/bugreportz/bugreportz.h
index 7af289b..cdeceae 100644
--- a/cmds/bugreportz/bugreportz.h
+++ b/cmds/bugreportz/bugreportz.h
@@ -19,4 +19,8 @@
 // Ownership of the socket is not transferred.
 int bugreportz(int s, bool show_progress);
 
+// Calls dumpstate using the given socket and write the file content to stdout
+// instead of file location. Ownership of the socket is not transferred.
+int bugreportz_stream(int s);
+
 #endif  // BUGREPORTZ_H