android - 重启adb服务器后linux android模拟器不显示在adb设备中

标签 android linux adb emulation

我在linux(Ubuntu16.04)中使用android模拟器,adb服务器似乎不正常。

root@ubuntu:~/santi/opengl# adb -P 15770 devices
List of devices attached 
emulator-5770   device

root@ubuntu:~/santi/opengl# adb -P 15770 root
root@ubuntu:~/santi/opengl# adb -P 15770 kill-server
root@ubuntu:~/santi/opengl# adb -P 15770 devices
* daemon not running. starting it now on port 15770 *
* daemon started successfully *
List of devices attached 

root@ubuntu:~/santi/opengl# 

于是问题来了,当我重启adb server时,模拟器又不在adb devices中了!只有当我重新启动模拟器时,它才会再次显示在 adb devices 中。

The ADB version: Android Debug Bridge version 1.0.32

adb devices
adb root
adb kill-server
adb devices

最佳答案

难以置信!以上问题是由模拟器指定的启动端口引起的。当我使用命令启动模拟器时:

emulator -avd template -gpu mesa -no-window -port 5680

上面的端口如果> 5680,重启adb server后设备不会显示,否则端口<= 5680会显示,肯定显示ok!

关于android - 重启adb服务器后linux android模拟器不显示在adb设备中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48184617/

相关文章:

android - 向 Android Handler 发送不同类型的消息

java - 更改异步任务中的接口(interface)(正确的方法)

linux - 运行 Web 服务器 (lightttpd) 和 (curl) 客户端的 Linux 服务器上的隔离测试网络

c++ - Linux 上的托管构建

android - 从 Android Studio 停止 Android adb

android - OkHttp3库的RequestBody和MultipartBody的区别?

android - 在 Android 上初始化 AudioTrack 是否有明显延迟?

c++ - 在 clock_gettime() 中使用 _COARSE 变体仍然调用 sys_clock_gettime() 系统调用

android - 检查 android sqlite 和 IntelliJ

java - 如何在我的电脑上获取我的应用程序 (Android) 存储的文件?