linux

scrcpy – display and control an Android device on Linux

2 min read

As the scrcpy project page says: “This application provides 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.” Being cross-platform, it can be used on Linux as well as on Windows and OSX.

What you can do with this software

I usually use it to check websites/web applications from my laptop or desktop, and when I need to give training on using applications specifically on mobile devices.

Installing on Ubuntu

The application is available in the repositories of several distributions, as you can see in the instructions on the project page. On Ubuntu in particular (tested on 18.04 and 20.04), just run this command in the terminal (you must be an administrator of the computer):

bash
sudo apt-get install scrcpy

Preparing the Android device for use with scrcpy

To use it, we have to enable “Developer mode” and “USB debugging” on the device we want to control. The last device I used with scrcpy was a Samsung S6 (although I have also used it with other Android devices, such as the Samsung Galaxy Tab S3), so although it is easy to find with a quick search on DuckDuckGo, I describe below how to do it for this particular model. Enable developer mode:

  • Settings

  • About phone

  • Software information

  • tap Build Number several times until you are told that “Developer mode” is enabled

  • Go back to the main settings screen

  • Open Developer options

  • Turn on the “Developer options” switch

  • Enable “USB debugging”

After these steps, connect the USB cable to the computer and type this command in a terminal

bash
scrcpy

To learn how to control the device, we can read the scrcpy help by running the following command in the terminal:

bash
scrcpy --help

or alternatively:

bash
man scrcpy

#android#linux#scrcpy