不能识别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;

}

相关推荐
帅次1 分钟前
Android 高级工程师面试:Flow 与状态流 近1年高频追问 22 题
android·面试·职场和发展
雨季余静4 分钟前
RustDesk Android APK 从零编译全步骤
android
辰合软件23 分钟前
通达OA目录结构与核心文件解析
android·数据库·oracle
通玄27 分钟前
Jetpack Compose 入门系列(八):Compose 中的副作用处理
android
流氓也是种气质 _Cookie1 小时前
如何创建MCP
android·adb
Kapaseker1 小时前
扶我起来,Compose Styles API 进阶
android·kotlin
亘元有量-流量变现2 小时前
内外联动精细化运营:解锁安卓APP推广降本增效新路径
android·用户运营·aso优化·亘元有量·方糖试玩
nVisual2 小时前
nVisual:AI驱动的智能排障,平均响应时间缩短40%
android·人工智能·缓存
阿pin2 小时前
Android随笔-神经系统Handler
android·java·开发语言·handler
机智的张尼玛16 小时前
我基于 Kotlin Multiplatform 实现了一套跨平台的弱网离线同步引擎
android·开源·kotlin