Android系统的一些杂散知识点

1 修改Android源码默认的out目录

  1. 修改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
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小馬佩德罗

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值