不能识别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 小时前
从声音特征到 CRM 回流:闪电智能 Voice Agent 沟通策略自适应系统 v1 实战
android·人工智能·python·音视频·语音识别
一笑的小酒馆4 小时前
Android视频直播播放器简单封装
android
工会代表6 小时前
安卓手机搭建SOCKS5代理教程
android
雨白6 小时前
Android AOP 切面编程实战:优雅地处理全局断网拦截
android·架构
huluang8 小时前
专业级安卓现场取证利器:拍照取证(PaiZaoXue),补齐行业取证工具核心短板
android·数码相机
奇特認8 小时前
MySQL集群技术 4.高可用之组复制 (MGR)
android
阿pin8 小时前
Android随笔-SurfaceFlinger
android·surfaceflinger
洋不写bug8 小时前
JavaComparable、Comparator、Cloneable接口解析,深拷贝浅拷贝详细解析
android·java·开发语言
小孔龙9 小时前
Android 应用间 UI 刷新与合成
android
XiaoLeisj10 小时前
Kotlin Flow:冷流收集、并行订阅、emit 推送、delay 延迟、collect 全量收集与 collectLatest 的实时数据处理
android·kotlin·android jetpack·协程·flow