Scrcpy is a free and open-source tool that allows you to mirror and control your Android device from your Linux computer. It is fast, lightweight, and works without requiring root access. In this guide, we will walk through installing and running Scrcpy on a Linux system.
Installation Steps
Step 1: Update System Packages
Before installing Scrcpy, update your package list to ensure you get the latest versions of required dependencies:
sudo apt update
Step 2: Install Required Dependencies
Install all necessary libraries and tools to build and run Scrcpy:
sudo apt install ffmpeg libsdl2-2.0-0 adb wget gcc git pkg-config meson ninja-build \
libsdl2-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
libswresample-dev libusb-1.0-0 libusb-1.0-0-dev
Step 3: Clone Scrcpy Repository
Now, clone the official Scrcpy GitHub repository:
git clone https://github.com/Genymobile/scrcpy
cd scrcpy
Step 4: Build and Install Scrcpy
Run the installation script to build and install Scrcpy:
sudo ./install_release.sh
Enable USB Debugging on Your Android Device
Before using Scrcpy, you need to enable USB Debugging on your phone:
- Open Settings on your Android device.
- Navigate to About Phone and tap Build Number 7 times to enable Developer Mode.
- Go to Developer Options and enable USB Debugging.
- Connect your phone to your computer via USB and select File Transfer mode instead of Charging Only.
Run Scrcpy
Once everything is set up, start Scrcpy with the following command:
scrcpy
If everything is working correctly, you should see output similar to this:
scrcpy 3.1 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO: --> (usb) PLEGAR1762400382 device TA_1021
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 559.7 MB/s (90640 bytes in 0.000s)
[server] INFO: Device: [HMD Global] Nokia TA-1021 (Android 9)
This means that Scrcpy successfully detected your device and mirrored its screen to your computer.
Conclusion
Scrcpy is an excellent tool for developers, testers, and general users who want to control their Android device from their PC. With simple installation steps and minimal configuration, you can quickly get started with screen mirroring. Try it out and enjoy the seamless experience of managing your Android device on your Linux desktop!