How to mirror your Android screen to your Linux Desktop

Endrit Qerreti

Endrit Qerreti

In this tutorial you will learn how to mirror your android screen to your linux computer by using an usb cable.

Step 1 - Install Scrcpy

Scrcpy is the utility that we'll be installing and using to mirror screen of the android phone on your computer.  Run the command below to install scrcpy

sudo apt install scrcpy

Step 2 - Install MTP Tools

After installing scrcpy, we need to install mtp-tools, this package contains all the necessary tools that we'll need in order to be able to transfer files/images and communicate with the device, in this case with your phone. Install mtp-tools via

sudo apt install mtp-tools

Step 3 - Enable Developer mode

Enabling Developer mode is required so we can use scrcpy, enable it by going into Settings >> About Phone >> Software Information >> and click on "Build Number" seven times, keep clicking until you see the pop up that says how many taps you are left. After this you'll be prompted to authenticate , enter your password and click on, then Developer mode will be enabled

Step 4 - Enable USB Debugging

Next, go to Developer mode as shown on the image below, and look for the setting "USB Debugging" and turn this option on.

Step 5 - Connect Phone via USB cable

On this step you need to connect your phone to computer using the usb cable. After connecting choose "Usb Tethering" and click allow on the confirmation pop up that shows up on your phone.

Step 6 - Mirror & Control Your Phone

Now you can remote control your phone via your computer, to do this launch scrcpy utility and it should mirror your phone's screen on your desktop. Launch terminal and type

scrcpy

How to fix No Devices / Emulators found error

If you get this error on console

error: no devices/emulators found
ERROR: "adb get-serialno" returned with value 1
ERROR: Could not get device serial
ERROR: Server connection failed

As the error says "no devices/emulator found" , It means your phone it's not connected to your computer or scrcpy doesn't have the right permission to access your phone. Make sure to allow computer as a trusted device any time you connect it. Setting your computer as a trusted device means your phone will get automatically connected without having to confirm it manually.

To get the full list of commands run

scrcpy --help