Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9397bb94 authored by Colin Cross's avatar Colin Cross Committed by Android (Google) Code Review
Browse files

Merge "Allow BoardConfig.mk to define an extension to dumpstate"

parents 464b431a 1e9f56cf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)
+12 −0
Original line number Diff line number Diff line
@@ -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() {
+4 −0
Original line number Diff line number Diff line
@@ -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_ */