ADB can't connect to Nox
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!
This ref should resolve your problem, here is the summary:
Enable "Root" checkbox in nox setting
Go to setting in nox emulator, turn on developer option, turn on usb debugging
Go to nox directory, run command: nox_adb.exe connect 127.0.0.1:62001 It works for me :D
Run this in cmd.exe.
for /f "tokens=2" %a in ('tasklist ^|findstr Nox.') do netstat -aon | findstr %a
It will print out something like this.
C:\Program Files (x86)\Bignox\BigNoxVM\RT>for /f "tokens=2" %a in ('tasklist ^|findstr Nox.') do netstat -aon | findstr %a
C:\Program Files (x86)\Bignox\BigNoxVM\RT>netstat -aon | findstr 15260
TCP 127.0.0.1:1209 127.0.0.1:58001 ESTABLISHED 15260
TCP 127.0.0.1:26966 0.0.0.0:0 LISTENING 15260
UDP 0.0.0.0:64800 *:* 15260
UDP 0.0.0.0:64801 *:* 15260
C:\Program Files (x86)\Bignox\BigNoxVM\RT>netstat -aon | findstr 11180
C:\Program Files (x86)\Bignox\BigNoxVM\RT>netstat -aon | findstr 16120
TCP 127.0.0.1:52001 0.0.0.0:0 LISTENING 16120
TCP 127.0.0.1:52001 127.0.0.1:1987 ESTABLISHED 16120
TCP 127.0.0.1:53001 0.0.0.0:0 LISTENING 16120
TCP 127.0.0.1:57001 0.0.0.0:0 LISTENING 16120
TCP 127.0.0.1:58001 0.0.0.0:0 LISTENING 16120
TCP 127.0.0.1:58001 127.0.0.1:1209 ESTABLISHED 16120
TCP 127.0.0.1:58001 127.0.0.1:1975 ESTABLISHED 16120
TCP 127.0.0.1:60001 0.0.0.0:0 LISTENING 16120
TCP 127.0.0.1:61001 0.0.0.0:0 LISTENING 16120
TCP 127.0.0.1:64001 0.0.0.0:0 LISTENING 16120
TCP 192.168.1.133:1245 157.240.14.32:443 ESTABLISHED 16120
TCP 192.168.1.133:1248 172.217.2.195:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1267 108.177.12.188:5228 ESTABLISHED 16120
TCP 192.168.1.133:1271 172.217.2.138:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1274 172.217.2.74:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1275 172.217.8.98:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1278 172.217.2.138:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1280 172.217.2.74:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1282 172.217.2.74:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1300 149.154.175.55:5222 ESTABLISHED 16120
TCP 192.168.1.133:1301 172.217.8.78:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1329 172.217.3.78:80 CLOSE_WAIT 16120
TCP 192.168.1.133:1436 172.217.2.138:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1437 172.217.8.74:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1439 172.217.8.74:443 CLOSE_WAIT 16120
TCP 192.168.1.133:1967 172.217.3.74:443 ESTABLISHED 16120
UDP 0.0.0.0:51197 *:* 16120
UDP 0.0.0.0:51198 *:* 16120
UDP 0.0.0.0:54730 *:* 16120
UDP 0.0.0.0:62578 *:* 16120
UDP 127.0.0.1:59001 *:* 16120
UDP 127.0.0.1:65001 *:* 16120
The 3rd column is your port.
Also make sure to turn OFF USB debugging. This uses something different.
The basic idea of the script here is to find all processes named Nox.exe. get their PID, then find any ports attached to the Nox.exe processes.
you will now connect with the following:
"c:\Program Files\Nox\bin\adb.exe" connect 127.0.0.1:52001
"c:\Program Files\Nox\bin\adb.exe" -s 127.0.0.1:52001 shell