SCRCPY: Display and control your Android device

Build Instructions

The official build instructions on the official website are too convaluted so putting the details in simple words here

Official build instructions are https://github.com/Genymobile/scrcpy/blob/master/BUILD.md

  1. I am using ubuntu 18.04 based Ubuntu Mate 18.04 for my system

  2. Install dependencies

sudo apt install ffmpeg libsdl2-2.0-0

sudo apt install gcc git pkg-config meson ninja-build \
                 libavcodec-dev libavformat-dev libavutil-dev \
                 libsdl2-dev
  1. lets start the process
git clone https://github.com/Genymobile/scrcpy
cd scrcpy

We will cut short the process by using the pre-build server

  1. Download the prebuild server
curl -s https://github.com/Genymobile/scrcpy/releases/download/v1.10/scrcpy-server-v1.10.jar -O scrcpy-server.jar
  1. Lets start the setup process: prepare the build
meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=./scrcpy-server.jar
  1. Build command
ninja -cX
  1. Once build is done we can run the tool standalone
./run x
  1. Or we can install it
sudo ninja -Cx install

Commands for reference

  1. Record the screen
scrcpy --record file.mp4
scrcpy -r file.mkv
  1. Multiple Devices
scrcpy --serial 0123456789abcdef
scrcpy -s 0123456789abcdef  # short version
  1. Show touches
scrcpy --show-touches
scrcpy -t
  1. Read only
scrcpy --no-control
scrcpy -n

Note: This was published earlier on now defunct https://til.anantshri.info/post/scrcpy/

Do you like what you read, What to share it

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.