1 修改Android源码默认的out目录
- 修改build/core/envsetup.mk
# figure out the output directories
#在这添加你要修改的新out目录即可
OUT_DIR=/dev/shm/out_mxr
ifeq (,$(strip $(OUT_DIR)))
ifeq (,$(strip $(OUT_DIR_COMMON_BASE)))
OUT_DIR := $(TOPDIR)out
else
OUT_DIR := $(OUT_DIR_COMMON_BASE)/$(notdir $(PWD))
endif
endif
2 系统编译时发生错误error: ro.bootimage.build.fingerprint cannot exceed 91 bytes:
diff --git a/tools/post_process_props.py b/tools/post_process_props.py
index 2237707..df13699 100755
--- a/tools/post_process_props.py
+++ b/tools/post_process_props.py
@@ -23,7 +23,7 @@ import sys
# The constants in system_properties.h includes the termination NUL,
# so we decrease the values by 1 here.
PROP_NAME_MAX = 32
-PROP_VALUE_MAX = 91
+PROP_VALUE_MAX = 149
2 查看设备内app版本信息及其他
dumpsys package 包名
3 修改Log缓存区大小
安卓8.1 默认日志缓冲大小为64K,当前系统打印的日志比较多时,就容易把前面的日志冲掉,或者出现Unexpected EOF错误。导致抓取的日志经常是无效的。
为了提高抓日志的效率,需要把日志缓冲区大小设置更大一点。
分析设置开发者模式的日志大小设置界面 — DevelopmentSettings,可以知道日志缓冲大小修改后,都会修改属性值persist.logd.size。
因此尝试在开机时就把persist.logd.size配置为4M,
PRODUCT_PROPERTY_OVERRIDES += \
persist.logd.size=4194304
通过adb logcat -g 可以知道已成功配置为4M。
F:\>adb logcat -g
main: ring buffer is 4Mb (1Mb consumed), max entry is 5120b, max payload is 4068b
system: ring buffer is 4Mb (143Kb consumed), max entry is 5120b, max payload is 4068b
crash: ring buffer is 4Mb (0b consumed), max entry is 5120b, max payload is 4068b