- How to mirror your Android screen to your Linux Desktop
- Step 1 — Install Scrcpy
- Step 2 — Install MTP Tools
- Step 3 — Enable Developer mode
- Step 4 — Enable USB Debugging
- Step 5 — Connect Phone via USB cable
- Step 6 — Mirror & Control Your Phone
- How to fix No Devices / Emulators found error
- Mirror your android screen on Linux and control it using Scrcpy
- What is Scrcpy?
- Installing Scrcpy
- Mirroring with Scrcpy CLI
- Navigating mirrored screen
- Mirror multiple displays
- Conclusion
- How to Mirror & Control Your Android Phone from the Ubuntu Desktop
- Scrcpy: See Your Phone Screen on a PC
- Scrcpy System Requirements
- Benefits of Scrcpy
- Scrcpy Features at a glance:
- How to Install Scrcpy on Ubuntu
How to mirror your Android screen to your Linux Desktop
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
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
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
Mirror your android screen on Linux and control it using Scrcpy
Scrcpy is a neat little tool that enables users to mirror android screens and control them from Linux desktop. In this article, I will write about how you can mirror your android screen and control it with mouse and keyboard from your Linux desktop with faster response time and good resolution.
What is Scrcpy?
SCRCPY is short for Screen Copy. It’s a lightweight tool that helps you to mirror your android screen onto your desktop and control it with your mouse and keyboard. There are many reasons you want to use Scrcpy such as:
- Watching a mobile-only video streaming service in big screen (I have an app provided by my network carrier that has many good movies and TV channels but only available for mobiles)
- Playing games on the big screen
- Control screen without touching the phone
- Testing apps for developers faster without physically picking up the device
- Show your screen in front of the audience in a conference or class
- Use multiple screens with multiple Scrcpy instances
- Recover data from a partially broken device
And more. There are tons of other reasons you need screen mirroring.
Installing Scrcpy
Installing Scrcpy is very easy. Because It’s a very lightweight application, it does not require any extra things. And it is very easy to install. If you are on Ubuntu 20.04 and newer, you can install it with this command:
$ sudo apt install adb scrcpy
This will install ADB and scrcpy Debian packages. ADB is essential to run Scrcpy because it depends on it to discover, push controls, and fetch screen.
For any distributions, you can easily install Scrcpy using Snap. Just type in:
Scrcpy is a terminal tool. That means you have to use it via the command line. But, if you want an easy to use graphical interface, you can install Scrcpy-GUI. Its a good looking Electron-based GUI for Scrcpy. To install it, head over to this link and follow the instruction. While the GUI is pretty easy to use and you don’t need any tutorial, do mind that its not a complete working application. Also, it is Electron-based so its a heavy piece of software.
Mirroring with Scrcpy CLI
Now we want to mirror screens to our desktop with Scrcpy. But we don’t want low res stream, sluggish and late response time. So we want to configure some parameters while running Scrcpy from the terminal.
You can set the size of your mirror with
$ scrcpy --max-size 1024 $ scrcpy -m 1024 # short version
Lower resolution will increase performance in the cost of the viewing experience. If you want to watch a movie and videos, you should set the resolution to 1080 or 1024. Setting it to 720 will increase speed and reduce the control lag. So if you are trying to do stuff other than watching videos, you should use lower numbers.
You can set framerate using (only Android 10+)
$ scrcpy --max-fps 30 #max 60fps
You can set framerate up to 60 fps. If you are using movies and videos, 30 is good. But for gaming, you can set it to 60. For other uses, you can set it to 15 and reduce stress on the CPU.
You can set bitrate using
$ scrcpy --bit-rate 8M $ scrcpy -b 8M # short version
Lowering bitrate always helps by lowering latency and increasing speed. If your device uses low-speed USB connection or if you are using Scrcpy in wireless mode, you can lower bitrate in order to optimize your streaming performance and reducing latency. The maximum bitrate is 8M, you can use 2M for low-speed connections and low-end devices, and 5M for moderate connections. If you have a high-speed connection with better CPU, USB speed, and WIFI speed, you can use 8M. For other parameters, you can check here.
Record the screen while mirroring:
$ scrcpy --record file.mp4 $ scrcpy -r file.mkv
Disable mirroring while recording:
$ scrcpy --no-display --record file.mp4 $ scrcpy -Nr file.mkv # interrupt recording with Ctrl+C
Navigating mirrored screen
Scrcpy is a minimal tool. All it provides as GUI is the window with a mirrored screen. So you need a keyboard and mouse to control all the stuff and navigate throughout the session. Here is a list of shortcuts you want to use in order to control your mirrored screen:
Click on HOME - Mouse Middle-click Click on BACK - Mouse Right-click Click on APP_SWITCH - Win+s Click on MENU (unlock screen) - Win+m Click on VOLUME_UP - Win+↑ (up) Click on VOLUME_DOWN - Win+↓ (down) Click on POWER - Win+p Power on - Mouse Right-click Turn the device screen off but keep mirroring - Win+o Turn device screen on - Win+Shift+o Rotate device screen - Win+r Expand notification panel - Win+n Collapse notification panel - Win+Shift+n Copy to clipboard - Win+c Cut to clipboard - Win+x Synchronize clipboards and paste - Win+v Inject computer clipboard text - Win+Shift+v Enable/disable FPS counter - Win+i Pinch-to-zoom - Ctrl+click-and-move
Mirror multiple displays
You can mirror multiple devices with Scrcpy. If you have multiple devices connected to the pc, you can specify which device to mirror in a single instance. Then you can open another instance of Scrcpy and then mirror another device. Look at this example.
Suppose you have two devices connected, so when you type
It shows your device list. So you need to authorize the devices and remember the serious each device has. Then all you need to do is to open Scrcpy and set parameter like this
$ scrcpy –serial 0123456789abcdef
$ scrcpy -s 0123456789abcdef # short version
Replace the number with your device serial number from the ADB device list.
If you want to mirror the screen wirelessly:
- Connect the device to the same Wi-Fi as your computer.
- Get your device IP address (in Settings → About phone → Status).
- Enable ADB over TCP/IP on your device: adb tcpip 5555.
- Unplug your device.
- Connect to your device: adb connect DEVICE_IP:5555 (replace DEVICE_IP).
- Run scrcpy as usual.
You can also run multiple screens wirelessly using the mentioned way. If you want to forward audio from your device, you can check this script provided by Scrcpy devs. While it is made to work with Scrcpy, it can be used without it.
Conclusion
There could be many reasons why you need to project your screen to a bigger display, ideally your Linux desktop. If you want to do it, there is nothing hard. All you need to mirror your screen with no buffering and smoother streaming is Scrcpy. It’s a lightweight, no-fuss application that works flawlessly. In this article, I tried to show ways you can mirror your screen with this app faster and smoother. And I hope it helped you.
How to Mirror & Control Your Android Phone from the Ubuntu Desktop
There’s a free, open-source tool designed precisely for the purpose of viewing your phone screen on your laptop or desktop PC.
In this post I tell you more about the app, where you can download it, and how to use it on Ubuntu & Linux Mint.
Scrcpy: See Your Phone Screen on a PC
Scrcpy is created by the team behind Genymotion, a popular Android emulator but it is not an Android emulator itself. It doesn’t not “install” Android on your desktop PC, or make a copy of it, or anything else.
As the Github project page explains, the app is designed to: “…display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access. It works on GNU/Linux, Windows and MacOS.”
Now, this sort of functionality isn’t new. Apps like Vysor and AirDroid also offer Android screen mirroring on a PC, albeit (often) at a cost.
Scrcpy is 100% free. It gives you a high-resolution “mirror” of your phone’s screen in a floating window. You can freely resize and fullscreen this window and you can chang or lock the orientation if needed.
Interaction happens in “real time”. There’s is not, in my testing, any perceptible delay or stuttering while using it.
Does Scrcpy do everything rival apps can? No, but it does enough. That makes it a viable, reliable, and free alternative to Vysor et al.
And while tech like Chromecast and Miracast mean that it’s never been easier to cast the content of your smartphone to a nearby screen it’s useful being able to interact with what you see without needing to paw a touchscreen!
Scrcpy System Requirements
To see your Android screen on the Linux desktop to interact with apps or content, record your phone screen, or perform other basic tasks, you can — and you already have everything you need to do it!
To use Scrcpy your smartphone or tablet must be running Android 5.0 or later. You must have developer options > USB debugging enabled.
To enable developer options in Android just go to Settings > System > About Phone and continually tap the build/version number listed until a notification appears.
And that is pretty much only hard requirement, provided you’re happy to attach your smartphone to your Linux machine using USB.
To use the Scrcpy wireless display feature requires the android-tools-adb package on your Linux desktop. You’ll connect to your phone over adb (which involves entering IP addresses; see Scrcpy docs for more).
Since whole thing “just works” over USB, it’s what I choose to use.
Benefits of Scrcpy
Scrcpy’s focus is on being lightweight and performant. It touts high frame rates and low latency.
The tool is also non-intrusive; you don’t need to be root, there are no apps to install on your phone, and no extraneous extensions to install on your desktop.
Plus, as noted by XDA Developers, the latest version of Scrcpy even lets you mirror your phone’s screen when the display is off! Earlier versions couldn’t do this.
Scrcpy works by running a server on your Android device, which the desktop app communicates with using USB (or wirelessly using an ADB tunnel).
In short, Scrcpy is a terrific way to view your Android screen on your computer without almost zero-effort, and interact with it in real time.
Scrcpy Features at a glance:
- Does not require root
- Available for Windows, macOS & Linux
- No app required required on phone.
- High resolution mirror
- Type using your computer keyboard
- Clipboard sync
- Interact using your mouse
How to Install Scrcpy on Ubuntu
Scrcpy is free, open-source software available for Windows, macOS and Linux. You can find a variety of downloads on the ‘releases’ page of the Scrcpy GitHub:
You can install Scrcpy on Ubuntu as a Snap app from the Snap Store:
You can install Scrcpy on Ubuntu as a Snap app using snapd and the following command:
Ensure your Android device has USB debugging enabled (see ‘requirements’ section above for details on how to do that), attatch to your Linux PC or laptop using a USB cable, and then launch Scrcpy from the command line:
Home / News / How to Mirror & Control Your Android Phone from the Ubuntu Desktop