文章目录
- 开发平台基本信息
- 问题描述
- 解决方法
- user版本调试串口可输入
- user版本uartlog常开
开发平台基本信息
芯片: SDM450
版本: Android 9.0
kernel: msm-4.9
问题描述
- user版本调试串口默认只输入调试信息,无法输入指令
- user版本,调试串口日志在开机进入ui后不是常开的,并且日志等级较低,导致部分调试串口日志无法抓取,很难定位问题
解决方法
user版本调试串口可输入
diff --git a/build/core/main.mk b/build/core/main.mk
index c35a463..2832b36 100644
--- a/build/core/main.mk
+++ b/build/core/main.mk
@@ -446,7 +446,7 @@ ifeq (true,$(strip $(enable_target_debugging)))INCLUDE_TEST_OTA_KEYS := trueelse # !enable_target_debugging# Target is less debuggable and adbd is off by default
- ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0
+ ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1endif # !enable_target_debugging## eng ##
user版本uartlog常开
diff --git a/system/core/rootdir/init.rc b/system/core/rootdir/init.rc
index 14acacf..059ec23 100755
--- a/system/core/rootdir/init.rc
+++ b/system/core/rootdir/init.rc
@@ -777,7 +777,7 @@ service console /system/bin/shseclabel u:r:shell:s0setenv HOSTNAME console-on property:ro.debuggable=1
+on property:ro.debuggable=0# Give writes to anyone for the trace folder on debug builds.# The folder is used to store method traces.chmod 0773 /data/misc/tracediff --git a/kernel/msm-4.9/arch/arm64/configs/msm8953-perf_defconfig b/kernel/msm-4.9/arch/arm64/configs/msm8953-perf_defconfig
index 9eaa44b..d3c9a22 100755
--- a/kernel/msm-4.9/arch/arm64/configs/msm8953-perf_defconfig
+++ b/kernel/msm-4.9/arch/arm64/configs/msm8953-perf_defconfig
@@ -694,5 +694,9 @@ CONFIG_QMI_ENCDEC=yCONFIG_TOUCHSCREEN_GSL1680=yCONFIG_MYGPIO_TEST=y+CONFIG_SERIAL_MSM_HSL=y
+CONFIG_SERIAL_MSM_HSL_CONSOLE=y
+CONFIG_SERIAL_MSM=y
+CONFIG_SERIAL_MSM_CONSOLE=ydiff --git a/kernel/msm-4.9/arch/arm64/configs/msm8953_defconfig b/kernel/msm-4.9/arch/arm64/configs/msm8953_defconfig
index 82f225a..e2fa86d 100755
--- a/kernel/msm-4.9/arch/arm64/configs/msm8953_defconfig
+++ b/kernel/msm-4.9/arch/arm64/configs/msm8953_defconfig
@@ -760,4 +760,6 @@ CONFIG_QMI_ENCDEC=yCONFIG_TOUCHSCREEN_GSL1680=yCONFIG_MYGPIO_TEST=y+CONFIG_SERIAL_MSM_HSL=y
+CONFIG_SERIAL_MSM_HSL_CONSOLE=y########### 提高log等级
diff --git a/device/qcom/common/rootdir/etc/init.qcom.rc b/device/qcom/common/rootdir/etc/init.qcom.rc
index cc47ba6..73c5466 100755
--- a/device/qcom/common/rootdir/etc/init.qcom.rc
+++ b/device/qcom/common/rootdir/etc/init.qcom.rc
@@ -191,7 +191,7 @@ on boot# Set the console loglevel to < KERN_INFO# Set the default message loglevel to KERN_INFO
- write /proc/sys/kernel/printk "6 6 1 7"
+ write /proc/sys/kernel/printk "8 8 8 8"# Allow access for CCID command/response timeout configurationchown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
diff --git a/device/qcom/common/rootdir/etc/init.qcom.sh b/device/qcom/common/rootdir/etc/init.qcom.sh
old mode 100644
new mode 100755
index 01d95df..f1aac34
--- a/device/qcom/common/rootdir/etc/init.qcom.sh
+++ b/device/qcom/common/rootdir/etc/init.qcom.sh
@@ -426,10 +426,10 @@ buildvariant=`getprop ro.build.type`case "$buildvariant" in"userdebug" | "eng")#set default loglevel to KERN_INFO
- echo "6 6 1 7" > /proc/sys/kernel/printk
+ echo "8 8 8 8" > /proc/sys/kernel/printk;;*)#set default loglevel to KERN_WARNING
- echo "4 4 1 4" > /proc/sys/kernel/printk
+ echo "8 8 8 8" > /proc/sys/kernel/printk;;esac