Add support for proto dumps in dumpstate
- Call dumpsys library directly from dumpstate.
- Send section generation status (name, size and duration) via section
progress reporter.
- Add end to end smoke test for bugreport:
- Checks if zipped bug report was generated without errors within a
reasonable time of a reasonable size.
- Checks if zipped bug report contains version file, main entry and
some selected files from the device file system.
- Checks if all sections in the bug report were generated without
errors.
- Checks if some sections were generated with a reasonable size.
- Changes are gated by Bugreport version. Version will be updated in a
subsequent cl.
Bug: 67716082, 70154685
Test: Manually generate bugrepot (default version) and check for any issues
Test: mmm -j56 frameworks/native/cmds/dumpstate && \
adb shell setprop dumpstate.version "2.0-dev-priority-dumps" && \
adb sync data && adb shell /data/nativetest/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_smoke_test/dumpstate_smoke_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"
Change-Id: If036699d0588f74ef8e84c56323126214857dbdd
diff --git a/cmds/dumpsys/dumpsys.h b/cmds/dumpsys/dumpsys.h
index 1d78aa4..84f3b02 100644
--- a/cmds/dumpsys/dumpsys.h
+++ b/cmds/dumpsys/dumpsys.h
@@ -49,7 +49,7 @@
* @param priorityFlags indicates priority of dump by passing additional priority args
* to the service
*/
- void setServiceArgs(Vector<String16>& args, bool asProto, int priorityFlags) const;
+ static void setServiceArgs(Vector<String16>& args, bool asProto, int priorityFlags);
/**
* Starts a thread to connect to a service and get its dump output. The thread redirects