Loading cmds/dumpstate/Android.mk +1 −1 Original line number Original line Diff line number Diff line Loading @@ -14,7 +14,7 @@ LOCAL_SRC_FILES := dumpstate.cpp utils.cpp LOCAL_MODULE := dumpstate LOCAL_MODULE := dumpstate LOCAL_SHARED_LIBRARIES := libcutils liblog libselinux libbase LOCAL_SHARED_LIBRARIES := libcutils liblog libselinux libbase libhardware_legacy # ZipArchive support, the order matters here to get all symbols. # ZipArchive support, the order matters here to get all symbols. LOCAL_STATIC_LIBRARIES := libziparchive libz libmincrypt LOCAL_STATIC_LIBRARIES := libziparchive libz libmincrypt LOCAL_HAL_STATIC_LIBRARIES := libdumpstate LOCAL_HAL_STATIC_LIBRARIES := libdumpstate Loading cmds/dumpstate/dumpstate.cpp +9 −0 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include <android-base/stringprintf.h> #include <android-base/stringprintf.h> #include <android-base/file.h> #include <android-base/file.h> #include <cutils/properties.h> #include <cutils/properties.h> #include <hardware_legacy/power.h> #include "private/android_filesystem_config.h" #include "private/android_filesystem_config.h" Loading Loading @@ -82,6 +83,7 @@ static std::string suffix; #define TOMBSTONE_MAX_LEN (sizeof(TOMBSTONE_FILE_PREFIX) + 4) #define TOMBSTONE_MAX_LEN (sizeof(TOMBSTONE_FILE_PREFIX) + 4) #define NUM_TOMBSTONES 10 #define NUM_TOMBSTONES 10 #define WLUTIL "/vendor/xbin/wlutil" #define WLUTIL "/vendor/xbin/wlutil" #define WAKE_LOCK_NAME "dumpstate_wakelock" typedef struct { typedef struct { char name[TOMBSTONE_MAX_LEN]; char name[TOMBSTONE_MAX_LEN]; Loading Loading @@ -1198,6 +1200,10 @@ static std::string SHA256_file_hash(std::string filepath) { return std::string(hash_buffer); return std::string(hash_buffer); } } static void wake_lock_releaser() { release_wake_lock(WAKE_LOCK_NAME); } int main(int argc, char *argv[]) { int main(int argc, char *argv[]) { struct sigaction sigact; struct sigaction sigact; int do_add_date = 0; int do_add_date = 0; Loading @@ -1216,6 +1222,9 @@ int main(int argc, char *argv[]) { MYLOGI("begin\n"); MYLOGI("begin\n"); acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_NAME); atexit(wake_lock_releaser); /* gets the sequential id */ /* gets the sequential id */ char last_id[PROPERTY_VALUE_MAX]; char last_id[PROPERTY_VALUE_MAX]; property_get("dumpstate.last_id", last_id, "0"); property_get("dumpstate.last_id", last_id, "0"); Loading Loading
cmds/dumpstate/Android.mk +1 −1 Original line number Original line Diff line number Diff line Loading @@ -14,7 +14,7 @@ LOCAL_SRC_FILES := dumpstate.cpp utils.cpp LOCAL_MODULE := dumpstate LOCAL_MODULE := dumpstate LOCAL_SHARED_LIBRARIES := libcutils liblog libselinux libbase LOCAL_SHARED_LIBRARIES := libcutils liblog libselinux libbase libhardware_legacy # ZipArchive support, the order matters here to get all symbols. # ZipArchive support, the order matters here to get all symbols. LOCAL_STATIC_LIBRARIES := libziparchive libz libmincrypt LOCAL_STATIC_LIBRARIES := libziparchive libz libmincrypt LOCAL_HAL_STATIC_LIBRARIES := libdumpstate LOCAL_HAL_STATIC_LIBRARIES := libdumpstate Loading
cmds/dumpstate/dumpstate.cpp +9 −0 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include <android-base/stringprintf.h> #include <android-base/stringprintf.h> #include <android-base/file.h> #include <android-base/file.h> #include <cutils/properties.h> #include <cutils/properties.h> #include <hardware_legacy/power.h> #include "private/android_filesystem_config.h" #include "private/android_filesystem_config.h" Loading Loading @@ -82,6 +83,7 @@ static std::string suffix; #define TOMBSTONE_MAX_LEN (sizeof(TOMBSTONE_FILE_PREFIX) + 4) #define TOMBSTONE_MAX_LEN (sizeof(TOMBSTONE_FILE_PREFIX) + 4) #define NUM_TOMBSTONES 10 #define NUM_TOMBSTONES 10 #define WLUTIL "/vendor/xbin/wlutil" #define WLUTIL "/vendor/xbin/wlutil" #define WAKE_LOCK_NAME "dumpstate_wakelock" typedef struct { typedef struct { char name[TOMBSTONE_MAX_LEN]; char name[TOMBSTONE_MAX_LEN]; Loading Loading @@ -1198,6 +1200,10 @@ static std::string SHA256_file_hash(std::string filepath) { return std::string(hash_buffer); return std::string(hash_buffer); } } static void wake_lock_releaser() { release_wake_lock(WAKE_LOCK_NAME); } int main(int argc, char *argv[]) { int main(int argc, char *argv[]) { struct sigaction sigact; struct sigaction sigact; int do_add_date = 0; int do_add_date = 0; Loading @@ -1216,6 +1222,9 @@ int main(int argc, char *argv[]) { MYLOGI("begin\n"); MYLOGI("begin\n"); acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_NAME); atexit(wake_lock_releaser); /* gets the sequential id */ /* gets the sequential id */ char last_id[PROPERTY_VALUE_MAX]; char last_id[PROPERTY_VALUE_MAX]; property_get("dumpstate.last_id", last_id, "0"); property_get("dumpstate.last_id", last_id, "0"); Loading