当前位置: 代码迷 >> 综合 >> adb remount 报错:Binder ioctl to enable oneway spam detection failed: Invalid argument
  详细解决方案

adb remount 报错:Binder ioctl to enable oneway spam detection failed: Invalid argument

热度:55   发布时间:2023-12-25 00:04:53.0

问题

执行 adb remount 时提示 failed

$ adb root
restarting adbd as root

$ adb remount
Binder ioctl to enable oneway spam detection failed: Invalid argument
remount succeeded

分析

AOSP S 中 ProcessState.cpp 包含该报错信息,可以查看以下两个文件:

  • /system/libhwbinder/ProcessState.cpp (aospxref.com)
  • /frameworks/native/libs/binder/ProcessState.cpp (aospxref.com)
status_t ProcessState::enableOnewaySpamDetection(bool enable) {uint32_t enableDetection = enable ? 1 : 0;if (ioctl(mDriverFD, BINDER_ENABLE_ONEWAY_SPAM_DETECTION, &enableDetection) == -1) {ALOGI("Binder ioctl to enable oneway spam detection failed: %s", strerror(errno));return -errno;}return NO_ERROR;
}

 总结

1. 这个 remount (enableOnewaySpamDetection)的问题是在S(Android 12)才开始加入的。

2. 虽然 "enable oneway spam detection" 报错,但是不影响 remount 成功。
只是单向垃圾邮件检测启用存在问题。(待学习)
     

   

另一种remount失败情形


 一种某些机器可用的解决方案

#首先在Settings->system->Developer options 选择OEM unlocking,
adb reboot bootloader # 然后运行命令,进入fastboot
fastboot flashing unlock # 根据提示操作,注意,unlock 之后再次启动时手机会自动擦除/data 分区
fastboot reboot

  相关解决方案