1. 程式人生 > >android user 版本如何預設adb除錯為開啟

android user 版本如何預設adb除錯為開啟

A. 軟體準備
user版本需要先開啟USB debug開關,開啟方式如下:
1、開啟usb除錯 build/core/main.mk
請將user版本下也改為ro.debuggable = 1

ifeq (true,(strip(enable_target_debugging)))
# Target is more debuggable and adbd is on by default
ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1
# 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=1 //這邊改成1
endif # !enable_target_debugging

2、關閉授權框提示 device/sprd/scx35/device.mk
這個ro.adb.secure=0(0為不顯示信任此電腦,1為顯示信任此電腦)

開啟後全編譯版本

B. 硬體準備
需要飛線,找硬體從TX接線出來,飛線成功後用SecureCRT工具抓取uart log
配置方法參考:
首先安裝SecureCRT軟體和相對應的工具,之後開啟SecureCRT,點選file–>Quick Connect
相關設定項如下:
Protocol 為Serial
Port 為計算機中的埠:比如COM23
Baud rate 要選為115200
Data bits 為8
Parity 為None
Stop bits 為1
Show quick connect on star 不勾選
其餘均為預設
點選connect 就可以連線了