adb无法连接,设备未unauthorized,没有usb调试授权弹框勾选 |
您所在的位置:网站首页 › 华为手机开启usb调试但无法连接服务器 › adb无法连接,设备未unauthorized,没有usb调试授权弹框勾选 |
1. cmd 窗口日志
C:\Users\fadi.su>adb devices
List of devices attached
GA9XSGUGZP4HOJOJ unauthorized
C:\Users\fadi.su>adb shell
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
对应adb 源码 system/core/adb/transport.cpp atransport* acquire_one_transport(TransportType type, const char* serial, TransportId transport_id, bool* is_ambiguous, std::string* error_out, bool accept_any_state) { ... if (result && !accept_any_state) { // The caller requires an active transport. // Make sure that we're actually connected. ConnectionState state = result->GetConnectionState(); switch (state) { case kCsUnauthorized: { *error_out = "device unauthorized.\n"; char* ADB_VENDOR_KEYS = getenv("ADB_VENDOR_KEYS"); *error_out += "This adb server's $ADB_VENDOR_KEYS is "; *error_out += ADB_VENDOR_KEYS ? ADB_VENDOR_KEYS : "not set"; *error_out += "\n"; *error_out += "Try 'adb kill-server' if that seems wrong.\n"; *error_out += "Otherwise check for a confirmation dialog on your device."; result = nullptr; break; } ... 2. 解决方法初次使用手机时,在开发者模式中勾选开发者模式 或者多次重试如下步骤 进入手机的开发者模式撤销usb调试授权重新打开开发者模式如果上述都不行,考虑更换USB驱动,重启电脑和手机,最差的情况下,这台手机不允许使用adb调试,不弹出usb调试授权 3. 第一次可用,突然就不可用的解决方法 C盘搜索 “.android”进入.android目录,删除 adbkey 和 adbkey.pub重新插拔下,看是否可以弹出 usb调试授权 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |