You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*
* Native log reading interface section. See logcat for sample code.
*
* The preferred API is an exec of logcat. Likely uses of this interface
* are if native code suffers from exec or filtration being too costly,
* access to raw information, or parsing is an issue.
*/
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个字节表示。
在这篇官方的协议文档中进一步做了说明。
The text was updated successfully, but these errors were encountered: