Open Source Project: Scrcpy now works wirelessly!

Last week, we introduced our new open source project: scrcpy.

The feedbacks were amazing, many people were interested in the application. ? This was very motivating, and a lot of work has been done in the last few days to fix important issues.?

For example, mouse clicks now work on LG devices, a memory leak and a segfault on copy/paste have been fixed.

For convenience, we also added some mouse shortcuts?:
• middle-click presses the HOME button,
• right-click presses the BACK button (on turn the screen on),
• double-click on black borders resize the window to fit the device screen.

But a specific feature was much requested: make it work over Wi-Fi.

 

Wireless

The application communicates with the device over adb, so it should be easy to make it work wirelessly: Connect to a device over Wi-Fi.

It was not counting on an adb bug preventing adb reverse to work over a connection established by adb connect.

Therefore, we implemented a workaround to fallback using adb forward (and reversing the client/server roles) when adb reverse fails.

 

How to run scrcpy wirelessly?

Here are the steps:
1. Connect the device to the same Wi-Fi as your computer
2. Get your device IP address (in Settings → About phone → Status)
3. Enable adb over TCP/IP on your device: adb tcpip 5555
4. Connect to your device: adb connect DEVICE_IP:5555 (replace DEVICE_IP)
5. Unplug your device
6. Run scrcpy as usual

To switch back to USB mode: adb usb.

As expected, the performances are not the same as over USB.

The default scrcpy bit-rate is 8Mbps, which is probably too much for a Wi-Fi connection. Depending on the use case, decreasing the bit-rate and the resolution may be a good compromise:

scrcpy --bit-rate 2M --max-size 800

For people in a hurry:

scrcpy -b2M -m800

Note that while it now works over TCP/IP, this is not an optimal solution for streaming a video wirelessly, since the raw stream is still sent over TCP, where a packet loss is very bad for latency, due to head-of-line blocking. But it’s better than nothing!

Under good conditions, it may work pretty well:

On the video, scrcpy is started over USB on the laptop with Debian (on the right), and over Wi-Fi on the Mac (on the left).

You can now build, install and run the new version!

Enjoy!

Select a Cloud provider Marketplace

Genymotion Device Image for Cloud providers
- Private Offer -

Genymotion Desktop for Business
- Get a Quote -

Genymotion SaaS
- Increase Maximum Simultaneous devices -

Personal Use - Free

Genymotion Desktop for personal use is not suitable for trial or POC: you will not get any assistance and some features will be disabled. If you have already selected “personal use” and wish to get a trial license, please contact our Sales at [email protected].

Technical support is not available with Genymotion Desktop free edition for personal use. For more details, please refer to Genymotion conditions of use (Personal Use).

The following features are not available in personal use mode:

Follow these steps to get Genymotion Desktop and activate personal use mode:

  1. Go to the Download page and get the latest version for your system.
  2. Follow the instructions from Genymotion Desktop quickstart guide to install Genymotion Desktop.
  3. Launch Genymotion and click CREATE to create an account. You should receive an activation email within an hour. If not, make sure to check your spam.
  4. After activating your account, return to Genymotion and log in with your credentials.
  5. Select personal use when prompted.
  6. Read Genymotion Desktop quickstart guide carefully to setup Genymotion for your needs.