Control Android devices from a desktop (with a mouse and keyboard) running Linux, Windows or macOS

Works over USB or WiFi (though the performance decreases when using it over WiFi)

Allows recording the Android screen while mirroring

It's possible to limit the Android mirroring resolution width and height

Allows changing the video bit-rate

The device screen can be cropped

Can mirror multiple devices in the same time

The scrcpy application can be started directly in fullscreen

For presentations, scrcpy can show physical touches on the Android device (only physical touches, with finger on the device!)

Install APK by dragging and dropping it onto the scrcpy window, or push a file to the device /sdcard by dragging and dropping a non-APK file

Read-only mode to disable interacting using input keys, mouse events and drag&drop

Ctrl + F

Install scrcpy on Ubuntu, Fedora, Debian, or Linux Mint

but it didn't work on my Ubuntu 18.10 desktop, so it probably still needs some work

Debian, Ubuntu or Linux Mint:

sudo apt install adb ffmpeg libsdl2-2.0-0 make gcc pkg-config meson ninja-build libavcodec-dev libavformat-dev libavutil-dev libsdl2-dev

Fedora (first command enables the RPMFusion repository - skip if it's already enabled on your Fedora machine):

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm sudo dnf install android-tools ffmpeg SDL2-devel ffms2-devel meson gcc make

scrcpy-server-v*.jar

.jar

/usr/local/bin

/usr/local/share/scrcpy

/usr/local/bin

sudo install scrcpy-server-v*.jar /usr/local/bin/scrcpy-server.jar

.tar.gz

scrcpy

scrcpy-server-v*.jar

scrcpy-server-v1.13.jar

scrcpy

cd scrcpy meson build --buildtype release --strip -Db_lto=true -Dprebuilt_server=../scrcpy-server-v1.13.jar cd build ninja sudo ninja install

scrcpy-server-v1.13.jar

How to use scrcpy on Linux to control an Android device from the Linux desktop (or record its screen)

scrcpy

OK

[email protected]:~$ scrcpy * daemon not running. starting it now on port 5037 * free(): invalid next size (fast) ADB server didn't ACK * failed to start daemon * adb: error: connect failed: cannot connect to daemon ERROR: "adb push" returned with value 1 [email protected]:~$ scrcpy * daemon not running. starting it now on port 5037 * * daemon started successfully * adb: error: connect failed: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device. ERROR: "adb push" returned with value 1 [email protected]:~$ scrcpy [100%] /data/local/tmp/scrcpy-server.jar INFO: Initial texture: 1440x2560

--record

scrcpy --record file.mp4

Mouse right-click or Ctrl + b (or Ctrl + Backspace ) for BACK

or (or ) for BACK Mouse middle-click or Ctrl + h (or the Home button) for HOME

or (or the button) for HOME Ctrl + s for the app switcher

How to uninstall scrcpy (installed from source)

sudo rm /usr/local/share/scrcpy/scrcpy-server.jar sudo rm /usr/local/bin/scrcpy-server.jar sudo rm /usr/local/bin/scrcpy

It requires at least Android 5.0, and adb debugging enabled on the Android device. Root access is not required.. It also has a, somewhere between 70 and 100 ms. I must say scrcpy's performance surprised me when I first tried it, it almost felt like I was having the Android device in my hand, and not using it remotely from my Linux desktop computer.The communication between the server (Android device in this case) and client (desktop computer) is done via a socket over an adb tunnel. The server streams H.264 video of the device screen, passing it to the client to decode and display it,. The mouse and keyboard events are captured and transmitted to the server, which injects them to the Android device.Features:Audio forwarding doesn't work, this being a limitation of the Android Open Accessory Protocol.If you feel the quality is not the best (with fonts or gradients for instance), that's most probably because the screen is scaled down. Switch the Android device to landscape mode, and run scrcpy in fullscreen () for better quality.It's also worth noting that the "scrcpy" name comes from "screen copy". That should make it easier to remember 😁️.Android-related:I found the official scrcpy build instructions for Linux to be a bit confusing, so I decided to try and make them more straightforward. There is a new, unofficial scrcpy snap package available in the Snap store,I tried the steps below, and scrcpy itself on Ubuntu 18.10 and 18.04, and Fedora 29. Since Ubuntu is based on Debian, and Linux Mint on Ubuntu, it should also work on those, and other Linux distributions based on Debian or Ubuntu.It's worth noting that Meson 0.37 or newer is required (if you're on Ubuntu 16.04, enable the Backports repository to be able to install a newer Meson version). As opposed to the official build instructions, OpenJDK is not included in my guide because it uses the precompiled scrcpy-server jar, to make things easier.These are the only distro-specific instructions, so if you know how to install these dependencies (which may have different names depending on the Linux distribution you're using) for some other Linux distribution, the other steps should be the same.Download the latestfrom the application releases page , and place it in your home folder. If the file doesn't have theextension, rename it and add it yourself.Next, install it to(even though it will also be installed in, for some reason scrcpy searches for it in): Download the scrcpy source code (thearchive for example) from the application releases page, and extract it in your home directory in a folder called(remove the version number from the scrcpy folder name - this makes it easier to use these instructions with future scrcpy versions).The home folder should now have a file called(e.g.for scrcpy v1.13), and a folder calledTo build scrcpy, we'll navigate to the scrcpy folder, build the application, and install it:If you're installing a different scrcpy version, replacefrom the second command with the exact filename containing the version you're installing.You may now remove the scrcpy folder from your home directory if you wish.I already mentioned this in the beginning of the article, but I think I should say it again. You need an Android 5.0 or newer device to control it from the desktop using scrcpy. What's more, make sure you enable adb debugging on your Android device. On some devices you may also need to enable an additional "USB debugging (Security settings)" option to be able to control the Android device from your desktop computer.If you didn't authorize the current computer with your Android device using adb, when running scrcpy for the first time make sure the Android device screen is unlocked, and that you authorize scrcpy (clickon the Android device when asked for authorization)!It's also worth noting that in my case, on a computer where I didn't run adb before, I had to run scrcpy 3 times until it worked (it probably doesn't wait enough time for the authorization), so you may want to do this as well, in case it doesn't work immediately:Run scrcpy withfollowed by the filename to record to, with either mkv or mp4 as the extension. E.g.:You may be wonderingFor how to control the Android device wirelessly from your desktop, see the detailed instructions on the application project page. Also see the scrcpy page for more advanced usage, like reducing the mirrored screen size, change the bit-rate, crop the screen, or running multiple scrcpy instances with multiple Android devices.Users wanting to remove scrcpy installed from source (using the instructions in this article), can run these two commands: