diff --git a/scrcpy.sh b/scrcpy.sh new file mode 100644 index 0000000000000000000000000000000000000000..c13194c5b7b6cc36d17fddca9a83eaec1f00dca5 --- /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