Skip to content

How to connect to emulators? #245

Answered by yume-chan
l2aelba asked this question in Q&A
Jan 19, 2021 · 5 comments · 16 replies
Discussion options

You must be logged in to vote

I added detection for WebSocket backend in ae1f9a2 to make it easier.


Some background information:

  1. adb connects to AVD (Android Virtual Device, the official emulator) using TCP sockets.
  2. AVD may choose any odd port number between 5555 and 5587 (even numbers are for serial connection), adb devices will scan all ports in that range to detect emulators.

So you need to firstly find out which port your emulator is currently using.

Run adb devices, emulators have serial numbers in form of "emulator-55XX" (where XX is two digits), add 1 to that number, that's the emulator's ADB port.

PS E:\AndroidSDK\platform-tools> ./adb devices
List of devices attached
emulator-5554   device

Or you may just…

Replies: 5 comments 16 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
13 replies
@yume-chan
Comment options

@pr4x77
Comment options

@yume-chan
Comment options

@1234567890nevver
Comment options

@Ppeepost4489
Comment options

Answer selected by yume-chan
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@ubipo
Comment options

@yume-chan
Comment options

@yume-chan
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants
Converted from issue

This discussion was converted from issue #243 on January 20, 2021 04:41.