改code方式修改logcat buffer size
比如加在device下的device.mk里:
PRODUCT_PROPERTY_OVERRIDES += \ ro.logd.size=5M
设置各种buffer size(main/system/crash)
system/core/logd/LogBuffer.cpp
void LogBuffer::init() { log_id_for_each(i) { mLastSet[i] = false; mLast[i] = mLogElements.begin(); if (setSize(i, __android_logger_get_buffer_size(i))) { setSize(i, LOG_BUFFER_MIN_SIZE); } }
138 typedef enum log_id { 139 LOG_ID_MIN = 0, 140 141 /** The main log buffer. This is the only log buffer available to apps. */ 142 LOG_ID_MAIN = 0, 143 /** The radio log buffer. */ 144 LOG_ID_RADIO = 1, 145 /** The event log buffer. */ 146 LOG_ID_EVENTS = 2, 147 /** The system log buffer. */ 148 LOG_ID_SYSTEM = 3, 149 /** The crash log buffer. */ 150 LOG_ID_CRASH = 4, 151 /** The statistics log buffer. */ 152 LOG_ID_STATS = 5, 153 /** The security log buffer. */ 154 LOG_ID_SECURITY = 6, 155 /** The kernel log buffer. */ 156 LOG_ID_KERNEL = 7, 157 158 LOG_ID_MAX, 159 160 /** Let the logging function choose the best log target. */ 161 LOG_ID_DEFAULT = 0x7FFFFFFF 162 } log_id_t;
标签:tmp,log,buffer,LOG,system,ID,size From: https://www.cnblogs.com/aspirs/p/17112702.html