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

}

相关推荐
骑驴看星星a15 小时前
【Three.js--manual script】4.光照
android·开发语言·javascript
TDengine (老段)21 小时前
TDengine 字符串函数 CONCAT_WS 用户手册
android·大数据·数据库·时序数据库·tdengine·涛思数据
会跑的兔子1 天前
Android 16 Kotlin协程 第一部分
android·开发语言·kotlin
颜大哦1 天前
linux安装mysql
linux·运维·mysql·adb
Meteors.1 天前
安卓进阶——OpenGL ES
android
椰羊sqrt1 天前
CVE-2025-4334 深度分析:WordPress wp-registration 插件权限提升漏洞
android·开发语言·okhttp·网络安全
2501_916008891 天前
金融类 App 加密加固方法,多工具组合的工程化实践(金融级别/IPA 加固/无源码落地/Ipa Guard + 流水线)
android·ios·金融·小程序·uni-app·iphone·webview
sun0077001 天前
Android设备推送traceroute命令
android
来来走走1 天前
Android开发(Kotlin) 高阶函数、内联函数
android·开发语言·kotlin
2501_915921431 天前
Fastlane 结合 开心上架(Appuploader)命令行版本实现跨平台上传发布 iOS App 免 Mac 自动化上架实战全解析
android·macos·ios·小程序·uni-app·自动化·iphone