阻止Android模拟器启动? [英] Prevent Android emulator from starting?
问题描述
我已经看到了相反的问题,但是:
我是使用Google Pixel 1的Windows计算机上的Android开发人员.我想使用adb对其上的代码进行调试,但是只要adb启动,它就会启动模拟器
I've seen this question asked in reverse but:
I'm an Android developer on a Windows machine with a Google Pixel 1. I want to use adb to debug my code on it, but whenever adb starts it launches an emulator
连接的设备列表
FA6A40303383设备
emulator-5562离线#我不想让它开始!
List of devices attached
FA6A40303383 device
emulator-5562 offline # I don't want this to start!
我可以理解为什么有人会想要这个,但是在任何情况下我都不希望这个模拟器启动.因此,adb会自动使用我的手机,而不是要求我指定设备/仿真器.
I can understand why someone would want this, but I under no circumstance want this emulator to launch. This is so adb automatically uses my phone instead of asking me to specify the device/emulator.
我使用NVidia的适用于Android的CodeWorks(1R7)安装了SDK-我确实一次安装了Android Studio,但是我将其卸载(并删除了所有User/.android *目录),并完成了Codeworks的完全卸载/重新安装适用于Android,但仿真器仍会启动.
I installed the SDK using NVidia's CodeWorks for Android (1R7) - I did have Android Studio installed at one point, but I uninstalled it (and removed all User/.android* directories) and did a complete uninstall / reinstall of Codeworks for Android, but the emulator still starts.
我不习惯在那里看到它,这有点困扰我的工作流程-有什么方法可以阻止它启动吗?
I'm not used to seeing it there and it's kind of messing with my workflow - is there a way to prevent it from starting?
推荐答案
尝试搜索在TCP端口 5563 (5562 + 1,我忘记了对此的解释)上运行的进程.ADB寻找在TCP端口5555+上运行的进程.
Try searching for processes running on TCP port 5563 (5562 + 1, I forget the explanation for this). ADB looks for processes running on TCP ports 5555+.
对我来说,我使用Native Instruments软件,该软件在TCP端口5563上启动了一个称为NTKDaemon的程序,这是虚拟仿真器的直接原因.在弄清楚这一点之前,我把头撞在墙上了两周左右.
For me, I use Native Instruments software which starts something called an NTKDaemon on TCP port 5563, which was the direct cause of the dummy emulator. I knocked my head against this wall for two weeks or so before figuring this out.
这个SO答案使我找到了正确的过程: https://stackoverflow.com/a/53680440/2363258,尽管它是在Windows环境中
This SO answer put me on the right path to finding the process: https://stackoverflow.com/a/53680440/2363258, though it's in a windows environment
最后,这是我的解决办法:
In the end this was my fix:
$ adb devices -l
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
emulator-5562 offline transport_id:1
~
$ lsof | grep 5563
NTKDaemon 389 tim 19u IPv4 0x8d889cdf67e44dd9 0t0 TCP localhost:5563 (LISTEN)
NTKDaemon 389 tim 26u IPv4 0x8d889cdf75b8f3d9 0t0 TCP localhost:5563->localhost:49306 (ESTABLISHED)
adb 1074 tim 7u IPv4 0x8d889cdf75b8d759 0t0 TCP localhost:49306->localhost:5563 (ESTABLISHED)
~
$ kill -9 389
~
$ adb devices -l
List of devices attached
~
$
这篇关于阻止Android模拟器启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!