Adds all tombstone files when writing to zipped file.
Currently, a bugreport simply cats any tombstone file modified in the
last half an hour into the bugreport. This is a problem since the
tombstones contain a lot of really valuable information, and sometimes
users don't get a bugreport in this time frame. In addition, some of our
monkey testing has the same problem.
Since now dumpstate can create a zip file, we can include all directly
on it, although still using the old mechanism when it's creating it (for example, when invoked through 'adb bugreport').
BUG: 25974224
Change-Id: Ie29fd7d91953d91232b0db1c9588043aee13f93e
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index 1719090..0a9f9e2 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -64,7 +64,7 @@
static const int WEIGHT_FILE = 5;
/*
- * TOOD: the dumpstate internal state is getting fragile; for example, this variable is defined
+ * TODO: the dumpstate internal state is getting fragile; for example, this variable is defined
* here, declared at utils.cpp, and used on utils.cpp and dumpstate.cpp.
* It would be better to take advantage of the C++ migration and encapsulate the state in an object,
* but that will be better handled in a major C++ refactoring, which would also get rid of other C
@@ -142,6 +142,15 @@
/* Takes a screenshot and save it to the given file */
void take_screenshot(const std::string& path);
+/* Vibrates for a given durating (in milliseconds). */
+void vibrate(FILE* vibrator, int ms);
+
+/* Checks if a given path is a directory. */
+bool is_dir(const char* pathname);
+
+/** Gets the last modification time of a file, or default time if file is not found. */
+time_t get_mtime(int fd, time_t default_mtime);
+
/* dump eMMC Extended CSD data */
void dump_emmc_ecsd(const char *ext_csd_path);