本文翻译自:Android ADB device offline, can't issue commands

I can't connect to my device anymore using ADB through the command line or in Eclipse . 我无法再通过命令行或在Eclipse中使用ADB连接到我的设备。

Running the command 运行命令

adb devices

returns the device name, but it says it's offline. 返回设备名称,但表示它已脱机。

Things I've tried. 我尝试过的事情。

  1. Toggled Android debugging mode 切换Android调试模式
  2. Reinstalled the Google USB driver 重新安装了Google USB驱动程序
  3. Restored the OS to a previously working backup ( CyanogenMod ) 将操作系统还原到以前可以正常工作的备份( CyanogenMod )
  4. Swapped the USB cord 交换USB线
  5. Rebooted the phone/computer multiple times 多次重启手机/电脑
  6. Updated the Android SDK 更新了Android SDK

I really don't have any clue what's going on. 我真的不知道发生了什么。 Anything else you think I can try, I'm all ears. 您认为我可以尝试的其他任何事情,我都很高兴。

To be clear, if you're having this same issue the problem is probably an out-of-date SDK. 要明确的是,如果您遇到相同的问题,则问题可能是过时的SDK。 As of 4.2.2 there is a security feature that requires you to confirm the RSA fingerprint of the connecting device. 从4.2.2开始,有一项安全功能要求您确认连接设备的RSA指纹。 Open the SDK manager and update the tools! 打开SDK管理器并更新工具! Then reboot. 然后重启。


#1楼

参考:https://stackoom.com/question/10uaN/Android-ADB设备离线-无法发出命令


#2楼

I just got the same problem today after my Nexus 7 and Galaxy Nexus were updated to Android 4.2.2. 我将Nexus 7和Galaxy Nexus更新到Android 4.2.2后,今天遇到了同样的问题。

The thing that fixed it for me was to upgrade the SDK platform-tools to r16.0.1. 对我来说固定的是将SDK平台工具升级到r16.0.1。 For me, this version was not displayed in my SDK Manager, so I pulled it down from http://dl.google.com/android/repository/platform-tools_r16.0.1-windows.zip directly. 对我而言,此版本未在我的SDK管理器中显示,因此我直接从http://dl.google.com/android/repository/platform-tools_r16.0.1-windows.zip将其下拉。

You then need to rename the platform-tools directory and unzip it to android-sdk-windows/platform-tools . 然后,您需要重命名platform-tools目录并将其解压缩到android-sdk-windows/platform-tools Using the SDK Manager, I had also updated to the latest sdk-tools before this. 在使用SDK Manager之前,我还更新了最新的sdk工具。

If your whole Eclipse and ADT are ancient, you may need to update them as well, but I didn't need to. 如果您的整个Eclipse和ADT都是古老的,则可能还需要更新它们,但我不需要这样做。

Note: you may need to run SDK Manager twice (once to update itself) before you will see the latest packages. 注意:您可能需要运行两次SDK Manager(一次更新自身),然后才能看到最新的软件包。


#3楼

I hit the same issue on a Nexus 7 running 4.2.2 OTA update. 我在运行4.2.2 OTA更新的Nexus 7上遇到了相同的问题。 I'm almost certain I had an ADB connection over USB and Wi-Fi after the update until it just stopped working. 我几乎可以肯定,更新之后我就通过USB和Wi-Fi建立了ADB连接,直到它停止工作为止。 To fix, I updated my SDK using: 要修复,我使用以下方法更新了我的SDK:

android update sdk --no-ui

Now my development tools are: 现在我的开发工具是:

  • SDK rev 16.0.2 SDK版本16.0.2
  • SDK tools rev 21.1 SDK工具21.1版
  • SDK API 17, rev 2 SDK API 17,修订版2

#4楼

For anyone wondering about 4.2.2, there is a security question that appears on the phone requesting RSA verification with the PC. 对于想知道4.2.2的任何人,电话上都会出现一个安全问题,要求与PC进行RSA验证。 Be sure your tools are updated AND you allow the PC access by verifying the security question on the devices in question. 确保您的工具已更新,并且通过验证有关设备上的安全性问题来允许PC访问。 This fixed it for me. 这为我解决了。

And as always, verify you have debugging enabled in the developer options ;) 和往常一样,在开发人员选项中确认已启用调试;)


#5楼

Try running adb devices after running adb kill-server . 在运行adb kill-server之后,尝试运行adb devices Security question pops up after that. 之后会弹出安全问题。 Worked for me. 为我工作。


#6楼

I was having this problem and none of the other answers helped. 我遇到了这个问题,其他答案都无济于事。 What was necessary, after updating the SDK and installing the API for 4.2.2, was running: 在更新SDK并安装适用于4.2.2的API之后,需要执行的操作是:

android update adb

Another problem I was having was that I was trying to connect ADB over Wi-Fi, which is my only option because the USB ports on my Mac are really finnicky. 我遇到的另一个问题是我试图通过Wi-Fi连接ADB,这是我唯一的选择,因为Mac上的USB端口确实很灵巧。 Unfortunately, ADB over Wi-Fi doesn't show the security question in 4.2.2, so you need to find a USB cable that'll work and connect over USB at least once to accept the security question, but after you do that once, you can connect over Wi-Fi. 不幸的是,通过Wi-Fi的ADB在4.2.2中没有显示安全性问题,因此您需要找到一条可以正常工作的USB电缆并至少通过USB连接一次以接受安全性问题,但是在您执行一次之后,您可以通过Wi-Fi连接。

Android ADB设备离线,无法发出命令相关推荐

  1. android adb 点亮 关闭 屏幕 命令

    Android adb 点亮和关闭屏幕的命令 # kernel休眠 echo mem > /sys/power/state # kernel唤醒 echo on > /sys/power/ ...

  2. Android adb使用介绍和adb命令大全

    Android 调试桥 (adb) 是一种功能多样的命令行工具,可让您与设备进行通信.adb 命令便于执行各种设备操作(例如安装和调试应用),并提供对 Unix shell(可用来在设备上运行各种命令 ...

  3. Android ADB

    Android 调试桥 本文内容 adb 的工作方式 在您的设备上启用 adb 调试 通过 WLAN 连接到设备 查询设备 将命令发送至特定设备 安装应用 设置端口转发 将文件复制到设备/从设备复制文 ...

  4. android点击运行后无法显示设备,Android仿真器除了黑屏外什么都不显示,adb设备显示“设备离线”...

    我只是想开始在Android中进行开发.因此,问题是当我尝试通过发出命令emulator @ A2来启动仿真器时,屏幕上会出现一个仿真器.但是即使等待了2-3个小时,它所显示的只是一个黑屏.甚至没有a ...

  5. Android adb命令选择设备

    有时候插多个设备时需要adb选择设备 可以用如下命令 在emulator-5554模拟器上安装ebook.apk: adb -s emulator-5554 install ebook.apk 在真机 ...

  6. android设备离线授权方案,adb-Android Studio-设备已连接但“离线”

    adb-Android Studio-设备已连接但"离线" 这是一个很普遍的问题,但是没有一种解决方案适合我. 第一次提问,如果我弄错了约定,请您道歉. 我正在尝试将Galaxy ...

  7. Android adb常用命令

    为什么80%的码农都做不了架构师?>>>    Android 调试桥(adb)是多种用途的工具,该工具可以帮助你你管理设备或模拟器 的状态. 可以通过下列几种方法加入adb: 在设 ...

  8. Android adb命令,linux中各种命令

    常用的ADB命令 1. 显示系统中全部Android平台: android list targets 2. 显示系统中全部AVD(模拟器): android list avd 3. 创建AVD(模拟器 ...

  9. 【转官方】Android ADB调试命令、支持的命令、ADB文档

    ADB,即 Android Debug Bridge,它是 Android 开发/测试人员不可替代的强大工具,也是 Android 设备玩家的好玩具. 持续更新中,欢迎提 PR 和 Issue 补充指 ...

最新文章

  1. Unity导出apk出现的问题,JDK,Android SDK,NDK,无“安装模块”
  2. 使用mint-ui开发项目的一些所得
  3. Apache Flink 零基础入门(十五)Flink DataStream编程(如何自定义DataSource)
  4. 吉士丁与新潮传媒达成亿级战略合作,打造国产奶酪新势力
  5. CSS3响应式bootstrap模板
  6. 如何使用Dependabot保持环境最新
  7. 通过filebeat、logstash、rsyslog采集nginx日志的几种方式
  8. java windowbuilder下载_Java WindowBuilder 安装及基本使用的教程
  9. arm架构安装rxtx_树莓派JAVA开发串口(RXTX)和GPIO(pi4j)
  10. kubernetes: CNI解读
  11. 使用video speed controller给视频加速
  12. 【读书笔记】 - 《你只是看起来很努力》
  13. 安卓教室会议室预约系统源码
  14. nmn服用后会出现什么副作用,nmn产品副作用及时预防
  15. 342_Linux Mint使用国内的软件源
  16. JavaScript制作动画
  17. 什么是渲染?渲染的来源、分类及应用有哪些?
  18. 继续教育计算机专业能学到东西吗,继续教育个人学习心得体会
  19. 游戏平台推广怎么做?
  20. 重装纯净版WIN10

热门文章

  1. Windows command
  2. CentOS minimal 版安装图形界面的步骤分享,中文语言包
  3. 百度缺的不是狼性,而是鲁滨逊
  4. 计算机名的更改是灰色解决方案
  5. struts2+freemarker+sitemesh乱码,解决了
  6. 6.3 二进制文件操作案例精选
  7. 前端的常见的面试试题
  8. 类 kotlin(13)
  9. 排序——冒泡排序算法
  10. 简明Python3教程 15.异常