MTK关闭调试口的日志输出功能

1.在system/core/rootdir/init.rc关闭uart服务2

#service console /system/bin/sh
#    class core
#   console
#    disabled
#    user shell
#    group shell log readproc
#   seclabel u:r:shell:s0

#on property:ro.debuggable=1
     # Give writes to anyone for the trace folder on debug builds.
     # The folder is used to store method traces.
#    chmod 0773 /data/misc/trace
#    start console

2.在vendor/mediatek/proprietary/bootable/bootloader/lk/app/mt_boot/mt_boot.c关闭相应编译版本输出

BUILD_TYPE_USER:
-  cmdline_append("printk.disable_uart=0");
+  cmdline_append("printk.disable_uart=1");

BUILD_TYPE_USERDEBUG:
-  cmdline_append("printk.disable_uart=0");
+  cmdline_append("printk.disable_uart=1");

BUILD_TYPE_ENG:
-  cmdline_append("printk.disable_uart=0 ddebug_query=\"file *mediatek* +p ; file *gpu* =_\"");
+  cmdline_append("printk.disable_uart=1 ddebug_query=\"file *mediatek* +p ; file *gpu* =_\"");

 

你可能感兴趣的:(MTK,Android)