Skip to content

support logcat binary #9

@prife

Description

@prife
image

reference: https://cs.android.com/android/platform/superproject/main/+/main:system/logging/liblog/include/log/log_read.h

前面1C个字符(28个)是header,结构如下

struct logger_entry {
uint16_t len; /* length of the payload /
uint16_t hdr_size; /
sizeof(struct logger_entry) /
int32_t pid; /
generating process's pid /
uint32_t tid; /
generating process's tid /
uint32_t sec; /
seconds since Epoch /
uint32_t nsec; /
nanoseconds /
uint32_t lid; /
log id of the payload, bottom 4 bits currently /
uint32_t uid; /
generating process's uid */
};

随后是1个字节的loglevel。接下来是payload,长度为header的前4个字节表示。

在这篇官方的协议文档中进一步做了说明。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions