adb connect 192.168.1.4:44285List of devices attached
adb devices
scrcpy.exe -s 192.168.1.4scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
scrcpy-server: 1 file pushed, 0 skipped. 28.9 MB/s (41159 bytes in 0.001s)ERROR: bind: [10013] An attempt was made to access a socket in a way forbidden by its access permissions.
powershell.exe -executionpolicy bypass -command "start-process -filepath 'scrcpy' -argumentlist '--always-on-top --tcpip-192.168.1.4:44285' -windowstyle 'hidden'"or
powershell.exe -executionpolicy bypass -command "start-process -filepath 'scrcpy' -argumentlist '--always-on-top --tcpip-192.168.1.4:44285'"
Ever see this screencopy error?
<https://i.postimg.cc/Dz1rcpDX/scrcpy26.jpg>
This error pops up every once in a while. Then goes away.
When it's gone, screencopy works for days, weeks & months.
Then it happens again.
Dunno why.
Do you?
This time it has lasted for two days (multiple reboots).
Any debugging ideas?
adb connect 192.168.1.4:44285List of devices attached
adb devices
192.168.1.4:44285 device
scrcpy.exe -s 192.168.1.4scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
scrcpy-server: 1 file pushed, 0 skipped. 28.9 MB/s (41159 bytes in 0.001s)ERROR: bind: [10013] An attempt was made to access a socket in a way forbidden by its access permissions.
I also tried this, which also used to work - but now it just flashes.
powershell.exe -executionpolicy bypass -command "start-process -filepath 'scrcpy' -argumentlist '--always-on-top --tcpip-192.168.1.4:44285' -windowstyle 'hidden'"or
powershell.exe -executionpolicy bypass -command "start-process -filepath 'scrcpy' -argumentlist '--always-on-top --tcpip-192.168.1.4:44285'"
Try the last comment here ???
https://github.com/Genymobile/scrcpy/issues/2468
netsh interface ipv4 show excludedportrange protocol=tcp
# There seems to be a control for the port numbers
scrcpy --tcpip -p 27206:27220
netsh interface ipv4 show excludedportrange protocol=tcpProtocol tcp Port Exclusion Ranges
ERROR: bind: [10013]
An attempt was made to access a socket in a way forbidden by its access permissions.
Win+R -> cmd -> control+shift+enter (for an admin window)
The fundamental problem, it says is...
"You have a permission problem to listen on a port".
The reason is most likely due to a Windows Update that
restricted access to certain ports without telling anyone. https://ardalis.com/attempt-made-to-access-socket/
Seems like bad planning on Windows' part.
ERROR: bind: [10013] An attempt was made to access a socket in a way forbidden by its access permissions.
I only have two TCP ports that are reserved
2869 which is for Internet Connection Sharing
5357 which is for Web Sharing for Devices.
After Windows 10 updates, some ports are reserved by Windows with the
result that applications cannot bind to these ports.
But it seems nobody is debugging to figure out what the problem is.
Everyone is just testing out commands until finally one of them works.
But you know, in the end, there is a proper way to do this.
net stop hns && net start hnsTCP 192.168.1.198:1708 192.168.1.4:44285 ESTABLISHED 8172
adb connect 192.168.1.4:44285
netstat -ano | findstr 44285
(You must use a modern browser, to view the simple text content on these pages.)
https://github.com/Genymobile/scrcpy/blob/master/doc/connection.md
scrcpy --tcpip=192.168.1.1 # default port is 5555
scrcpy --tcpip=192.168.1.1:5555
If adb TCP/IP mode is disabled on the device (or if you don't know the IP address),
connect the device over USB, then run:
scrcpy --tcpip # without arguments
It will automatically find the device IP address and adb port,
enable TCP/IP mode if necessary, then connect to the device before starting.
https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
5555 Unofficial Wireless adb (Android Debug Bridge) control of an Android device over the network.
And that port is actually used by more than one service.
*******
"Documentation for control protocol #673"
https://github.com/Genymobile/scrcpy/issues/673
"The protocol between the client and the server is internal
and private, and may (and will) change at any time.
Recently, as you noticed, the communication has changed
to use 2 sockets in order to support copy-paste (ec71a3f).
"
https://github.com/Genymobile/scrcpy/commit/ec71a3f66ab48c2fdd1728753acc09edbd4db570
"Use two sockets for video and control
The socket used the device-to-computer direction to stream the video and
the computer-to-device direction to send control events.
Some features, like copy-paste from device to computer, require to send
non-video data from the device to the computer.
To make them possible, use two sockets:
- one for streaming the video from the device to the client;
- one for control/events in both directions.
"
In this thread, without explanation, their firewall has 5555,7007 open.
https://stackoverflow.com/questions/66611227/afwall-firewall-unblock-adb-wireless
And 7007 isn't in the Wiki port list.
net stop hns && net start hns
ERROR: bind: [10013] An attempt was made to access a socket in a way
forbidden by its access permissions.
I'd be looking in Windows Defender Firewall settings, temporarily add
an allow rule to see if that stops the error, if it works replace it
with as narrow a rule as possible to leave in place.
net stop hnsThe Host Network Service service is stopping.
net start hnsThe Host Network Service service is starting.
The problem solved itself immediately after I ran the HNS commands
The problem solved itself immediately after I ran the HNS commands
I didn't catch whichever message you mentioned HNS in, if you mean Host Network Service, are you running windows within a container (docker etc)
if so I didn't notice that either ... but could see how one container
would need to protect its ports against other containers ...
net stop hnsThe Host Network Service service is stopping.
net start hnsThe Host Network Service service is starting.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 403 |
Nodes: | 16 (2 / 14) |
Uptime: | 96:44:37 |
Calls: | 8,445 |
Calls today: | 1 |
Files: | 13,181 |
Messages: | 5,908,065 |