Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADB can't connect to Nox

i have a problem which i trying to solve for about 3 days and i can't find any working solution. The problem is i can't connect my nox player to adb when i trying to connect with localhost and port 62001. Everything i did is:

-nox_adb.exe

nox_adb.exe connect 127.0.0.1:62001 -> unable to connect to 127.0.0.1:62001.

nox_adb.exe connect 127.0.0.1:5037 -> connected to 127.0.0.1:5037 (but when i trying to run react native project with this deviceId, it returns "No Android devices connected")

-adb.exe (from Android SDK)

adb.exe connect 127.0.0.1:62001 -> unable to connect to 127.0.0.1:62001.

adb.exe connect 127.0.0.1:5037 -> failed to connect to 127.0.0.1:5037.

I have installed whole android studio with (i think) needed libraries, Google USB Driver, sdk platforms, etc. Platform: Windows 7 x64 Nox: 6.2.0.0

i have read:

  • https://forum.xda-developers.com/tools/android-studio/how-to-connect-android-studio-nox-app-t3241330 - connected succesfully but when starting project, react did'nt see any devices
  • https://www.bignox.com/blog/how-to-connect-android-studio-with-nox-app-player-for-android-development-and-debug/ - can't connect
  • Nox emulator with React Native - cant connect
  • Nox App Player not connect with Android Studio - can't connect to ---:62001, react didn't see device when connected

Could someone tell me what I'm doing wrong?

like image 775
Mateusz Avatar asked Jul 06 '18 16:07

Mateusz


2 Answers

Okay, after couple hours i've got the cause of the problem.

I was trying to reinstall whole Android Studio with SDK Tools, NOX player, clear cache of this apps and results was the same, can't connect to device... I couldn't find any information about to how change NOX player IP/Port or where to get my Nox player IP/Port (on every site was the same information - nox connect with 127.0.0.1:62001), so I came up with an idea to check listening ports on my computer.

At first i was type in command line "netstat -aon | find '62001'" to find application, that listening on port 62001. In result none application has listening on this port... okay, sounds good.

In next step i checked all running application with command "tasklist" to find Nox running tasks and their PID... and i have found:

(I had running Nox Emulator while doing this steps)

  • Nox.exe
  • NoxVMSVC.exe
  • NoxVMHandle.exe

Then i checked every process with command "netstat -aon | findstr PID" (PID is process ID, which you will got after typed command "tasklist")

In Nox.exe none port is correct, every time 'cannot connect...'

In NoxVMSVC.exe none port is listening (empty list)

In NoxVMHandle.exe i had about seven ports that is listening... so i checked one by one and i have found the correct port (62025) for connecting to device

So finally i can to connect to Nox Emulator without any problem, with command "adb connect 127.0.0.1:62025". Emulator working fine with React-Native project, application has installed correctly.

Maybe someone will have similar problem with connect to Nox Emulator.

Best Wishes!

like image 164
Mateusz Avatar answered Oct 20 '22 09:10

Mateusz


This worked for me. (for windows)

  1. Goto adb folder
C:\Users\YOUR_NAME\AppData\Local\Android\Sdk\platform-tools
  1. Open command here, and run
adb connect 127.0.0.1:62001

Like this

C:\Users\YOUR_NAME\AppData\Local\Android\Sdk\platform-tools>adb connect 127.0.0.1:62001
like image 34
Infi Avatar answered Oct 20 '22 09:10

Infi