Skip to content

Instantly share code, notes, and snippets.

@4sskick
Created July 10, 2025 04:41
Show Gist options
  • Save 4sskick/dd3e84ee52a2d9a51e43845e9cff84a2 to your computer and use it in GitHub Desktop.
Save 4sskick/dd3e84ee52a2d9a51e43845e9cff84a2 to your computer and use it in GitHub Desktop.
reconnect on no devices found/emulator - MEMU emulator
if you see no listed emulator when adb devices, but the emulator already run. You can connect it through TCP by command adb connect 127.0.0.1:21503.
But this only for MEMU, because port 21503, 21504, 21505. To make sure the port running MEMU emulator, can use `netstat -aon | findstr 215`.
Will give you the listed port use on running MEMU, like
PS C:\> netstat -aon | findstr 215
TCP 0.0.0.0:21503 0.0.0.0:0 LISTENING 17000
TCP 127.0.0.1:21503 127.0.0.1:55945 ESTABLISHED 17000
TCP 127.0.0.1:55945 127.0.0.1:21503 ESTABLISHED 26792
After connect using adb connect 217.0.0.1:21503, can make sure adb device
PS C:\> adb devices
List of devices attached
127.0.0.1:21503 device
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment