简体   繁体   English

亚行将无法启动

[英]Adb won't start

Running Vista, tried starting adb from shell as admin get daemon not running starting it now 运行Vista,尝试以shell身份以admin get守护程序启动adb而不是立即启动

ADB server didn't ACK
* failed to start daemon *

Any help for this? 有什么帮助吗?

This problem has annoyed me for a long time. 这个问题困扰了我很长时间。 In addition to the above answer, use these tips: 除了上述答案之外,请使用以下提示:

  • Create a bat file with the following and run it. 使用以下命令创建一个bat文件并运行它。 This bat file will solve most of your adb problems. 这个蝙蝠文件将解决您的大多数adb问题。

tskill adb tskill adb

cd \\tools\\ cd \\工具\\

adb kill-server 亚行杀害服务器

adb start-server 亚行启动服务器

ddms ddms

  • Use the command netstat to monitor the state of connections (adb uses 5037) 使用命令netstat监视连接状态(adb使用5037)

  • If the bat file doesn't work try: disconnect-reboot phone-connect. 如果bat文件不起作用,请尝试:断开连接-重新引导电话连接。 (hint: use `adb reboot' if adb is responding at all, if not do it the old fashioned way) (提示:如果adb根本没有响应,请使用“ adb reboot”,如果没有,则使用老式方法)

  • Sometimes Windows can be funny. 有时Windows可能很有趣。 Reboot the machine. 重新启动机器。

  • Turn on USB Debugging Mode 打开USB调试模式

    • Download the Android SDK and unzip 下载Android SDK并解压缩
    • Uninstall all "Android *" from Device Manager 从设备管理器中卸载所有“ Android *”
    • Do an "Add Hardware" from Control Panel, choosing "Install the hardware... (Advanced)" 从控制面板中执行“添加硬件”,选择“安装硬件...(高级)”
    • Select "Android USB Devices" and click "Next" 选择“ Android USB设备”,然后单击“下一步”
    • Click "Have Disk" and enter the path where the SDK was unzipped 单击“从磁盘安装”,然后输入解压缩SDK的路径。
  • Still not working ? 还是行不通 ? Factory reset the phone. 恢复手机出厂设置。

  • MTP detection delays ADB. MTP检测会延迟ADB。 Sometimes you if need boot time logs you may have to disable the MTP driver in Device Manager (Windows) 有时,如果需要启动时间日志,则可能必须在设备管理器(Windows)中禁用MTP驱动程序


This is a brilliant patch for adb when you get the error : 当您收到错误消息时, 这是 adb 的绝妙补丁

Adb connection Error:An existing connection was forcibly closed by the remote " Adb连接错误:现有的连接被远程“

I was unable to use adb. 我无法使用adb。 I got the following error, both on the command line and in eclipse. 我在命令行和Eclipse中都遇到了以下错误。

* daemon not running. starting it now on port 5037 *
ADB server didn't ACK<br>
* failed to start daemon *

That is, adb start-server failed even after rebooting. 也就是说,即使重新启动后, adb start-server也会失败。 To diagnose the problem, I found that you can run adb with the following arguments: 为了诊断问题,我发现您可以使用以下参数运行adb:

adb nodaemon server

And it will print out the reason that it cannot run. 并且它将打印出无法运行的原因。 In my case, it was a blank line in the adb_usb.ini file. 就我而言,它是adb_usb.ini文件中的空白行。

You may have a stuck copy of the adb daemon in memory. 您可能在内存中adbadb守护程序的复制副本。 Try removing it with Task Manager, or reboot, and see if that helps. 尝试使用任务管理器将其删除,或重新启动,看看是否有帮助。

For whoever is using Android Studio and MAC. 对于使用Android Studio和MAC的用户。 This is what worked for me: 这对我有用:

  1. In Android Studio: Tools -> Android -> Uncheck "Enable ADB Integration" 在Android Studio中:工具-> Android->取消选中“启用ADB集成”
  2. In terminal: "adb kill-server" 在终端中:“ adb kill-server”
  3. In Android Studio: Tools -> Android -> Check "Enable ADB Integration" 在Android Studio中:工具-> Android->选中“启用ADB集成”
  4. In terminal: "adb start-server" 在终端中:“ adb启动服务器”

The top answer is Windows-specific but this has a decent amount of Google visibility, so if you're running a *nix-like machine (I'm on a Mac), the steps are similar: 最佳答案是特定于Windows的,但是它具有相当大的Google可见性,因此,如果您正在运行类似* nix的计算机(我在Mac上),则步骤类似:

$ killall adb
$ cd <PATH_TO_SDK>/platform-tools/
$ adb kill-server
$ adb start-server

Or, if you're like me and just want to access adb no matter your current directory, add 或者,如果您像我一样,只是想访问adb,无论当前目录如何,请添加

export PATH=${PATH}:<PATH_TO_SDK>/platform-tools/

to your ~/.bash_profile . 到您的~/.bash_profile

> killall adb

> adb start-server

Restart Eclipse. 重新启动Eclipse。

Basically adb is running on another process on your box, and you need to kill it, and start up the daemon again, since they're both trying to bind to the same port (:5037). 基本上adb在您的机器上的另一个进程上运行,您需要将其终止,然后再次启动守护程序,因为它们都试图绑定到同一端口(:5037)。 In my case, I had another window open to :5037, and forgot about it. 就我而言,我又打开了一个窗口:5037,却忘了它。 Wondered why I couldn't stop and start as usual. 想知道为什么我不能像往常一样停下来并开始。 By going "killall" you make sure you're terminating all processes. 通过“ killall”,您可以确保终止所有进程。 You can also go into the CPU's processes and force quit. 您还可以进入CPU的进程并强制退出。

1.$ apt-get remove android-tools-adb 1. $ apt-get删除android-tools-adb

2.$ cd $PATH_TO_SDK/platform-tools/ 2. $ cd $ PATH_TO_SDK / platform-tools /

3.$ ./adb devices 3. $ ./adb设备

You will see like this: 您将看到以下内容:

  • daemon not running. 守护程序未运行。 starting it now on port 5037 * cannot bind 'tcp:5037' ADB server didn't ACK * failed to start daemon * 立即在端口5037上启动*无法绑定'tcp:5037'ADB服务器未确认*无法启动守护程序*

That show what errors. 那说明什么错误。

Now you reset you PC, it will well. 现在您重置PC,一切正常。

Or 要么

# lsof -i:5037

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

wineserve 3609 root 268u IPv4 20118 0t0 TCP localhost:5037 (LISTEN)

# 

You will know which software use the port. 您将知道使用哪个软件的端口。

To avoid this simply change the following values in your host_config.xml: 为了避免这种情况,只需在host_config.xml中更改以下值:

<!-- Number of tests executed between reboots. A value <= 0 disables reboots. -->
<IntValue name="maxTestCount" value="10000" />
<!-- Max size [tests] for a package to be run in batch mode. -->
<IntValue name="maxTestsInBatchMode" value="100000" />

<!-- Max time [ms] between test status updates. -->
<IntValue name="testStatusTimeoutMs" value="600000" />
adb nodaemon server

helps. 帮助。 In my case, I had edited ~/.android/adb_usb.ini, and added 0x1949 at the end to enable debugging on the Kindle Fire. 就我而言,我已经编辑〜/ .android / adb_usb.ini,并在末尾添加了0x1949以在Kindle Fire上启用调试。 Sadly, it could not handle the newline(s) I put in after the 0x1949 遗憾的是,它无法处理我在0x1949之后输入的换行符

I had the same problem. 我有同样的问题。 I had improperly edited my adb_usb.ini file (I had two carriage returns at the end of the file...yes this was hard to find.) 我没有正确地编辑adb_usb.ini文件(文件末尾有两个回车...是的,这很难找到。)

This file is located somewhere similar to /Users/{user-name}/.android/adb_usb.ini 该文件位于与/ Users / {用户名} /。android / adb_usb.ini类似的位置

(replace {user-name} with your own user name) (将{user-name}替换为您自己的用户名)

Make sure the file reads EXTACTLY (No spaces/carriage returns/line breaks before or after): 确保文件完全读取(之前或之后没有空格/回车符/换行符):

'# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT." “#ANDROID 3RD PARTY USB供应商ID列表-请勿编辑。”
'# USE 'android update adb' TO GENERATE." '#使用'android update adb'生成。”
'# 1 USB VENDOR ID PER LINE." '#1每行USB供应商ID。”

(IMPORTANT!!! There are no ' (apostrophes) in the actual file, this was the only way for me to post this without it interpreting the # for BOLD). (重要!!!实际文件中没有'(撇号),这是我张贴此文件的唯一方式,它不会将#解释为BOLD。)


Hope that helps someone 希望可以帮助某人

If you're using Android Studio, if 如果您使用的是Android Studio,

  • you have the "Device chooser" dialog open 您打开了“设备选择器”对话框
  • you try to run "adb devices" from your command line 您尝试从命令行运行“ adb设备”

it leads every single time to the following error 每次导致以下错误

adb server is out of date.  killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:

SOLUTION (easy and quick) 解决方案 (轻松快捷)

Close the "Device chooser" dialog. 关闭“设备选择器”对话框。 My guess is that it tries to take over the adb connection in a.. very intensive way. 我的猜测是,它试图以一种非常密集的方式接管adb连接

I'm facing this issue with Genymotion , so I've replaced it's adb with my current adb . 我现在面临这个问题与Genymotion,所以我把它换成这是adb与我目前的adb For reference: 以供参考:

cd $GENYMOTION_HOME\tools
mv adb adb-old
ln -s $ANDROID_SDK\platform-tools\adb adb

There is yet another possibility. 还有另一种可能性。 If you have installed any permission managers, like Advanced android permission manager , the adb may fail.It was my case. 如果您安装了任何权限管理器,例如Advanced androidPermission manager,则adb可能会失败。 Uninstalled the app and then no issues. 卸载了该应用程序,然后没有问题。

It seem are the same, but sometime, the command adb kill-server have no effect (at least is in my case). 看起来是一样的,但是有时候,命令adb kill-server无效(至少在我而言)。 So, i have tried other way. 因此,我尝试了其他方法。

You can check this way: https://stackoverflow.com/a/34627522/5597864 您可以通过以下方式检查: https : //stackoverflow.com/a/34627522/5597864

In a console, try: 在控制台中,尝试:

taskkill /F /T /IM adb.exe

Do this many times, until it says ERROR: The process "adb.exe" not found. 进行多次,直到显示ERROR: The process "adb.exe" not found. Then 然后

adb devices

The adb server is not running. adb服务器未运行。 you can open the command line window in Windows to check which process is using the 5037 port, remember the process number. 您可以在Windows中打开命令行窗口以检查哪个进程正在使用5037端口,请记住进程号。

netstat -ano |findstr "5037"

Then use the Ctrl+alt+delete to open the process manager to kill the process which is possessing the 5037 port. 然后使用Ctrl + Alt + Delete来打开进程管理器,以杀死拥有5037端口的进程。 You maybe need to try this several times until the 5037 port is free to use. 您可能需要尝试几次,直到5037端口可以免费使用。

打开命令,在您的adb.exe文件中定位。进入命令adb kill-server adb start-server上的文件

When it additionally says that adb server is out of date. killing... 当它另外表示adb server is out of date. killing... adb server is out of date. killing... it kills it for you. adb server is out of date. killing...为您杀死它。 The problem is it restarts as soon as was killed. 问题是它一旦被杀死就会重新启动。

So you should consider finding the adb.exe wherever it could be. 因此,您应该考虑在adb.exe地方找到adb.exe The simplest way to do that is opening a Task Manager , finding an adb.exe process -> RMB -> Open file location -> delete it from there. 要做到这一点,最简单的方法是打开Task Manager ,找到一个adb.exe过程- > RMB - > Open file location - >删除它从那里。 Unless it's not needed, in this case you should update it. 除非不需要它,否则在这种情况下,您应该对其进行更新。 In my case it was in C:\\Windows\\ and came with their Visual Studio. 就我而言,它在C:\\Windows\\并随Visual Studio一起提供。

If you are getting the error cannot bind 'tcp:5037' and you are using any Linux distribution such as Ubuntu, 如果出现错误, cannot bind 'tcp:5037'并且您使用的是任何Linux发行版,例如Ubuntu,

Kill old ADB process: 杀死旧的ADB进程:

fuser -n tcp -k 5037

This will kill the adb process at port 5037 and then, 这将杀死端口5037上的adb进程,然后,

Start ADB: 启动亚行:

adb start-server

Usually the answers given here worked for me, but today they didn't. 通常,这里给出的答案对我有用,但今天却没有。 My problem was fixed by updating the emulator and SDK to the latest versions from the SDK manager. 通过将仿真器和SDK从SDK管理器更新到最新版本,解决了我的问题。

On A Mac or Unix 在Mac或Unix上

For those of you coming here with on Mac or Unix, the following worked for me: 对于在Mac或Unix上来这里的人来说,以下方法对我有用:

adb kill-server
adb server

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM