不能识别adb/usb口记录

  1. 插上usb线没有充电图标 也不能识别usb

一般都出现在设备重启之后.

充电芯片加载失败.

./AP_Logs/APLog_0002_2025_1010_0434/boot.last/logcat_all.log:02-04 21:07:43.206 494 494 E sc8960x-charger 0-006b : sc8960x read field 52 fail: -107

./AP_Logs/APLog_0002_2025_1010_0434/boot.last/logcat_all.log:02-04 21:07:43.225 494 494 E sc8960x-charger 0-006b : read device version failed(-107)

./AP_Logs/APLog_0002_2025_1010_0434/boot.last/logcat_all.log:02-04 21:07:43.251 494 494 I sc8960x-charger 0-006b: sc8960x prob failed

2 .插上usb线有充电图标 也不能识别usb

//从日志上推测

ro.boot.bootreason\]: \[reboot,shell

//开机动画完成

10-14 14:41:56.131 2025 2116 I wm_boot_animation_done: 21081

//adb 就出现了问题

10-14 14:41:56.746 1852 2799 W adbd : timed out while waiting for FUNCTIONFS_BIND , trying again

//猜测脚本中断了,人工拔插USB线。 中断时间在大概7分钟

Tue Oct 14 19:48:44 2025\] sc8960x-charger 0-006b: **sc8960x_plug_out**

查看代码:

上层adbd 无法收到通讯。

packages/modules/adb/daemon/usb.cpp

monitor_thread_ = std::thread([this]() {

adb_thread_setname("UsbFfs-monitor");

LOG(INFO) << "UsbFfs-monitor thread spawned";

bool bound = false;

bool enabled = false;

bool running = true;

while (running) {

adb_pollfd pfd [2] = {

{ .fd = control_fd_.get(), .events = POLLIN, .revents = 0 },

{ .fd = monitor_event_fd_.get(), .events = POLLIN, .revents = 0 },

};

// If we don't see our first bind within a second, try again.

int timeout_ms = bound ? -1 : 1000;

int rc = TEMP_FAILURE_RETRY(adb_poll (pfd , 2, timeout_ms));

if (rc == -1) {

PLOG(FATAL) << "poll on USB control fd failed";

} else if (rc == 0) {

//一直得到不到通讯.

LOG(WARNING) << "timed out while waiting for FUNCTIONFS_BIND, trying again ";

break;

}

相关推荐
饭小猿人2 小时前
Android 腾讯X5WebView如何禁止系统自带剪切板和自定义剪切板视图
android·java
_李小白3 小时前
【android opencv学习笔记】Day 8: remap(像素位置重映射)
android·opencv·学习
美狐美颜SDK开放平台3 小时前
多场景美颜SDK解决方案:直播APP(iOS/安卓)开发接入详解
android·人工智能·ios·音视频·美颜sdk·第三方美颜sdk·短视频美颜sdk
嗷o嗷o3 小时前
Android BLE 里,MTU、分包和长数据发送到底该怎么处理
android
qq_283720054 小时前
Python3 模块精讲:pymysql(第三方)- 连接 MySQL
mysql·adb·pymysql
Gary Studio5 小时前
Android AIDL HAL工程结构示例
android
y = xⁿ5 小时前
MySQL八股知识合集
android·mysql·adb
andr_gale6 小时前
04_rc文件语法规则
android·framework·aosp
一只小白菜6 小时前
macOS MySQL 简易操作手册(基于 zsh + MySQL 8.0.24)
adb