Android 亚行不会启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2306322/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Adb won't start
提问by Mike Burke
Running Vista, tried starting adb
from shell as admin get daemon not running starting it now
运行 Vista,尝试adb
以管理员身份从 shell启动get daemon not running 现在启动它
ADB server didn't ACK
* failed to start daemon *
Any help for this?
对此有什么帮助吗?
回答by Reno
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. This bat file will solve most of your adb problems.
- 使用以下内容创建一个 bat 文件并运行它。这个 bat 文件将解决你的大部分 adb 问题。
tskill adb
cd \tools\
adb kill-server
adb start-server
ddms
tskill adb
光盘\工具\
adb 杀死服务器
adb 启动服务器
数据管理系统
Use the command
netstat
to monitor the state of connections (adb uses 5037)If the bat file doesn't work try: disconnect-reboot phone-connect. (hint: use `adb reboot' if adb is responding at all, if not do it the old fashioned way)
Sometimes Windows can be funny. Reboot the machine.
Turn on USB Debugging Mode
- Download the Android SDK and unzip
- Uninstall all "Android *" from Device Manager
- Do an "Add Hardware" from Control Panel, choosing "Install the hardware... (Advanced)"
- Select "Android USB Devices" and click "Next"
- Click "Have Disk" and enter the path where the SDK was unzipped
Still not working ? Factory reset the phone.
MTP detection delays ADB. Sometimes you if need boot time logs you may have to disable the MTP driver in Device Manager (Windows)
使用命令
netstat
监控连接状态(adb使用5037)如果 bat 文件不起作用,请尝试:断开连接-重新启动手机-连接。(提示:如果 adb 有响应,请使用“adb reboot”,如果没有,则使用老式方法)
有时,Windows 可能很有趣。重新启动机器。
开启USB调试模式
- 下载 Android SDK 并解压
- 从设备管理器中卸载所有“Android *”
- 从控制面板执行“添加硬件”,选择“安装硬件...(高级)”
- 选择“Android USB 设备”并点击“下一步”
- 点击“Have Disk”,输入SDK解压后的路径
还是行不通 ?将手机恢复出厂设置。
MTP 检测会延迟 ADB。有时,如果需要启动时间日志,您可能需要在设备管理器 (Windows) 中禁用 MTP 驱动程序
This is a brilliant patchfor adb when you get the error :
Adb connection Error:An existing connection was forcibly closed by the remote "
Adb 连接错误:现有连接被远程“强行关闭”
回答by drawnonward
I was unable to use adb. I got the following error, both on the command line and in eclipse.
我无法使用 adb。我在命令行和 eclipse 中都收到以下错误。
* daemon not running. starting it now on port 5037 *
ADB server didn't ACK<br>
* failed to start daemon *
* 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. To diagnose the problem, I found that you can run adb with the following arguments:
也就是说,adb start-server
即使在重新启动后也失败。为了诊断问题,我发现您可以使用以下参数运行 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
文件中的一个空行。
回答by CommonsWare
You may have a stuck copy of the adb
daemon in memory. Try removing it with Task Manager, or reboot, and see if that helps.
您可能adb
在内存中有一个守护程序的卡住副本。尝试使用任务管理器将其删除,或重新启动,看看是否有帮助。
回答by MikeL
For whoever is using Android Studio and MAC. This is what worked for me:
对于使用 Android Studio 和 MAC 的人。这对我有用:
- In Android Studio: Tools -> Android -> Uncheck "Enable ADB Integration"
- In terminal: "adb kill-server"
- In Android Studio: Tools -> Android -> Check "Enable ADB Integration"
- In terminal: "adb start-server"
- 在 Android Studio 中:工具 -> Android -> 取消选中“启用 ADB 集成”
- 在终端中:“adb kill-server”
- 在 Android Studio 中:工具 -> Android -> 勾选“启用 ADB 集成”
- 在终端中:“adb start-server”
回答by paulrehkugler
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-like 机器(我在 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
.
回答by Anna Billstrom
> killall adb
> killall adb
> adb start-server
> 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). In my case, I had another window open to :5037, and forgot about it. Wondered why I couldn't stop and start as usual. By going "killall" you make sure you're terminating all processes. You can also go into the CPU's processes and force quit.
基本上 adb 在你机器上的另一个进程上运行,你需要杀死它,然后再次启动守护进程,因为它们都试图绑定到同一个端口 (:5037)。就我而言,我打开了另一个窗口:5037,然后忘记了。想知道为什么我不能像往常一样停下来开始。通过“killall”,您可以确保终止所有进程。您也可以进入 CPU 的进程并强制退出。
回答by kangear
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 服务器没有 ACK * 无法启动守护进程 *
That show what errors.
那显示什么错误。
Now you reset you PC, it will well.
现在你重置你的电脑,它会很好。
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.
您将知道哪个软件使用该端口。
回答by Glen Gemeniano
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" />
回答by PacificSky
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. Sadly, it could not handle the newline(s) I put in after the 0x1949
有帮助。就我而言,我编辑了 ~/.android/adb_usb.ini,并在末尾添加了 0x1949 以启用 Kindle Fire 上的调试。遗憾的是,它无法处理我在 0x1949 之后放入的换行符
回答by topher217
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/{user-name}/.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."
'# USE 'android update adb' TO GENERATE."
'# 1 USB VENDOR ID PER LINE."
'# ANDROID 3RD PARTY USB 供应商 ID 列表——请勿编辑。”
'# 使用 'android update adb' 来生成。”
'# 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
希望能帮助某人