Skip to content

Instantly share code, notes, and snippets.

@freitzzz
Created August 15, 2023 15:25
Show Gist options
  • Save freitzzz/a432ef8303108ca525601bacb81a7b1b to your computer and use it in GitHub Desktop.
Save freitzzz/a432ef8303108ca525601bacb81a7b1b to your computer and use it in GitHub Desktop.
(debian/ubuntu) One click Scrcpy Install script
#!/usr/bin/env bash
# This is an one-click install script using the instructions listed on the official scrcpy repo: https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md
# This script is intended to be run on Debian / Ubuntu based systems.
banner="
____________ __________ __
/ __/ ___/ _ \/ ___/ _ \ \/ /
_\ \/ /__/ , _/ /__/ ___/\ /
/___/\___/_/|_|\___/_/ /_/
A one-click install script for Scrcpy in Debian / Ubuntu based systems.
Run this script anytime over the Internet: wget -qO- https://gist.githubusercontent.com/freitzzz/a432ef8303108ca525601bacb81a7b1b/raw/scrcpy_install.bash | bash
"
echo "$banner"
# 0. Update repositories
sudo apt-get update
# 1. Install dev dependencies
sudo apt-get install -y 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
# 2. Clone scrcpy repo in known location
scrcpy_repo_path=~/.local/share/scrcpy
git clone https://github.com/Genymobile/scrcpy/ $scrcpy_repo_path
cd $scrcpy_repo_path
# 3. Install scrcpy
./install_release.sh
echo "Scrcpy was installed in $scrcpy_repo_path"
# <EOF>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment