From 24a46b2f32ef6c3135ce31fb8624242ef4bb5373 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Fri, 14 Feb 2014 11:56:31 +0100 Subject: [PATCH 1/2] Additional /dev/log -> /dev/alog changes Change-Id: I71dfc8df537ee4ce2f15c8d376b89af78f01d337 --- adb/log_service.c | 2 +- debuggerd/tombstone.c | 4 ++-- liblog/fake_log_device.c | 7 ++++--- rootdir/ueventd.rc | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/adb/log_service.c b/adb/log_service.c index 6e9bdeee650..24fbb041a10 100644 --- a/adb/log_service.c +++ b/adb/log_service.c @@ -26,7 +26,7 @@ #include "sysdeps.h" #include "adb.h" -#define LOG_FILE_DIR "/dev/log/" +#define LOG_FILE_DIR "/dev/alog/" void write_log_entry(int fd, struct logger_entry *buf); diff --git a/debuggerd/tombstone.c b/debuggerd/tombstone.c index 592f4f2ec22..d01b69b52b8 100644 --- a/debuggerd/tombstone.c +++ b/debuggerd/tombstone.c @@ -590,8 +590,8 @@ static void dump_log_file(log_t* log, pid_t pid, const char* filename, */ static void dump_logs(log_t* log, pid_t pid, bool tailOnly) { - dump_log_file(log, pid, "/dev/log/system", tailOnly); - dump_log_file(log, pid, "/dev/log/main", tailOnly); + dump_log_file(log, pid, "/dev/alog/system", tailOnly); + dump_log_file(log, pid, "/dev/alog/main", tailOnly); } /* diff --git a/liblog/fake_log_device.c b/liblog/fake_log_device.c index df4329921bb..d044e59f1f5 100644 --- a/liblog/fake_log_device.c +++ b/liblog/fake_log_device.c @@ -176,12 +176,13 @@ static void deleteFakeFd(int fd) */ static void configureInitialState(const char* pathName, LogState* logState) { - static const int kDevLogLen = sizeof("/dev/log/") - 1; - logState->debugName = strdup(pathName); /* identify binary logs */ - if (strcmp(pathName + kDevLogLen, "events") == 0) { + // XXX hybris: Just in case we end up here with some app + // passing in /dev/log/ instead of /dev/alog/, compare both + if (strcmp(pathName, "/dev/log/events") == 0 || + strcmp(pathName, "/dev/alog/events") == 0) { logState->isBinary = 1; } diff --git a/rootdir/ueventd.rc b/rootdir/ueventd.rc index cee3e73eee3..ecaa1abdb4f 100644 --- a/rootdir/ueventd.rc +++ b/rootdir/ueventd.rc @@ -10,7 +10,7 @@ # Anyone can read the logs, but if they're not in the "logs" # group, then they'll only see log entries for their UID. -/dev/log/* 0666 root log +/dev/alog/* 0666 root log # the msm hw3d client device node is world writable/readable. /dev/msm_hw3dc 0666 root root From d3e9406eb9427ed3d102ab4ff96760b9c7461787 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Fri, 14 Feb 2014 12:39:32 +0100 Subject: [PATCH 2/2] Disable printing "A N D R O I D" on the console Change-Id: Iacb5babd7bb7f41cb992fb992dbffbd3d8192ad8 --- init/init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init/init.c b/init/init.c index 3f6f51471fa..ee19d868cc0 100755 --- a/init/init.c +++ b/init/init.c @@ -598,6 +598,8 @@ static int console_init_action(int nargs, char **args) have_console = 1; close(fd); + // mer-hybris: Don't pollute the console +#if 0 if( load_565rle_image(INIT_IMAGE_FILE) ) { fd = open("/dev/tty0", O_WRONLY); if (fd >= 0) { @@ -621,6 +623,8 @@ static int console_init_action(int nargs, char **args) close(fd); } } +#endif + return 0; }