summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmds/dumpstate/Android.mk5
-rw-r--r--cmds/dumpstate/dumpstate.c12
-rw-r--r--cmds/dumpstate/dumpstate.h4
3 files changed, 21 insertions, 0 deletions
diff --git a/cmds/dumpstate/Android.mk b/cmds/dumpstate/Android.mk
index 56f1324..d602500 100644
--- a/cmds/dumpstate/Android.mk
+++ b/cmds/dumpstate/Android.mk
@@ -11,4 +11,9 @@ LOCAL_MODULE := dumpstate
LOCAL_SHARED_LIBRARIES := libcutils
+ifdef BOARD_LIB_DUMPSTATE
+LOCAL_STATIC_LIBRARIES := $(BOARD_LIB_DUMPSTATE)
+LOCAL_CFLAGS += -DBOARD_HAS_DUMPSTATE
+endif
+
include $(BUILD_EXECUTABLE)
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 42c35af..4926db2 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -197,6 +197,15 @@ static void dumpstate() {
dump_file(NULL, "/sys/class/leds/lcd-backlight/registers");
printf("\n");
+#ifdef BOARD_HAS_DUMPSTATE
+ printf("========================================================\n");
+ printf("== Board\n");
+ printf("========================================================\n");
+
+ dumpstate_board();
+ printf("\n");
+#endif
+
printf("========================================================\n");
printf("== Android Framework Services\n");
printf("========================================================\n");
@@ -218,6 +227,9 @@ static void dumpstate() {
run_command("APP SERVICES", 30, "dumpsys", "activity", "service", "all", NULL);
+ printf("========================================================\n");
+ printf("== dumpstate: done\n");
+ printf("========================================================\n");
}
static void usage() {
diff --git a/cmds/dumpstate/dumpstate.h b/cmds/dumpstate/dumpstate.h
index 83b1d11..597ab1f 100644
--- a/cmds/dumpstate/dumpstate.h
+++ b/cmds/dumpstate/dumpstate.h
@@ -19,6 +19,7 @@
#include <time.h>
#include <unistd.h>
+#include <stdio.h>
/* prints the contents of a file */
int dump_file(const char *title, const char* path);
@@ -47,4 +48,7 @@ void show_wchan(int pid, const char *name);
/* Play a sound via Stagefright */
void play_sound(const char* path);
+/* Implemented by libdumpstate_board to dump board-specific info */
+void dumpstate_board();
+
#endif /* _DUMPSTATE_H_ */