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

}

相关推荐
2601_949543017 小时前
Flutter for OpenHarmony垃圾分类指南App实战:主题配置实现
android·flutter
2601_949833399 小时前
flutter_for_openharmony口腔护理app实战+知识实现
android·javascript·flutter
晚霞的不甘9 小时前
Flutter for OpenHarmony从基础到专业:深度解析新版番茄钟的倒计时优化
android·flutter·ui·正则表达式·前端框架·鸿蒙
鸟儿不吃草9 小时前
android的Retrofit请求https://192.168.43.73:8080/报错:Handshake failed
android·retrofit
Minilinux20189 小时前
Android音频系列(09)-AudioPolicyManager代码解析
android·音视频·apm·audiopolicy·音频策略
李子红了时9 小时前
【无标题】
android
Android系统攻城狮11 小时前
Android tinyalsa深度解析之pcm_close调用流程与实战(一百零四)
android·pcm·tinyalsa·音频进阶·音频性能实战·android hal
weixin_4111918411 小时前
LifecycleEventObserver和DefaultLifecycleObserver使用
android
、BeYourself11 小时前
Intent :跳转与数据传递的正确打开方式
android·android-studio
灵感菇_11 小时前
Android 列表控件全面解析:ListView 与 RecyclerView
android·ui