[RK3288][Android6.0] 调试笔记 --- user版本串口只有输出不能输入

Platform: ROCKCHIP
OS: Android 6.0
Kernel: 3.10.92

现象:
编译成user版本之后串口只有输出没有输入.

原因:
编译user版本之后 ro.debuggable=0
build/core/main.mk:
ifeq (true,$(strip $(enable_target_debugging)))
  # Target is more debuggable and adbd is on by default
  ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1
  # Enable Dalvik lock contention logging.
  ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.lockprof.threshold=500
  # Include the debugging/testing OTA keys in this build.
  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
endif # !enable_target_debugging

system/core/rootdir/init.rc
service console /system/bin/sh
    class core
    console
    disabled
    user shell
    group shell log
    seclabel u:r:shell:s0

on property:ro.debuggable=1
    start console

可见console是否启动受属性ro.debuggable的控制.

解决方法:
1. 修改 ro.debuggable = 1

2. 直接将disabled移除,默认无条件启动console.


参考:

http://blog.csdn.net/buaaroid/article/details/32714041

你可能感兴趣的:(子类__UART)