From cc2cc3169833bd34cfce70664d5e35fc4fc00e6c Mon Sep 17 00:00:00 2001 From: Walmes Zeviani <walmes@ufpr.br> Date: Mon, 12 Feb 2024 10:14:31 -0400 Subject: [PATCH] Adds Screen Copy installation and usage. --- scrcpy.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 scrcpy.sh diff --git a/scrcpy.sh b/scrcpy.sh new file mode 100644 index 0000000..c13194c --- /dev/null +++ b/scrcpy.sh @@ -0,0 +1,48 @@ +#----------------------------------------------------------------------- +# Install scrcpy. + +# For Debian/Ubuntu. +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 + +# Then clone the repo and execute the installation script (source). +git clone https://github.com/Genymobile/scrcpy +cd scrcpy +./install_release.sh + +# When a new release is out, update the repo and reinstall. +git pull +./install_release.sh + +# To uninstall. +sudo ninja -Cbuild-auto uninstall + +#----------------------------------------------------------------------- +# Problem with scrcpy: "error: device unauthorized." +# https://stackoverflow.com/questions/23081263/adb-android-device-unauthorized + +# It's likely that the device is no longer authorized on ADB for +# whatever reason. + +# 1. Check if authorized. +# 2. Revoke USB Debugging on phone. If the device is shown as +# unauthorized, go to the developer options on the phone and click +# "Revoke USB debugging authorization". +# 3. Restart ADB Server. +adb kill-server +adb start-server + +# 4. Reconnect the device. The device will ask if you are agree to +# connect the computer id. You need to confirm it. +# 5. Now Check the device. It is now authorized! + +#----------------------------------------------------------------------- +# Same usages. +# +# Use Andriod as a webcam. +# https://github.com/Genymobile/scrcpy/blob/master/doc/v4l2.md +# +# To record screen and audio. +# https://github.com/Genymobile/scrcpy/blob/master/doc/recording.md -- GitLab