我再也不能通过命令行或Eclipse使用ADB连接到我的设备了。

执行命令

adb devices

返回设备名称,但显示为脱机状态。

我尝试过的事情。

切换Android调试模式 重新安装谷歌USB驱动 将操作系统恢复到以前工作的备份(CyanogenMod) 换掉USB数据线 多次重启电话/电脑 更新Android SDK

我真的不知道发生了什么。你觉得我还能试什么,我洗耳恭听。

需要明确的是,如果你遇到了同样的问题,那么问题可能是SDK过时了。从4.2.2开始,有一个安全特性需要您确认连接设备的RSA指纹。打开SDK管理器并更新工具!然后重新启动。


当前回答

This is a lame case, but just in case... I have a mac laptop with a power/usb hub but it only has a couple usb ports so I hung another powered usb hub off that. Seems/seemed to work fairly well, but for some reason my android device wouldn't keep a connection. Plug it in, it shows 'device', but try to do anything via adb and get an error and status goes "offline". Drove me crazy. Then I decided to try plugging in Android device straight to the first hub... worked immediately and solidly. I had been using the two hub setup for a while, but all of a suddden it just stopped working. Hope it helps somebody!

其他回答

重新启动设备。我尝试了这里列出的所有方法来让我的HTC手机(运行Android 4.0.3)工作,但adb设备一直显示它离线。重启后,手机终于上线了。这里的一些其他建议可能有助于手机被识别出来,但在试用过程中重新启动几次肯定不会有什么坏处。

由于没有人对我的情况给出答案:您可能无法访问~/。android / adbkey文件。如果最初使用sudo启动adb,它将生成一个公钥对,将其写入~/.android/adbkey。Pub和~/android/adbkey。当然,私钥是chmod 600—仅对主目录中的根目录可读。随后以普通用户启动adb将不允许访问私钥文件,这反过来会以“设备脱机”的方式无声地失败。

在我的三星Galaxy S III上最新的CyanogenMod夜间更新(2013年8月12日)后,我开始面临同样的问题。

我使用了最上面的答案(由w. allison编辑的hack_on)中建议的ADB二进制文件,我在我的手机上得到了一个提示,要求允许访问我的PC(它的RSA密钥)!!现在工作得很好。

下载链接(仅限ADB、Fastboot和相关二进制文件):https://dl.google.com/android/repository/platform-tools_r16.0.1-windows.zip

上面的一切都试了几个小时。它成功的原因是运行android studio时没有启动任何应用程序。你仍然可以使用chrome来远程调试设备。

我也遇到过这个问题。我更新了Android SDK管理器中的所有内容,使用设备管理器卸载了我的设备,现在它可以正常工作了。一路上我发出了一些“kill-server”和“start-server”。