[高通SDM450][Android9.0]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 := true
 else # !enable_target_debugging
   # Target is less debuggable and adbd is off by default
-  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=0
+  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1
 endif # !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/sh
     seclabel u:r:shell:s0
     setenv 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/trace

diff --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=y
 CONFIG_TOUCHSCREEN_GSL1680=y
 CONFIG_MYGPIO_TEST=y
 
+CONFIG_SERIAL_MSM_HSL=y
+CONFIG_SERIAL_MSM_HSL_CONSOLE=y
+CONFIG_SERIAL_MSM=y
+CONFIG_SERIAL_MSM_CONSOLE=y
 
 
diff --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=y
 CONFIG_TOUCHSCREEN_GSL1680=y
 CONFIG_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 configuration
     chown 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值